Francesco Romani has posted comments on this change. Change subject: vm.py: State saving in hotunplugDisk. ......................................................................
Patch Set 8: -Code-Review (2 comments) https://gerrit.ovirt.org/#/c/45077/8/vdsm/virt/vm.py File vdsm/virt/vm.py: Line 2631: return response.error('hotunplugDisk', e.message) Line 2632: else: Line 2633: self._devices[hwclass.DISK].remove(drive) Line 2634: Line 2635: # Find and remove disk device from vm's conf this is almost identical to _lookupConfByPath (used into the live merge path). Any reason not to use it? try: dev = self._lookupConfByPath(drive.path) except LookupError: self.log.error("log some critical error (not using this message verbatim): config is inconsistent with device map") else: with self._confLock: self.conf['devices'].remove(dev) Line 2636: for dev in self.conf['devices'][:]: Line 2637: if (dev['type'] == hwclass.DISK and Line 2638: dev['path'] == drive.path): Line 2639: with self._confLock: Line 2642: Line 2643: self.saveState() Line 2644: hooks.after_disk_hotunplug(driveXml, self.conf, Line 2645: params=drive.custom) Line 2646: you need to resubmit anyway, so please remove unneeded althoug nice spurious blank line. Line 2647: self._cleanupDrives(drive) Line 2648: Line 2649: return {'status': doneCode, 'vmList': self.status()} Line 2650: -- 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: 8 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Amit Aviram <[email protected]> Gerrit-Reviewer: Adam Litke <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Amit Aviram <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Liron Aravot <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
