Nir Soffer has uploaded a new change for review.

Change subject: Bug-Url: clientIF: Check device visibility on failed hotplugDisk
......................................................................

Bug-Url: clientIF: Check device visibility on failed hotplugDisk

According to the analysis in the bug, invoking vmHotplugDisk right after
connectStorageServer may not leave enough time for multipath to create
the device, leading to incorrect failure.

The original fix failed to invoke multipath.rescan(), and the bug was
verified by QE and used by customers for the last 6 month. We believe
that the problem is a tiny race that is unlikely to happen, but it is
possible and should be fixed.

This patch implements the original fix in a different way, calling
getDevicesVisibility(), which invokes multipath.rescan() if a device is
missing.

This is the second patch in series of patches fixing the regressions
introduced by commit 15c7f74365cb5d2c9258bc333c441941c6e42bdb.

Change-Id: I3d75ac53ca809b7a25d7fb237ec661dd865e31fc
Bug-Url: https://bugzilla.redhat.com/923773
Signed-off-by: Nir Soffer <[email protected]>
---
M vdsm/clientIF.py
1 file changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/81/21181/1

diff --git a/vdsm/clientIF.py b/vdsm/clientIF.py
index 137ba4e..367416d 100644
--- a/vdsm/clientIF.py
+++ b/vdsm/clientIF.py
@@ -282,15 +282,16 @@
 
             # GUID drive format
             elif "GUID" in drive:
-                volPath = os.path.join("/dev/mapper", drive["GUID"])
-
-                if not os.path.exists(volPath):
+                res = self.irs.getDevicesVisibility([drive["GUID"]])
+                if not res["visible"][drive["GUID"]]:
                     raise vm.VolumeError(drive)
 
                 res = self.irs.appropriateDevice(drive["GUID"], vmId)
                 if res['status']['code']:
                     raise vm.VolumeError(drive)
 
+                volPath = os.path.join("/dev/mapper", drive["GUID"])
+
             # UUID drive format
             elif "UUID" in drive:
                 volPath = self._getUUIDSpecPath(drive["UUID"])


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d75ac53ca809b7a25d7fb237ec661dd865e31fc
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to