Kunalbehbud commented on PR #13020:
URL: https://github.com/apache/cloudstack/pull/13020#issuecomment-4268025196
Addressed the Copilot comment in 142d116. `verifyVmFilesystemsFrozen` now
parses the guest-agent freeze status defensively: the `JsonParser` call is
wrapped in a try/catch for `RuntimeException` and rethrown as `IOException` so
the outer `catch (LibvirtException | IOException)` still runs the thaw/resume
path in `finally`, `{"error": {...}}` responses are treated as a freeze
failure, and the `return` field is validated as a `JsonPrimitive` string before
`getAsString()` is called.
Added two regression tests
(`testVerifyVmFilesystemsFrozenFailsForQemuErrorResponse` and
`testTakeDiskOnlyVmSnapshotOfRunningVmReturnsFailureAnswerWhenFreezeStatusJsonIsMalformed`)
covering the error-payload and malformed-JSON cases. Both assert the thaw
recovery still fires on the failure path.
Also updated `PendingReleaseNotes`. The fix path briefly suspends UEFI
guests while the NVRAM sidecar is copied, which is a user-visible behavior
change that was missing from the original entry. Non-UEFI VMs are unaffected.
Local verification on top of 142d116 passed: `mvn -pl
engine/orchestration,engine/storage/snapshot,plugins/hypervisors/kvm -am
-Dtest=AgentManagerImplTest,KvmFileBasedStorageVmSnapshotStrategyTest,LibvirtDiskOnlyVMSnapshotCommandWrapperTest
-Dsurefire.failIfNoSpecifiedTests=false test`
--
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]