diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/GetUnregisteredDiskQuery.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/GetUnregisteredDiskQuery.java index e13266c464d..a6fa10f4f1b 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/GetUnregisteredDiskQuery.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/GetUnregisteredDiskQuery.java @@ -83,6 +83,13 @@ protected void executeQueryCommand() { // image. If there are multiple volumes, skip the image and move on to the next. if (volumesList.size() != 1) { getQueryReturnValue().setSucceeded(false); + log.info("Skipping a disk with snapshots: {}", diskId); + + // Add context for why the query did not succeed. Not great, but it is what it is + DiskImage diskImage = new DiskImage(); + diskImage.setDiskSnapshot(true); + diskImage.setDescription(String.format("snapshot-%s", diskId)); + getQueryReturnValue().setReturnValue(diskImage); return; } diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/GetUnregisteredDisksQuery.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/GetUnregisteredDisksQuery.java index afbcafd19f7..08b2053f551 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/GetUnregisteredDisksQuery.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/image/GetUnregisteredDisksQuery.java @@ -78,7 +78,14 @@ protected void executeQueryCommand() { if (unregQueryReturn.getSucceeded()) { unregisteredDisks.add(unregQueryReturn.getReturnValue()); } else { - log.debug("Could not get populated disk: {}", unregQueryReturn.getExceptionString()); + DiskImage returnValue = unregQueryReturn.getReturnValue(); + if (returnValue.isDiskSnapshot() && + String.format("snapshot-%s", unregisteredDiskId).equals(returnValue.getDescription())) { + continue; + } + + log.error("Could not get populated disk: {}", unregQueryReturn.getExceptionString()); + getQueryReturnValue().setSucceeded(false); } } getQueryReturnValue().setReturnValue(unregisteredDisks);