Vered Volansky has posted comments on this change.

Change subject: core: Changed illegal error msg to locked(#840304)
......................................................................


Patch Set 5: Verified

(3 inline comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImagesHandler.java
Line 473:                     ListUtils.nullSafeAdd(messages, 
VdcBllMessages.ACTION_TYPE_FAILED_DISKS_ARE_LOCKED.toString());
Line 474:                     messages.add(String.format("$%1$s %2$s", 
"diskAliases", StringUtils.join(lockedDisksAliases, ", ")));
Line 475:                 }
Line 476:             }
Line 477: 
As noted in previous comments, we'd like to give the user a more specific 
message if possible.
Line 478:             if (returnValue && vm.getstatus() == 
VMStatus.ImageLocked) {
Line 479:                 ListUtils.nullSafeAdd(messages, 
VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_LOCKED.toString());
Line 480:                 returnValue = false;
Line 481:             }


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/MoveOrCopyDiskCommand.java
Line 100:     }
Line 101: 
Line 102:     protected boolean isImageIsNotLocked() {
Line 103:         if (getImage().getimageStatus() == ImageStatus.LOCKED) {
Line 104:             if (getParameters().getOperation() == 
ImageOperation.Move) {
This fixes a regression, but apparently not completely. I'm removing it from 
this patch, another one will follow.
Line 105:                 
addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_LOCKED);
Line 106:             } else {
Line 107:                 
addCanDoActionMessage(VdcBllMessages.VM_TEMPLATE_IMAGE_IS_LOCKED);
Line 108:             }


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RunVmCommand.java
Line 337:                 // save RunVmParams so we'll know how to run
Line 338:                 // the stateless VM in the EndAction part.
Line 339:                 VmHandler.updateDisksFromDb(getVm());
Line 340:             } else {
Line 341:                 if (vdcReturnValue.getCanDoActionMessages().contains(
This fixes the same regression and will be entered in the next patch. Still, I 
don't understand your comment, please explain what you mean for the benefit of 
the next patch.
Line 342:                         
VdcBllMessages.ACTION_TYPE_FAILED_VM_IS_LOCKED.name())) {
Line 343:                     throw new 
VdcBLLException(VdcBllErrors.IRS_IMAGE_STATUS_ILLEGAL);
Line 344:                 }
Line 345:                 getReturnValue().setFault(vdcReturnValue.getFault());


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2edb7b8c946589f3bbad251d533704fe856bc175
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Vered Volansky <vvola...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Asaf Shakarchi <a...@redhat.com>
Gerrit-Reviewer: Ayal Baron <aba...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Liron Aravot <lara...@redhat.com>
Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@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