Skip to content

Commit f453110

Browse files
JasperB-TeamBluesandrobonazzola
authored andcommitted
core: only try to unlock vm if vm present
When a standalone disk is made, don't try to release locks on VM, because there are none Signed-off-by: Jasper Berton <[email protected]>
1 parent 12f39f9 commit f453110

File tree

1 file changed

+10
-0
lines changed
  • backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk

1 file changed

+10
-0
lines changed

backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/disk/AddDiskCommand.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -824,6 +824,16 @@ protected void endSuccessfully() {
824824
super.endSuccessfully();
825825
}
826826

827+
@Override
828+
protected void endVmCommand() {
829+
if (isFloatingDisk()) {
830+
endActionOnDisks();
831+
setSucceeded(true);
832+
} else {
833+
super.endVmCommand();
834+
}
835+
}
836+
827837
private void plugDiskToVmIfNeeded() {
828838
if (Boolean.TRUE.equals(getParameters().getPlugDiskToVm()) && getVm() != null) {
829839
if (!getVm().getStatus().isUpOrPaused()) {

0 commit comments

Comments
 (0)