Change in vdsm[master]: hostdev: fix detection of device vmId

mpolednik at redhat.com mpolednik at redhat.com
Thu Mar 12 13:04:12 UTC 2015


Martin Polednik has uploaded a new change for review.

Change subject: hostdev: fix detection of device vmId
......................................................................

hostdev: fix detection of device vmId

Due to recent and previous name juggling, the device vmId is NOT
detected when it should be. This patch fixes the naming issues
and restores vmId detection.

Change-Id: I002c74ba84644a14ccc9abaa52a18beebe09a3e3
Signed-off-by: Martin Polednik <mpolednik at redhat.com>
---
M vdsm/hostdev.py
1 file changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/68/38668/1

diff --git a/vdsm/hostdev.py b/vdsm/hostdev.py
index 37734c2..e15f76f 100644
--- a/vdsm/hostdev.py
+++ b/vdsm/hostdev.py
@@ -139,11 +139,10 @@
     # loop through VMs and find their host devices
     for vmId, VM in vmContainer.items():
         for device in VM.conf['devices']:
-            if device['device'] == 'hostdev':
-                name = device['name']
+            if device['type'] == 'hostdev':
                 # Name is always present, if it is not we have encountered
                 # unknown situation
-                devices[name] = vmId
+                devices[device['device']] = vmId
 
     return devices
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I002c74ba84644a14ccc9abaa52a18beebe09a3e3
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Polednik <mpolednik at redhat.com>


More information about the vdsm-patches mailing list