Martin Polednik has uploaded a new change for review. Change subject: vdsm: prepareVolumePath correct path handling for cdrom ......................................................................
vdsm: prepareVolumePath correct path handling for cdrom prepareVolumePath checked looked 'path' key in specParams without looking at path in device itself, causing empty path in specParams to override path in device. This patch adds device.path to checking mechanism to avoid overriding valid path https://bugzilla.redhat.com/show_bug.cgi?id=1009469 Change-Id: I10e5e0c12e7cc37a692c0e5c47eed3e4c8e7cda9 Signed-off-by: Martin Polednik <mpole...@redhat.com> --- M vdsm/clientIF.py 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/74/20074/1 diff --git a/vdsm/clientIF.py b/vdsm/clientIF.py index 47851b1..537ef2c 100644 --- a/vdsm/clientIF.py +++ b/vdsm/clientIF.py @@ -303,11 +303,11 @@ volPath = self._getUUIDSpecPath(drive["UUID"]) # leave path == '' for empty cdrom and floppy drives ... - elif drive['device'] in ('cdrom', 'floppy') and \ - 'specParams' in drive and \ - 'path' in drive['specParams'] and \ - drive['specParams']['path'] == '': - volPath = '' + elif (drive['device'] in ('cdrom', 'floppy') and + hasattr(drive, 'specParams') and + drive.specParams.get('path', '') == '' and + drive.get('path', '') == ''): + volPath = '' # ... or load the drive from vmPayload: elif drive['device'] in ('cdrom', 'floppy') and \ -- To view, visit http://gerrit.ovirt.org/20074 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I10e5e0c12e7cc37a692c0e5c47eed3e4c8e7cda9 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Martin Polednik <mpole...@redhat.com> _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches