Change in vdsm[ovirt-3.3]: vdsm: prepareVolumePath payload misdetection fix
fromani at redhat.com
fromani at redhat.com
Fri Jan 3 09:30:19 UTC 2014
Francesco Romani has uploaded a new change for review.
Change subject: vdsm: prepareVolumePath payload misdetection fix
......................................................................
vdsm: prepareVolumePath payload misdetection fix
The changeset http://gerrit.ovirt.org/#/c/22324/3
used a condition too broad for its check, causing
a device path misdetection when cloud-init is used.
It is triggered in the following case:
specParams vmPayload attribute has
"file"(with content), path" non existent.
Device's (drive's) "path" is set to ''.
The code then consider the cdrom with vmPayload
a case of empty CDROM and creating it as such.
It did work before because the condition results
false when there is no 'path' in drive['specParams']
(which is the case here) and goes to the
next condition section (the right one with payload handling)
This patch provides a band-aid fix to the issue
by tightening the prepareVolumePath check.
Change-Id: Ie847eb92f28d24f4d8189e03a47cd64cc6597363
Bug-Url: https://bugzilla.redhat.com/1047356
Signed-off-by: Francesco Romani <fromani at redhat.com>
---
M vdsm/clientIF.py
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/35/22935/1
diff --git a/vdsm/clientIF.py b/vdsm/clientIF.py
index e8fb8d1..b101896 100644
--- a/vdsm/clientIF.py
+++ b/vdsm/clientIF.py
@@ -308,7 +308,8 @@
# next line can be removed in future, when < 3.3 engine
# is not supported
drive['specParams'].get('path', '') == '' and
- drive.get('path', '') == ''):
+ drive.get('path', '') == '' and
+ 'vmPayload' not in drive['specParams']):
volPath = ''
# ... or load the drive from vmPayload:
--
To view, visit http://gerrit.ovirt.org/22935
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie847eb92f28d24f4d8189e03a47cd64cc6597363
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.3
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
More information about the vdsm-patches
mailing list