Eduardo has posted comments on this change.
Change subject: improve message when trying to attach import domain with wrong permissions ......................................................................
Patch Set 7: I would prefer that you didn't submit this
(4 inline comments)
.................................................... File vdsm/storage/storageServer.py Line 28: import glob Line 29: from collections import namedtuple Line 30: import misc Line 31: from functools import partial Line 32: from storage_exception import InvalidParameterException, StorageServerAccessPermissionError Please use import exception as se and correct the InvalidParameterException too. Line 33: Line 34: import mount Line 35: import fileSD Line 36: import iscsi
Line 108: """ Line 109: Check that we have access to the path Line 110: """ Line 111: try: Line 112: fileSD.validateDirAccess(path) Please change the exception in validateDirAccess(), and remove this function. Remove the the try catch clauses uses. And please the StorageServerAccessPermissionError change remove the default ''" parameter. Line 113: except OSError as e: Line 114: if e.errno == errno.EACCES: Line 115: raise StorageServerAccessPermissionError(path) Line 116: raise
Line 192: self._mount.mount(self.options, self._vfsType) Line 193: Line 194: try: Line 195: validatePermissions(self.getMountObj().getRecord().fs_file) Line 196: except StorageServerAccessPermissionError: Please try to correct permissions here. Out out the disconnect since it can fails too. Check disconnect policy with Ayal. Line 197: self.disconnect() Line 198: raise Line 199: Line 200: def isConnected(self):
Line 415: def _getLocalPath(self): Line 416: return os.path.join(self.localPathBase, self._path.replace("_", "__").replace("/", "_")) Line 417: Line 418: def checkTarget(self): Line 419: return os.path.exists(self._path) and os.path.isdir(self._path) and validatePermissions(self._path) Please remove redundant is exists() call. Line 420: Line 421: def checkLink(self): Line 422: lnPath = self._getLocalPath() Line 423: if os.path.lexists(lnPath):
-- To view, visit http://gerrit.ovirt.org/7339 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I76880b1445f259431d7aa691eda676e1210308e4 Gerrit-PatchSet: 7 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Oved Ourfali oourfali@redhat.com Gerrit-Reviewer: Ayal Baron abaron@redhat.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Eduardo ewarszaw@redhat.com Gerrit-Reviewer: Oved Ourfali oourfali@redhat.com Gerrit-Reviewer: Shu Ming shuming@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server