| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Script.runSimpleBashScriptWithFullResult now includes error output in exceptions, enabling retry logic for transient virsh errors. Snapshot markers store VM name, disk label, overlay path for recovery. reconcileSnapshotMarkers() fully implemented with blockcommit for running VMs and qemu-img commit for offline cases. Agent reconnects instead of System.exit(1) on ReadyCommand failure. Removed duplicate SNAPSHOT_MARKER_DIR constant.
|
Congratulations on your first Pull Request and welcome to the Apache CloudStack community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md)
|
Sorry, something went wrong.
Codecov Report❌ Patch coverage is 0.46948% with 212 lines in your changes missing coverage. Please review. @@ Coverage Diff @@
## main #14697 +/- ##
============================================
- Coverage 20.77% 20.76% -0.01%
+ Complexity 20847 20846 -1
============================================
Files 6053 6053
Lines 548222 548428 +206
Branches 73236 73268 +32
============================================
- Hits 113896 113895 -1
- Misses 420984 421191 +207
Partials 13342 13342
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness.
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description
This PR fixes a data loss problem that shows up when a volume snapshot of a
running VM gets interrupted midway, either because the agent dies or the merge
fails silently. In that situation the VM keeps running off an overlay file,
but volumes.path is still pointing at the base. So the next time the VM
starts, it comes up on the base and all the writes that went to the overlay
are gone, with nothing telling you it happened.
There are a few parts to the fix. Script.runSimpleBashScriptWithFullResult()
now carries the actual virsh error output in the exception it throws. Before
this the retry logic had nothing to match against, so now it can recognise the
transient ones like "disk already in active block job" and retry properly. The
snapshot markers also store vmName, diskLabel and overlayPath now, which gives
reconcileSnapshotMarkers() enough to work with, and that method is implemented
fully in this PR. For a running VM that is sitting on an overlay it does a
blockcommit, and for the offline case it falls back to qemu-img commit, with
safety checks so a modified base file is never overwritten.
Along with that, waitForCommandsAndExit is now waitForCommandsAndReconnect. It
calls reconnect() instead of System.exit(1), because exiting was killing
snapshot merges that were still in flight. And there was a duplicate
SNAPSHOT_MARKER_DIR constant that was breaking the build, so that is removed.
Fixes: #14691
Types of changes