Vered Volansky has posted comments on this change. Change subject: vdsm: propagate MountError when mount fails ......................................................................
Patch Set 4: (3 inline comments) .................................................... Commit Message Line 7: vdsm: propagate MountError when mount fails Line 8: Line 9: When mount fails the MountError is not propagated, causing an error when Line 10: getRecord() in mount.py is called. getRecord() shouldn't be reached Line 11: after the MountError to begin with. This fix now re-razes the previously Will fix to razes typo in next commit. Line 12: swallowed MountError, sending the right error code to the engine. Line 13: Line 14: Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=883877 Line 15: Change-Id: I0f36b3ea18690d7cf53439e5a0342b1495f4f181 .................................................... File vdsm/storage/storageServer.py Line 205: except OSError as e: Line 206: if e.errno != errno.EEXIST: Line 207: raise Line 208: Line 209: try: I disagree. This patch fixes a specific bug, while 12042 sounds like (from commit message) "lets make things more beautiful" and is unrelated to the bug this patch should fix. Not in comment and not in bug url existence. Line 210: self._mount.mount(self.options, self._vfsType) Line 211: except MountError as e: Line 212: try: Line 213: os.rmdir(self._getLocalPath()) Line 211: except MountError as e: Line 212: try: Line 213: os.rmdir(self._getLocalPath()) Line 214: except OSError: Line 215: pass In general this is true, yet here we would like to remove the directory should the mount fail on the one hand, and reflect the true problem in the connect function on the other. We don't really care whether the removal of the directory succeeded or not, yet we want to true cause of the problem to be propagated. Line 216: raise e Line 217: Line 218: try: Line 219: fileSD.validateDirAccess(self.getMountObj().getRecord().fs_file) -- To view, visit http://gerrit.ovirt.org/10966 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I0f36b3ea18690d7cf53439e5a0342b1495f4f181 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Vered Volansky <[email protected]> Gerrit-Reviewer: Ayal Baron <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Eduardo <[email protected]> Gerrit-Reviewer: Federico Simoncelli <[email protected]> Gerrit-Reviewer: Saggi Mizrahi <[email protected]> Gerrit-Reviewer: Shu Ming <[email protected]> Gerrit-Reviewer: Vered Volansky <[email protected]> Gerrit-Reviewer: oVirt Jenkins CI Server _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
