Commit 812b20c
committed
Tree: implement per-gateway abort
This commit adds the functionality to abort a specific gateway channel from
the initiator. Until now, this was not properly handled. This also fixes
gateway failover.
Changes:
* Implement TreeWorker._gateway_abort() that can be used to abort/cancel
all tasks being done by the TreeWorker via the specified gateway. In
case of such abort (likely due to some gateway failure), a special return
code 76 (os.EX_PROTOCOL) is used for closing all running remote commands via
this gateway. This return code is sometimes used to specify a "Remote
protocol error" / "An error occurred in a remote communication protocol"
which seems appropriate here.
* Implement a new Task._pchannel_closing() method that is called on
PropagationChannel.ev_close(), so deterministically every time a gateway
channel is closing (self-initiated or not). This method performs necessary
cleanup actions, but most notably calls TreeWorker._gateway_abort(gateway)
on each worker currently using the gateway channel.
* Update Task._pchannel_release() so that it now calls
PropagationChannel._close() instead of Worker.abort() to properly reset
the channel's opened/setup flags.
* Updated TreeWorkerTest with tests to better cover the above and gateway
failover.
Part of #229 and extended work on #566.1 parent 1e4bbfa commit 812b20c
File tree
5 files changed
+378
-172
lines changed- lib/ClusterShell
- Worker
- tests
5 files changed
+378
-172
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
| 206 | + | |
207 | 207 | | |
208 | | - | |
209 | | - | |
| 208 | + | |
210 | 209 | | |
211 | 210 | | |
212 | 211 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | | - | |
257 | | - | |
| 256 | + | |
258 | 257 | | |
259 | 258 | | |
260 | 259 | | |
| |||
423 | 422 | | |
424 | 423 | | |
425 | 424 | | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1365 | 1365 | | |
1366 | 1366 | | |
1367 | 1367 | | |
1368 | | - | |
1369 | | - | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
1370 | 1372 | | |
1371 | 1373 | | |
1372 | 1374 | | |
| |||
1381 | 1383 | | |
1382 | 1384 | | |
1383 | 1385 | | |
1384 | | - | |
| 1386 | + | |
1385 | 1387 | | |
1386 | | - | |
1387 | | - | |
1388 | | - | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
1389 | 1409 | | |
1390 | 1410 | | |
1391 | 1411 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
564 | 564 | | |
565 | 565 | | |
566 | 566 | | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
567 | 579 | | |
568 | 580 | | |
569 | 581 | | |
| |||
0 commit comments