Change in vdsm[master]: vm: Keep drive replica block device state

nsoffer at redhat.com nsoffer at redhat.com
Sun Apr 19 22:20:34 UTC 2015


Nir Soffer has uploaded a new change for review.

Change subject: vm: Keep drive replica block device state
......................................................................

vm: Keep drive replica block device state

During LSM between mixed domain types, we must know if the replica
volume is a block device. Now we keep this info in a new "blockDev" key.

To simplify diskReplicateStart and make it easier to debug, we set now
the replica dict in Drive.diskReplicate, instead of the srcDisk
argument.

We also log the replica dict instead of the dstDisk dict, since it
contains more useful info.

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


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/24/40024/1

diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index f7a0935..1504321 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -3435,7 +3435,8 @@
 
         replica['path'] = self.cif.prepareVolumePath(replica)
         try:
-            self._setDiskReplica(drive, dstDisk)
+            replica['blockDev'] = utils.isBlockDevice(replica["path"])
+            self._setDiskReplica(drive, replica)
 
             try:
                 self._startDriveReplication(drive, replica)
@@ -3445,7 +3446,7 @@
                     self._delDiskReplica(drive)
                 except Exception:
                     self.log.exception("Error unsetting disk replica %s",
-                                       dstDisk)
+                                       replica)
                 raise t, v, tb
         except Exception:
             self.log.exception("Unable to start replication for %s to %s",


-- 
To view, visit https://gerrit.ovirt.org/40024
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If28c9e6d084fd27857ff9da2c024d8798f375cbd
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