Change in vdsm[master]: ceph: Support hotunplug of network disks

nsoffer at redhat.com nsoffer at redhat.com
Mon Mar 16 15:55:01 UTC 2015


Nir Soffer has uploaded a new change for review.

Change subject: ceph: Support hotunplug of network disks
......................................................................

ceph: Support hotunplug of network disks

Vm._findDriveByUUIDs() was not considering network drives, failing with
LookupError. Now we use drive diskType if available to find network
drives.

Change-Id: I730474c54802c2b0cbb685d8088d496ad565e36c
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
---
M vdsm/virt/vm.py
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/04/38804/1

diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index bb2ab62..66b8c13 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -3143,6 +3143,13 @@
                 if device.UUID == drive["UUID"]:
                     return device
 
+        elif drive.get('diskType') == 'network':
+            for device in self._devices[hwclass.DISK][:]:
+                if getattr(device, "diskType", None) != 'network':
+                    continue
+                if device.path == drive["path"]:
+                    return device
+
         raise LookupError("No such drive: '%s'" % drive)
 
     def updateDriveVolume(self, vmDrive):


-- 
To view, visit https://gerrit.ovirt.org/38804
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I730474c54802c2b0cbb685d8088d496ad565e36c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>


More information about the vdsm-patches mailing list