Michael Kublin has posted comments on this change.
Change subject: core: Changed illegal error msg to locked(#840304)
......................................................................
Patch Set 5: I would prefer that you didn't submit this
(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:
Still don't understand motivation of change. If vm is loked - it is not
important if any of disks are locked. To check status of vm is easy
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) {
These is wrong. the vm is not locked, locked is image
These should be ACTION_TYPE_FAILED_DISKS_ARE_LOCK
ED
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(
.ACTION_TYPE_FAILED_VM_IS_LOCKED - can not return from canDoAction of
CreateAllSnapshotsFromVm ?
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 <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Asaf Shakarchi <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches