Skip to content

Commit abbc61c

Browse files
authored
engine-orchestration: expunge destroyed system vm volume (#9197)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
1 parent 2fef0a3 commit abbc61c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1186,7 +1186,8 @@ public VolumeVO doInTransaction(TransactionStatus status) {
11861186
s_logger.error(String.format("Unable to destroy existing volume [%s] due to [%s].", volumeToString, e.getMessage()));
11871187
}
11881188
// In case of VMware VM will continue to use the old root disk until expunged, so force expunge old root disk
1189-
if (vm.getHypervisorType() == HypervisorType.VMware) {
1189+
// For system VM we do not need volume entry in Destroy state
1190+
if (vm.getHypervisorType() == HypervisorType.VMware || vm.getType().isUsedBySystem()) {
11901191
s_logger.info(String.format("Trying to expunge volume [%s] from primary data storage.", volumeToString));
11911192
AsyncCallFuture<VolumeApiResult> future = volService.expungeVolumeAsync(volFactory.getVolume(existingVolume.getId()));
11921193
try {

0 commit comments

Comments
 (0)