You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8377415
Browse filesBrowse the repository at this point in the historyBrowse files
StorPool: clean up volumes left behind by failed NAS backup/restore
Restore (KVM agent):
- When restoring a backed-up volume to a new StorPool volume fails,
either while copying the backup data or while attaching the volume
to the running VM, the created volume was leaked. The management
server persists the restored volume only on success, and StorPool
assigns the volume's identity itself, so nothing else could find
and delete it.
- Add StorageAdaptor#cleanupCreatedPhysicalDisk (default: no-op) and
call it from LibvirtRestoreBackupCommandWrapper on both failure
paths. The StorPool implementation detaches the volume from this
host and deletes it. The restore still fails; a cleanup failure is
only logged.
- Fix the delete when the attach in StorPoolStorageAdaptor
#createPhysicalDisk fails: the volume was deleted by its bare
globalId instead of "~<globalId>".
Backup (nasbackup.sh)
- Delete the clone with onAttached=detachForce, which removes it even
if the attach succeeded but the device symlink never appeared.
This replaces the separate detach-with-retries step.
Copy file name to clipboardExpand all lines: plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtRestoreBackupCommandWrapper.java
Copy file name to clipboardExpand all lines: plugins/storage/volume/storpool/src/main/java/com/cloud/hypervisor/kvm/storage/StorPoolStorageAdaptor.java
+21-1Lines changed: 21 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -327,6 +327,26 @@ public boolean deletePhysicalDisk(String volumeUuid, KVMStoragePool pool, Storag
0 commit comments