Skip to content

Commit 6da087e

Browse files
committed
rbd: Add some more debugging while deleting a physical disk
1 parent e97e65b commit 6da087e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ public boolean deletePhysicalDisk(String uuid, KVMStoragePool pool) {
747747
*/
748748
if (pool.getType() == StoragePoolType.RBD) {
749749
try {
750-
s_logger.info("Unprotecting and Removing RBD snapshots of image " + pool.getSourcePort() + "/" + uuid + " prior to removing the image");
750+
s_logger.info("Unprotecting and Removing RBD snapshots of image " + pool.getSourceDir() + "/" + uuid + " prior to removing the image");
751751

752752
Rados r = new Rados(pool.getAuthUserName());
753753
r.confSet("mon_host", pool.getSourceHost() + ":" + pool.getSourcePort());
@@ -759,9 +759,12 @@ public boolean deletePhysicalDisk(String uuid, KVMStoragePool pool) {
759759
IoCTX io = r.ioCtxCreate(pool.getSourceDir());
760760
Rbd rbd = new Rbd(io);
761761
RbdImage image = rbd.open(uuid);
762+
s_logger.debug("Fetching list of snapshots of RBD image " + pool.getSourceDir() + "/" + uuid);
762763
List<RbdSnapInfo> snaps = image.snapList();
763764
for (RbdSnapInfo snap : snaps) {
765+
s_logger.debug("Unprotecting snapshot " + pool.getSourceDir() + "/" + uuid + "@" + snap.name);
764766
image.snapUnprotect(snap.name);
767+
s_logger.debug("Removing snapshot " + pool.getSourceDir() + "/" + uuid + "@" + snap.name);
765768
image.snapRemove(snap.name);
766769
}
767770

0 commit comments

Comments
 (0)