Change in vdsm[ovirt-3.5]: vm.py: State saving in hotunplugDisk.

nsoffer at redhat.com nsoffer at redhat.com
Sun Sep 13 12:06:34 UTC 2015


Nir Soffer has posted comments on this change.

Change subject: vm.py: State saving in hotunplugDisk.
......................................................................


Patch Set 2: Code-Review-1

(3 comments)

https://gerrit.ovirt.org/#/c/45928/2/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 4038
Line 4039
Line 4040
Line 4041
Line 4042
In 3.5 you must remove the domainID from the sdIds list.


Line 4044:             self._dom.detachDevice(driveXml)
Line 4045:         except libvirt.libvirtError as e:
Line 4046:             self.log.error("Hotunplug failed", exc_info=True)
Line 4047:             if e.get_error_code() == libvirt.VIR_ERR_NO_DOMAIN:
Line 4048:                 return response.error('noVM')
response.error() is not available in 3.5, look around to see how it was done in 3.5.
Line 4049:             return response.error('hotunplugDisk', e.message)
Line 4050:         else:
Line 4051:             self._devices[hwclass.DISK].remove(drive)
Line 4052: 


Line 4046:             self.log.error("Hotunplug failed", exc_info=True)
Line 4047:             if e.get_error_code() == libvirt.VIR_ERR_NO_DOMAIN:
Line 4048:                 return response.error('noVM')
Line 4049:             return response.error('hotunplugDisk', e.message)
Line 4050:         else:
You must update the sdIds list as was done in the old code.
Line 4051:             self._devices[hwclass.DISK].remove(drive)
Line 4052: 
Line 4053:             # Find and remove disk device from vm's conf
Line 4054:             for dev in self.conf['devices'][:]:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2cf18186cbba33d7e74fd15651ffec3149c98e1d
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list