Change in vdsm[master]: virt: Add debugging information for bz 1176673

nsoffer at redhat.com nsoffer at redhat.com
Sat Feb 21 13:43:30 UTC 2015


Nir Soffer has uploaded a new change for review.

Change subject: virt: Add debugging information for bz 1176673
......................................................................

virt: Add debugging information for bz 1176673

Log domain xml before and after:
- snapshotCreateXML
- blockRebase
- blockAbort

Change-Id: I21896f32923d99a36295e17a12f5cbc953b9a5f0
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
---
M vdsm/virt/vm.py
1 file changed, 18 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/18/38018/1

diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index c9ba79b..e4a0be3 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -3347,6 +3347,9 @@
             snapFlags |= libvirt.VIR_DOMAIN_SNAPSHOT_CREATE_QUIESCE
 
         snapxml = snap.toprettyxml()
+
+        self._logDomainXML("Before snapshotCreateXML")
+
         # TODO: this is debug information. For 3.6.x we still need to
         # see the XML even with 'info' as default level.
         self.log.info(snapxml)
@@ -3400,6 +3403,8 @@
             self.startDisksStatsCollection()
             if memoryParams:
                 self.cif.teardownVolumePath(memoryVol)
+
+        self._logDomainXML("After snapshotCreateXML")
 
         # Returning quiesce to notify the manager whether the guest agent
         # froze and flushed the filesystems or not.
@@ -3476,6 +3481,8 @@
         try:
             dstDiskCopy['path'] = self.cif.prepareVolumePath(dstDiskCopy)
 
+            self._logDomainXML("Before blockRebase")
+
             try:
                 self._dom.blockRebase(srcDrive.name, dstDiskCopy['path'], 0, (
                     libvirt.VIR_DOMAIN_BLOCK_REBASE_COPY |
@@ -3488,6 +3495,9 @@
                                    srcDrive.name, dstDiskCopy)
                 self.cif.teardownVolumePath(dstDiskCopy)
                 raise
+
+            self._logDomainXML("After blockRebase")
+
         except Exception:
             self.log.exception("Cannot complete the disk replication process")
             self._delDiskReplica(srcDrive)
@@ -3562,6 +3572,8 @@
             blockJobFlags = 0
             diskToTeardown = srcDrive.diskReplicate
 
+        self._logDomainXML("Before blockAbort")
+
         try:
             # Stopping the replication
             self._dom.blockJobAbort(srcDrive.name, blockJobFlags)
@@ -3586,6 +3598,8 @@
         finally:
             self._delDiskReplica(srcDrive)
             self.startDisksStatsCollection()
+
+        self._logDomainXML("After blockAbort")
 
         return {'status': doneCode}
 
@@ -4933,6 +4947,10 @@
                       'running' if self._guestCpuRunning else 'stopped',
                       reason)
 
+    def _logDomainXML(self, message):
+        self._updateDomainDescriptor()
+        self.log.debug("%s: %s", message, self._domain.xml)
+
     def _setUnresponsiveIfTimeout(self, stats, statsAge):
         if (not self.isMigrating()
                 and statsAge > config.getint('vars', 'vm_command_timeout')


-- 
To view, visit http://gerrit.ovirt.org/38018
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I21896f32923d99a36295e17a12f5cbc953b9a5f0
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>


More information about the vdsm-patches mailing list