sidshas03 opened a new pull request, #14697:
URL: https://github.com/apache/cloudstack/pull/14697

   ### 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
   
   - [x] Bug fix (non-breaking change which fixes an issue)


-- 
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]

Reply via email to