Repository navigation
Commit 4748bab
committed
engine: do not force the stop for a missing power report
`sendStop()` swallows `AgentUnavailableException` and `OperationTimedoutException`
and reports success when `force` is true:
} catch (final AgentUnavailableException | OperationTimedoutException e) {
if (!force) { return new Pair<>(false, errorMsg); }
}
return new Pair<>(true, null);
So a host that is unreachable or too slow to answer counts as a successful
stop, and the caller goes on to release the NICs and IP addresses. A host too
busy to answer is exactly the condition that produces the stale report this
branch is reacting to, so that is the worst case to guess in.
| report | force | on an unreachable host |
|---------------------|-------|-------------------------------|
| PowerOff | true | unchanged, host said it is down |
| PowerReportMissing | false | back off, keep the addresses, let a later report decide |
A PowerOff report is the host stating the instance is down. A missing report
only means the host did not list it, which is not the same thing.
Also makes `handlePowerOffReportWithNoPendingJobsOnVM()` protected so this
branch can be tested.
Signed-off-by: Brad House <bhouse@nexthop.ai>1 parent 191977e commit 4748bab
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5542 | 5542 | | |
5543 | 5543 | | |
5544 | 5544 | | |
5545 | | - | |
| 5545 | + | |
5546 | 5546 | | |
5547 | 5547 | | |
5548 | 5548 | | |
| |||
5570 | 5570 | | |
5571 | 5571 | | |
5572 | 5572 | | |
| 5573 | + | |
| 5574 | + | |
| 5575 | + | |
| 5576 | + | |
| 5577 | + | |
| 5578 | + | |
5573 | 5579 | | |
5574 | 5580 | | |
5575 | | - | |
| 5581 | + | |
5576 | 5582 | | |
5577 | 5583 | | |
5578 | 5584 | | |
| |||
0 commit comments