Francesco Romani has posted comments on this change.
Change subject: virt: Resolve snapshot type after prepareVolumePath
......................................................................
Patch Set 2:
(1 comment)
http://gerrit.ovirt.org/#/c/32066/2/vdsm/virt/vm.py
File vdsm/virt/vm.py:
Line 3979: newDrives[vmDevName]["format"] = "cow"
Line 3980:
Line 3981: # We cannot evaluate blockDev until after prepareVolumePath
Line 3982: snapTypes[vmDevName] = \
Line 3983: lambda: 'block' if vmDrive.blockDev else
'file'
I'm missing something.
Looks like this field is not used until line 4007.
Can't we just avoid to set this field (maybe setting a placeholder instead) until it
is safe to do so - at line 4006 or something like it?
Line 3984:
Line 3985: # If all the drives are the current ones, return success
Line 3986: if len(newDrives) == 0:
Line 3987: self.log.debug('all the drives are already in use,
success')
--
To view, visit
http://gerrit.ovirt.org/32066
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia4726702eb329bf65f1f9c658067f7a01c2179e4
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes