Change in vdsm[master]: storageServer: fix connect to detect mount errors

ykaplan at redhat.com ykaplan at redhat.com
Thu Mar 21 13:07:45 UTC 2013


Yeela Kaplan has posted comments on this change.

Change subject: storageServer: fix connect to detect mount errors
......................................................................


Patch Set 2: (3 inline comments)

....................................................
File vdsm/storage/storageServer.py
Line 195:     def connect(self):
Line 196:         if self._mount.isMounted():
Line 197:             return
Line 198: 
Line 199:         try:
Done
Line 200:             os.makedirs(self._getLocalPath())
Line 201:         except OSError as e:
Line 202:             if e.errno != errno.EEXIST:
Line 203:                 raise


Line 205:         try:
Line 206:             self._mount.mount(self.options, self._vfsType)
Line 207:         except MountError as e:
Line 208:             self.log.error("Mount failed: %s", e, exc_info=True)
Line 209:             try:
Done
Line 210:                 os.rmdir(self._getLocalPath())
Line 211:             except OSError as e:
Line 212:                 if e.errno != errno.ENOENT:
Line 213:                     raise


Line 213:                     raise
Line 214: 
Line 215:         else:
Line 216:             try:
Line 217:                 fileSD.validateDirAccess(
fileutils.createdir() behaves exactly the same as: 
try:
    os.makedirs(self._getLocalPath())
except OSError as e:
    if e.errno != errno.EEXIST:
        raise
Line 218:                     self.getMountObj().getRecord().fs_file)
Line 219:             except se.StorageServerAccessPermissionError:
Line 220:                 try:
Line 221:                     self.disconnect()


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I6bcb9774a8e6bd0f6bbfd8768181158a198f4ec7
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list