Vered Volansky has posted comments on this change.

Change subject: core: Fix error message for locked disks
......................................................................


Patch Set 8: (4 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImagesHandler.java
Line 505:                 lockedDisksAliases.add(diskImage.getDiskAlias());
Line 506:                 returnValue = false;
Line 507:             }
Line 508:         }
Line 509: 
By mistake, fixed.
Line 510:         ListUtils.nullSafeAdd(messages, 
VdcBllMessages.ACTION_TYPE_FAILED_DISKS_LOCKED.toString());
Line 511:         messages.add(String.format("$%1$s %2$s", "diskAliases", 
StringUtils.join(lockedDisksAliases, ", ")));
Line 512: 
Line 513:         if (returnValue && vm.getstatus() == VMStatus.ImageLocked) {


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lsm/LiveMigrateDiskCommand.java
Line 85:         return true;
Line 86:     }
Line 87: 
Line 88:     /** Live migration is not allowed if any of the VM's disks are 
locked, since we need to perform a live snapshot*/
Line 89:     @Override
It overrides MoveOrCopyDiskCommand.isImageNotLocked() that is changed in this 
patch
Line 90:     protected boolean isImageNotLocked() {
Line 91:         return ImagesHandler.checkImagesLocked(getVm(), 
getReturnValue().getCanDoActionMessages());
Line 92:     }
Line 93: 


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
Line 358:                 log.errorFormat("RunVmAsStateless - {0} - failed to 
create snapshots", getVm().getvm_name());
Line 359:             }
Line 360:         }
Line 361:     }
Line 362: 
The containing method is a bit long and given that it's already done (it was 
longer in previous patches) and that I think it's more readable this way, I 
decided to leave it this way.
Line 363:     private boolean areDisksLocked(VdcReturnValueBase vdcReturnValue) 
{
Line 364:         return vdcReturnValue.getCanDoActionMessages().contains(
Line 365:                 
VdcBllMessages.ACTION_TYPE_FAILED_DISKS_LOCKED.name());
Line 366:     }


....................................................
Commit Message
Line 6: 
Line 7: core: Fix error message for locked disks
Line 8: 
Line 9: This fix is related to bug Bug-Url: https://bugzilla.redhat.com/865551 ,
Line 10: though not specifically mentioned there.
Fixed both.
Line 11: It fixes an error message displayed when trying to run a VM while one 
or
Line 12: more of its disks are locked. Previous message showed multiple disks
Line 13: locked message (even when there was only one), and disks_aliases was 
not
Line 14: substituted with actual disks aliases. Now both one message replaces 
the


--
To view, visit http://gerrit.ovirt.org/8693
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7c56d9d2926eaf34b4a279c8d61a8cb166524da9
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vered Volansky <vvola...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Liron Aravot <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to