Commit f8c60aa
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.
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.
Part of #229 and extended work on #566.1 parent 7e5e3f6 commit f8c60aa
3 files changed
+35
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 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 | | |
| |||
1384 | 1386 | | |
1385 | 1387 | | |
1386 | 1388 | | |
1387 | | - | |
1388 | | - | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
1389 | 1405 | | |
1390 | 1406 | | |
1391 | 1407 | | |
| |||
| 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