Commit b7aa7cf
committed
refactor: recovery after agent kill and rejoin
In the case when an agent that deployed workers is destroyed, the current code implementation would skip the agent that previously deployed failed workers if it wasn't found during the first iteration of recovery, continuing with remaining agents. We had to refactor the code to remove this limitation. So when an agent fails and is restarted, it will be included in the recovery process. Added changes for when an agent joins controller, to also update all existing job contexts with the details about this agent. So whenever an agent joins, all job contexts will be able to use its resources.1 parent 2509d39 commit b7aa7cf
2 files changed
+18
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
102 | 107 | | |
103 | 108 | | |
104 | 109 | | |
| |||
107 | 112 | | |
108 | 113 | | |
109 | 114 | | |
| 115 | + | |
110 | 116 | | |
111 | 117 | | |
112 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
540 | 524 | | |
541 | 525 | | |
542 | 526 | | |
| |||
594 | 578 | | |
595 | 579 | | |
596 | 580 | | |
597 | | - | |
598 | 581 | | |
599 | 582 | | |
600 | 583 | | |
| |||
604 | 587 | | |
605 | 588 | | |
606 | 589 | | |
| 590 | + | |
607 | 591 | | |
608 | | - | |
609 | | - | |
610 | | - | |
611 | | - | |
| 592 | + | |
612 | 593 | | |
613 | 594 | | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
614 | 598 | | |
615 | | - | |
| 599 | + | |
616 | 600 | | |
617 | 601 | | |
618 | 602 | | |
| |||
1207 | 1191 | | |
1208 | 1192 | | |
1209 | 1193 | | |
1210 | | - | |
| 1194 | + | |
1211 | 1195 | | |
1212 | 1196 | | |
1213 | 1197 | | |
| |||
1380 | 1364 | | |
1381 | 1365 | | |
1382 | 1366 | | |
1383 | | - | |
| 1367 | + | |
1384 | 1368 | | |
1385 | 1369 | | |
1386 | 1370 | | |
| |||
1448 | 1432 | | |
1449 | 1433 | | |
1450 | 1434 | | |
1451 | | - | |
| 1435 | + | |
1452 | 1436 | | |
1453 | 1437 | | |
1454 | 1438 | | |
| |||
0 commit comments