Change in vdsm[master]: vm.py: State saving in hotunplugDisk.

laravot at redhat.com laravot at redhat.com
Sun Aug 23 17:27:13 UTC 2015


Liron Aravot has posted comments on this change.

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


Patch Set 3:

(2 comments)

https://gerrit.ovirt.org/#/c/45077/3/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 2632:         else:
Line 2633:             hooks.after_disk_hotunplug(driveXml, self.conf,
Line 2634:                                        params=drive.custom)
Line 2635: 
Line 2636:             self._devices[hwclass.DISK].remove(drive)
we should keep the order as before, removal of the disk before the hook is executed (to pass the conf  to the hook with the disk already removed)
Line 2637: 
Line 2638:             # Find and remove disk device from vm's conf
Line 2639:             for dev in self.conf['devices'][:]:
Line 2640:                 if (dev['type'] == hwclass.DISK and


Line 2643:                         self.conf['devices'].remove(dev)
Line 2644:                     break
Line 2645: 
Line 2646:             self._cleanupDrives(drive)
Line 2647:             self.saveState()
please keep _saveState() before _cleanupDrives().
Line 2648: 
Line 2649:         return {'status': doneCode, 'vmList': self.status()}
Line 2650: 
Line 2651:     def _readPauseCode(self):


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2cf18186cbba33d7e74fd15651ffec3149c98e1d
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram <aaviram at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Amit Aviram <aaviram at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Liron Aravot <laravot 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