Adam Litke has posted comments on this change. Change subject: LiveMerge: Sync volume chain information after live merge ......................................................................
Patch Set 6: (3 comments) http://gerrit.ovirt.org/#/c/26636/6/vdsm/virt/vm.py File vdsm/virt/vm.py: Line 2986: # inconsistencies. This can happen if a live merge completed while Line 2987: # vdsm was not running to catch the event. Line 2988: for drive in self._devices[DISK_DEVICES]: Line 2989: if drive['device'] == 'disk' and isVdsmImage(drive): Line 2990: self._syncVolumeChain(drive) > How costly is this? We need to get the domain XML (libvirt call) and parse out the backing chain. Then we call into HSM to check metadata. The slowest thing is possibly the libvirt call. Line 2991: Line 2992: # VmStatsThread may use block devices info from libvirt. Line 2993: # So, run it after you have this info Line 2994: self._initVmStats() Line 5303: if not sourceXML: Line 5304: break Line 5305: sourceAttr = ('file', 'dev')[drive.blockDev] Line 5306: path = sourceXML.getAttribute(sourceAttr) Line 5307: volChain.insert(0, pathToVolID(drive, path)) > wild idea, feel free to ignore: Yeah, another valid way of doing it. I don't think the inserts are too expensive though. Line 5308: bsXML = findElement(diskXML, 'backingStore') Line 5309: if not bsXML: Line 5310: return None Line 5311: diskXML = bsXML Line 5372: if status == libvirt.VIR_DOMAIN_BLOCK_JOB_COMPLETED: Line 5373: self._syncVolumeChain(drive) Line 5374: else: Line 5375: self.log.warning("Block job '%s' did not complete successfully " Line 5376: "(status:%i)", path, status) > It is correct to untrack a not completed block job? If it's failed it is also completed so on any event here we know libvirt will stop reporting the job information. Line 5377: self.untrackBlockJob(jobID) Line 5378: Line 5379: def _initLegacyConf(self): Line 5380: self.conf['displayPort'] = GraphicsDevice.LIBVIRT_PORT_AUTOSELECT -- To view, visit http://gerrit.ovirt.org/26636 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib86c19077695354b45818e0186e642ad0e8bc07c Gerrit-PatchSet: 6 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke <[email protected]> Gerrit-Reviewer: Adam Litke <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Federico Simoncelli <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Greg Padgett <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
