Change in vdsm[master]: Clean /rhev/data-center/mnt/ after failed mount command

ewarszaw at redhat.com ewarszaw at redhat.com
Sun Oct 21 13:44:20 UTC 2012


Eduardo has posted comments on this change.

Change subject: Clean /rhev/data-center/mnt/ after failed mount command
......................................................................


Patch Set 2: Looks good to me, but someone else must approve

(2 inline comments)

....................................................
File vdsm/storage/mount.py
Line 200:         out, err = p.communicate()
Line 201:         rc = p.returncode
Line 202: 
Line 203:         if rc == 0:
Line 204:             return rc
Functions are better when return sensible values.
We left pascal long time ago.
Line 205: 
Line 206:         raise MountError(rc, ";".join((out, err)))
Line 207: 
Line 208:     def umount(self, force=False, lazy=False, timeout=None):


....................................................
File vdsm/storage/storageServer.py
Line 205:         except MountError:
Line 206:             try:
Line 207:                 os.rmdir(self._getLocalPath())
Line 208:             except OSError as e:
Line 209:                 if e.errno != errno.ENOENT:
With the exaggerated tendency to multi-thread may be the dir is already gone. In this case os.rmdir will fail but we will ignore our avatars.
If os.rmdir  failed due to something else we will cry.
Line 210:                     raise
Line 211: 
Line 212:         try:
Line 213:             fileSD.validateDirAccess(self.getMountObj().getRecord().fs_file)


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I91b11d11a6e3402fe40607847ee24b1fb539df22
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken 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>


More information about the vdsm-patches mailing list