Allon Mureinik has submitted this change and it was merged.

Change subject: core: Disabling an SD with unplugged disk of a VM
......................................................................


core: Disabling an SD with unplugged disk of a VM

Prior to this patch, when disabling a Storage Domain the canDoAction()
would check that it does not contain any disks in that belong to running
VM, and if it does, the command is failed.

This behavior is overly strict, and we should be able to disable a
domain which contains unplugged disks, even if they are attached to a
running VM.

This patch contains:
1. Changing the GetVmsByStorageDomainId stored procedure to take only
   plugged disks in to account.
2. In fixtures.xml, plugging disk 1b26a52b-b60f-44cb-9f46-3ef333b04a35
   into VM 77296e00-0cad-4e5a-9299-008a7b6f4355, as opposed to just
   attaching it in order for this fix to be tested.
3. Updating the DAO tests accordingly.

Change-Id: I89d119295cf16eb1ea2df365fb22cadde6595e6a
Bug-Url: https://bugzilla.redhat.com/969770
Signed-off-by: Allon Mureinik <[email protected]>
---
M backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDAO.java
M 
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/DiskDaoTest.java
M 
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/FixturesTool.java
M 
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/VmDAOTest.java
M backend/manager/modules/dal/src/test/resources/fixtures.xml
M packaging/dbscripts/vms_sp.sql
6 files changed, 30 insertions(+), 9 deletions(-)

Approvals:
  Allon Mureinik: Verified; Looks good to me, approved



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I89d119295cf16eb1ea2df365fb22cadde6595e6a
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to