Skip to content

Commit 6cabd53

Browse files
weizhouapachedhslove
authored andcommitted
test: fix several simulator CI failures (apache#10890)
* test: fix several simulator CI failures * Inject dataStoreProviderManager
1 parent 54f53de commit 6cabd53

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,9 +1252,11 @@ public void orchestrateStart(final String vmUuid, final Map<VirtualMachineProfil
12521252
}
12531253
}
12541254
DataStoreProvider storeProvider = dataStoreProviderManager.getDataStoreProvider(pool.getStorageProviderName());
1255-
DataStoreDriver storeDriver = storeProvider.getDataStoreDriver();
1256-
if (storeDriver instanceof PrimaryDataStoreDriver) {
1257-
((PrimaryDataStoreDriver)storeDriver).detachVolumeFromAllStorageNodes(vol);
1255+
if (storeProvider != null) {
1256+
DataStoreDriver storeDriver = storeProvider.getDataStoreDriver();
1257+
if (storeDriver instanceof PrimaryDataStoreDriver) {
1258+
((PrimaryDataStoreDriver)storeDriver).detachVolumeFromAllStorageNodes(vol);
1259+
}
12581260
}
12591261
}
12601262
}

0 commit comments

Comments
 (0)