Francesco Romani has uploaded a new change for review.
Change subject: virt: dump domain xml when change is detected ......................................................................
virt: dump domain xml when change is detected
The Domain XML should not change often during the lifetime of a VM. Nevertheless, it is greatly helpful to have up-to-date information when troubleshooting issues.
This patch logs the domain XML whenever a change is detected, to improve the debuggability of VDSM.
Change-Id: I658ed887e258c4217a3d1eddb4924688b5a613f6 Signed-off-by: Francesco Romani fromani@redhat.com --- M vdsm/virt/vm.py 1 file changed, 5 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/49/33549/1
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index ad8cb0e..e728902 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -4492,8 +4492,11 @@ self._lastXMLDesc = self._dom.XMLDesc(0) devxml = _domParseStr(self._lastXMLDesc).childNodes[0]. \ getElementsByTagName('devices')[0] - self._devXmlHash = hash(devxml.toxml()) - + xmlHash = hash(devxml.toxml()) + if xmlHash != self._devXmlHash: + self.log.debug('changed device configuration:\n%s', + self._lastXMLDesc) + self._devXmlHash = xmlHash return self._lastXMLDesc
def _ejectFloppy(self):
Francesco Romani has posted comments on this change.
Change subject: virt: dump domain xml when change is detected ......................................................................
Patch Set 1: Code-Review-1
let's discuss approaches before.
oVirt Jenkins CI Server has posted comments on this change.
Change subject: virt: dump domain xml when change is detected ......................................................................
Patch Set 1:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/11744/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/12688/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_virt_functional_tests_gerrit/1701/ : There was an infra issue, please contact infra@ovirt.org
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/12533/ : SUCCESS
Francesco Romani has abandoned this change.
Change subject: virt: dump domain xml when change is detected ......................................................................
Abandoned
bad idea. Better idea: per-device log when device changes, either solicited or unsolicited by VDSM.
vdsm-patches@lists.fedorahosted.org