Change in vdsm[master]: storageServer: add logs in order to detect mount errors caus...

ykaplan at redhat.com ykaplan at redhat.com
Thu Feb 14 09:39:12 UTC 2013


Yeela Kaplan has uploaded a new change for review.

Change subject: storageServer: add logs in order to detect mount errors cause
......................................................................

storageServer: add logs in order to detect mount errors cause

Change-Id: I6bcb9774a8e6bd0f6bbfd8768181158a198f4ec7
Signed-off-by: Yeela Kaplan <ykaplan at redhat.com>
---
M vdsm/storage/storageServer.py
1 file changed, 11 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/42/12042/1

diff --git a/vdsm/storage/storageServer.py b/vdsm/storage/storageServer.py
index 80668bf..bf61a62 100644
--- a/vdsm/storage/storageServer.py
+++ b/vdsm/storage/storageServer.py
@@ -204,22 +204,24 @@
 
         try:
             self._mount.mount(self.options, self._vfsType)
-        except MountError:
+        except MountError as e:
+            self.log.error("Mount failed: %s", e, exc_info=True)
             try:
                 os.rmdir(self._getLocalPath())
             except OSError as e:
                 if e.errno != errno.ENOENT:
                     raise
 
-        try:
-            fileSD.validateDirAccess(self.getMountObj().getRecord().fs_file)
-        except se.StorageServerAccessPermissionError:
+        else:
             try:
-                self.disconnect()
-            except OSError:
-                self.log.warn("Error while disconnecting after access problem",
-                              exc_info=True)
-            raise
+                fileSD.validateDirAccess(self.getMountObj().getRecord().fs_file)
+            except se.StorageServerAccessPermissionError:
+                try:
+                    self.disconnect()
+                except OSError:
+                    self.log.warn("Error while disconnecting after access"
+                                  "problem", exc_info=True)
+                raise
 
     def isConnected(self):
         return self._mount.isMounted()


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6bcb9774a8e6bd0f6bbfd8768181158a198f4ec7
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan at redhat.com>


More information about the vdsm-patches mailing list