Liron Aravot has posted comments on this change.

Change subject: core: add clear message for live snapshot fail
......................................................................


Patch Set 5: (1 inline comment)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateAllSnapshotsFromVmCommand.java
Line 243:         if (disksList.size() > 0) {
Line 244:             VmValidator vmValidator = new VmValidator(getVm());
Line 245:             result = validate(new 
SnapshotsValidator().vmNotDuringSnapshot(getVmId()))
Line 246:                     && validate(vmValidator.vmNotDuringMigration())
Line 247:                     && validate(vmValidator.vmNotRunningStateless())
This check actually should be in the begining of the canDoAction - if you can 
know that its not compatible then there's no need to load the disks if we can 
already know that we can't perform a snapshot.
furthermore, it will solve a bug - after talk with Allon we confirmed that 
right now a bug can be caused as we will allow live snapshot for diskless vm in 
unsupported DC.

by the way, I don't know if it should be done in the scope of this patch, but 
there is a race condition here, vm can be deleted and be null when we attemp to 
load it the first time and then we will have NPE..
Line 248:                     && canDoSnapshot(getVm())
Line 249:                     && ImagesHandler.PerformImagesChecks(getVm(),
Line 250:                             getReturnValue().getCanDoActionMessages(),
Line 251:                             getVm().getStoragePoolId(),


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7b6dfc138951baddc991a82a4c9e64f60499428a
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alissa Bonas <abo...@redhat.com>
Gerrit-Reviewer: Alissa Bonas <abo...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Liron Aravot <lara...@redhat.com>
Gerrit-Reviewer: Sharad Mishra <snmis...@linux.vnet.ibm.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