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

ewarszaw at redhat.com ewarszaw at redhat.com
Sun Feb 17 08:49:14 UTC 2013


Eduardo has posted comments on this change.

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


Patch Set 2: I would prefer that you didn't submit this

(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:
Use fileutils.createdir() instead.
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:
Please remove this try clause. There is no any reason to assume here that ENOENT is ok here. Nobody should fiddle with the mount point during this thread mount porcess.
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(
The necessity for this check should be reconsidered if fileutils.createdir() was used.
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