Skip to content

Commit 253896d

Browse files
Tonitzpptoni.zamparetti
authored andcommitted
Changed error message when snapshot is not on secondary when trying to perform download (apache#12462)
Co-authored-by: toni.zamparetti <toni.zamparetti@scclouds.com.br>
1 parent 1f64887 commit 253896d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

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

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

589589
if (ObjectUtils.anyNull(chosenStore, snapshotDataStoreReference)) {
590-
logger.error("Snapshot [{}] not found in any secondary storage.", snapshot);
591-
throw new InvalidParameterValueException("Snapshot not found.");
590+
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());
591+
logger.error(errorMessage);
592+
throw new InvalidParameterValueException(errorMessage);
592593
}
593594

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

0 commit comments

Comments
 (0)