Skip to content

Commit 66665b8

Browse files
Tonitzpptoni.zamparetti
andauthored
Changed error message when snapshot is not on secondary when trying to perform download (#12462)
Co-authored-by: toni.zamparetti <[email protected]>
1 parent 5aced73 commit 66665b8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/src/main/java/com/cloud/storage/snapshot/SnapshotManagerImpl.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,8 +578,9 @@ public String extractSnapshot(ExtractSnapshotCmd cmd) {
578578
}
579579

580580
if (ObjectUtils.anyNull(chosenStore, snapshotDataStoreReference)) {
581-
logger.error("Snapshot [{}] not found in any secondary storage.", snapshot);
582-
throw new InvalidParameterValueException("Snapshot not found.");
581+
String errorMessage = String.format("Snapshot [%s] not found in any secondary storage. The snapshot may be on primary storage, where it cannot be downloaded.", snapshot.getUuid());
582+
logger.error(errorMessage);
583+
throw new InvalidParameterValueException(errorMessage);
583584
}
584585

585586
snapshotSrv.syncVolumeSnapshotsToRegionStore(snapshot.getVolumeId(), chosenStore);

0 commit comments

Comments
 (0)