Ayal Baron has posted comments on this change.
Change subject: wip vdsm: improve message when trying to attach import domain with wrong permissions (#842146) ......................................................................
Patch Set 4: I would prefer that you didn't submit this
(4 inline comments)
+1 for nfs/posix logic. -1 for lacking same in local
.................................................... File vdsm/storage/storageServer.py Line 113: except OSError as e: Line 114: if e.errno == errno.EACCES: Line 115: raise StorageServerAccessPermissionError(path) Line 116: raise Line 117: return no need for 'return' Line 118: Line 119: class ExampleConnection(object): Line 120: """Do not inherit from this object it is just to show and document the Line 121: connection object interface"""
Line 193: Line 194: if self.isConnected(): Line 195: try: Line 196: validatePermissions(self.getMountObj().getRecord().fs_file) Line 197: except StorageServerAccessPermissionError as ex: no need for as Line 198: self.disconnect() Line 199: raise ex Line 200: Line 201: def isConnected(self):
Line 195: try: Line 196: validatePermissions(self.getMountObj().getRecord().fs_file) Line 197: except StorageServerAccessPermissionError as ex: Line 198: self.disconnect() Line 199: raise ex no need for 'ex' Line 200: Line 201: def isConnected(self): Line 202: return self._mount.isMounted() Line 203:
Line 416: def _getLocalPath(self): Line 417: return os.path.join(self.localPathBase, self._path.replace("_", "__").replace("/", "_")) Line 418: Line 419: def checkTarget(self): Line 420: return os.path.exists(self._path) and os.path.isdir(self._path) need to validate permissions here. need to verify that vdsm cannot only write but can also delete the directory Line 421: Line 422: def checkLink(self): Line 423: lnPath = self._getLocalPath() Line 424: 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: 4 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