Nir Soffer has posted comments on this change.
Change subject: vm: log xml from/to libvirt at 'info' level
......................................................................
Patch Set 2:
(7 comments)
http://gerrit.ovirt.org/#/c/34358/2/vdsm/virt/vm.py
File vdsm/virt/vm.py:
Line 2843: # domDependentInit, after the migration is completed.
Line 2844:
Line 2845: if not self.recovering and initDomain:
Line 2846: domxml = hooks.before_vm_start(self._buildDomainXML(), self.conf)
Line 2847: self.log.info(domxml)
This is not info level message - this is debug message.
Info message should report important events and state changes, not provide tons of info
for debugging.
Line 2848:
Line 2849: if self.recovering:
Line 2850: self._dom = NotifyingVirDomain(
Line 2851: self._connection.lookupByUUIDString(self.id),
Line 2959: nicXml = nic.getXML().toprettyxml(encoding='utf-8')
Line 2960: nicXml = hooks.before_nic_hotplug(nicXml, self.conf,
Line 2961: params=nic.custom)
Line 2962: nic._deviceXML = nicXml
Line 2963: self.log.info("Hotplug NIC xml: %s", nicXml)
Do we need the whole xml or only few values from it?
e.g. "Hotplug NIC value=xxx other=yyy..." - isn't this better then while
blob of xml?
Line 2964:
Line 2965: try:
Line 2966: self._dom.attachDevice(nicXml)
Line 2967: except libvirt.libvirtError as e:
Line 3189:
Line 3190: nicXml = nic.getXML().toprettyxml(encoding='utf-8')
Line 3191: hooks.before_nic_hotunplug(nicXml, self.conf,
Line 3192: params=nic.custom)
Line 3193: self.log.info("Hotunplug NIC xml: %s", nicXml)
Same as hotplug above.
Line 3194: else:
Line 3195: self.log.error("Hotunplug NIC failed - NIC not found:
%s",
Line 3196: nicParams)
Line 3197: return {'status': {'code':
errCode['hotunplugNic']
Line 3453:
Line 3454: # Make sure the cached XML representation is valid as well
Line 3455: xml = found_device.getXML().toprettyxml(encoding='utf-8')
Line 3456: self.log.info("New device XML for %s: %s",
Line 3457: found_device.name, xml)
Same as hotplug/unplug above.
Line 3458: found_device._deviceXML = xml
Line 3459:
Line 3460: return {'status': doneCode}
Line 3461:
Line 3510: if drive.hasVolumeLeases:
Line 3511: return errCode['noimpl']
Line 3512:
Line 3513: driveXml = drive.getXML().toprettyxml(encoding='utf-8')
Line 3514: self.log.info("Hotplug disk xml: %s" % (driveXml))
Same as above
Line 3515:
Line 3516: driveXml = hooks.before_disk_hotplug(driveXml, self.conf,
Line 3517: params=drive.custom)
Line 3518: drive._deviceXML = driveXml
Line 3562: if drive.hasVolumeLeases:
Line 3563: return errCode['noimpl']
Line 3564:
Line 3565: driveXml = drive.getXML().toprettyxml(encoding='utf-8')
Line 3566: self.log.info("Hotunplug disk xml: %s", driveXml)
Same ...
Line 3567:
Line 3568: self._devices[DISK_DEVICES].remove(drive)
Line 3569: # Find and remove disk device from vm's conf
Line 3570: diskDev = None
Line 3963: snapFlags |= libvirt.VIR_DOMAIN_SNAPSHOT_CREATE_DISK_ONLY
Line 3964: snapFlags |= libvirt.VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE
Line 3965:
Line 3966: snapxml = snap.toprettyxml()
Line 3967: self.log.info(snapxml)
Same ...
Line 3968:
Line 3969: # We need to stop the collection of the stats for two reasons, one
Line 3970: # is to prevent spurious libvirt errors about missing drive paths
Line 3971: # (since we're changing them), and also to prevent to trigger a
drive
--
To view, visit
http://gerrit.ovirt.org/34358
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia07823512a8cdf5f05789b29bf3d4daa1a8ccb07
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Gerrit-Reviewer: automation(a)ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes