Itamar Heim 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/1065747
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, 31 insertions(+), 10 deletions(-)

Approvals:
  Tal Nisan: Looks good to me, approved
  Daniel Erez: Looks good to me, approved
  Allon Mureinik: Verified
  Oved Ourfali: Looks good to me, but someone else must approve



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I89d119295cf16eb1ea2df365fb22cadde6595e6a
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.4
Gerrit-Owner: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: David Caro <[email protected]>
Gerrit-Reviewer: Itamar Heim <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Oved Ourfali <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: [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