bhouse-nexthop commented on PR #14632:
URL: https://github.com/apache/cloudstack/pull/14632#issuecomment-6752446276
### Test report: restartNetwork refused because the router's host is
Disconnected
**Summary:** `restartNetwork cleanup=true` with the router's host
Disconnected now fails with error code 534. It is logged at WARN by
`RestartNetworkCmd`, with no `Unexpected exception` line. That matches
`restartVPC`.
**Environment**
- A CloudStack 24.0 (main) build with this PR, alongside some of my other
open PRs. Among them is #14233, which refuses a rolling restart while an old
router's host is Disconnected. That refusal is the
`ResourceUnavailableException` used here.
- The PR targets 4.22; it wasn't run on a 4.22 build. 4.22's
`RestartNetworkCmd.execute()` declares the same checked exceptions and doesn't
catch them.
- Three KVM hosts, one management server. A new isolated network with source
NAT, with its router on host 2 and one VM.
**Steps**
1. Stop the CloudStack agent on host 2. The host was `Disconnected` 2 s
later.
2. `restartNetwork id=<network> cleanup=true`.
3. Start the agent again. Host 2 was `Up` 17 s later.
**Results**
- The job failed with **534**:
```
errorcode: 534
errortext: Resource [Host:2] is unreachable: Unable to replace router
<router>: its host <host 2> is Disconnected and may still be running it. Retry
once the host is Up, or stop the router with forced=true first.
```
- Management server log: a single WARN, with no stack trace at ERROR:
```
21:40:26,001 WARN RestartNetworkCmd Exception:
com.cloud.exception.ResourceUnavailableException: Resource [Host:2] is
unreachable: Unable to replace router ...
```
`Unexpected exception while executing ... RestartNetworkCmd`: 0 lines.
- The network still had its one router, Running on host 2. The refusal
happens before anything is deployed.
- Before this PR, the same refusal failed with 530 and an ERROR `Unexpected
exception while executing ... RestartNetworkCmd` with a stack trace. I saw that
in the #14233 lab run.
**Result:** pass.
**Not covered:** the `ConcurrentOperationException` (530) and
`InsufficientCapacityException` (533) mappings. I had no cheap way to cause
them live; they are covered by the unit tests.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]