Change in ovirt-engine[master]: core: prevent VM creation from Template while removing its d...
mkublin at redhat.com
mkublin at redhat.com
Thu Mar 14 12:55:49 UTC 2013
Michael Kublin has submitted this change and it was merged.
Change subject: core: prevent VM creation from Template while removing its disks
......................................................................
core: prevent VM creation from Template while removing its disks
In what seems to be a hack, we set a flag for not checking template
images in some commands. the problem is that the template images might
be locked for a good reason - like in case the images are really being
removed.
This patch prevents it from happening for addVmFromTemplateCommand: when
removing a disk we now take exclusive lock for that disk for the whole
execution of the command (RemoveDiskCommand). at AddVmFromTemplate we
now take shared lock for each of the template's disks - thus it won't
be possible to acquire the locks if one of the disks is being removed.
Change-Id: I8736751bbfea927072b2ade91ee3d9511e266501
Signed-off-by: Arik Hadas <ahadas at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmFromTemplateCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveDiskCommand.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/RemoveDiskCommandTest.java
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/VdcBllMessages.java
M backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
M frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/AppErrors.java
M frontend/webadmin/modules/userportal-gwtp/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
M frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties
8 files changed, 46 insertions(+), 38 deletions(-)
Approvals:
Michael Kublin: Verified; Looks good to me, approved
--
To view, visit http://gerrit.ovirt.org/13016
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I8736751bbfea927072b2ade91ee3d9511e266501
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Michael Kublin <mkublin at redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel at redhat.com>
Gerrit-Reviewer: Vered Volansky <vvolansk at redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzaslavs at redhat.com>
More information about the Engine-commits
mailing list