Skip to content

Commit 2fd28f2

Browse files
CLOUDSTACK-9691: Fixed unhandeled excetion in list snapshot command when
a primary store is deleted related to it
1 parent 6dced70 commit 2fd28f2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

server/src/com/cloud/api/ApiResponseHelper.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,9 @@ public static DataStoreRole getDataStoreRole(Snapshot snapshot, SnapshotDataStor
527527

528528
long storagePoolId = snapshotStore.getDataStoreId();
529529
DataStore dataStore = dataStoreMgr.getDataStore(storagePoolId, DataStoreRole.Primary);
530+
if (dataStore == null) {
531+
return DataStoreRole.Image;
532+
}
530533

531534
Map<String, String> mapCapabilities = dataStore.getDriver().getCapabilities();
532535

0 commit comments

Comments
 (0)