Liron Ar has posted comments on this change.

Change subject: core: introduce RemoveDiskSnapshotsCommand
......................................................................


Patch Set 10:

(1 comment)

http://gerrit.ovirt.org/#/c/26327/10/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveDiskSnapshotsCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveDiskSnapshotsCommand.java:

Line 103:     protected boolean canDoAction() {
Line 104:         if (getVm() == null) {
Line 105:             return 
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_VM_NOT_FOUND);
Line 106:         }
Line 107: 
IIRC in RemoveDiskCommand and other operations like move we lock only the 
active image in the db.
so you should check it here also till it will be fixed properly, otherwise 
during "move" you will be able to delete snapshots (for example).
Line 108:         DiskSnapshotsValidator diskSnapshotsValidator = 
createDiskSnapshotsValidator(getImages());
Line 109:         if 
(!validate(diskSnapshotsValidator.diskSnapshotsNotExist(getParameters().getImageIds()))
 ||
Line 110:                 
!validate(diskSnapshotsValidator.diskImagesBelongToSameImageGroup()) ||
Line 111:                 
!validate(diskSnapshotsValidator.imagesAreSnapshots())) {


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia714a4390d1d9b672005be30f58b7fa98b9a31cd
Gerrit-PatchSet: 10
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Liron Ar <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to