Change in vdsm[master]: wip vdsm: improve message when trying to attach import domai...
Oved Ourfali 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: (1 inline comment) File vdsm/storage/storageServer.py 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) Currently, the validateDirAccess function checks for os.R_OK and os.X_OK. Weird that it doesn't check for W_OK. Changing it will effect all locations that use it, but it seems right, as we obviously need write permissions there, right? 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 oourf...@redhat.com Gerrit-Reviewer: Ayal Baron aba...@redhat.com Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com Gerrit-Reviewer: Eduardo ewars...@redhat.com Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com Gerrit-Reviewer: Shu Ming shum...@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: wip vdsm: improve message when trying to attach import domai...
Oved Ourfali 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: New version uses a different approach, and return the error in the connectStorageServer (that calls MountConnection--connect function). The UI returns There is no storage domain under the specified path. Please check path. - in red letters, in the import dialog. An event saying a permissions problem has happened is created, so the user can see it in the UI. -- 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 oourf...@redhat.com Gerrit-Reviewer: Ayal Baron aba...@redhat.com Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com Gerrit-Reviewer: Eduardo ewars...@redhat.com Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com Gerrit-Reviewer: Shu Ming shum...@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: wip vdsm: improve message when trying to attach import domai...
oVirt Jenkins CI Server 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: Build Successful http://jenkins.ovirt.info/job/patch_vdsm_unit_tests/585/ : SUCCESS -- 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 oourf...@redhat.com Gerrit-Reviewer: Ayal Baron aba...@redhat.com Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com Gerrit-Reviewer: Eduardo ewars...@redhat.com Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com Gerrit-Reviewer: Shu Ming shum...@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: wip vdsm: improve message when trying to attach import domai...
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 oourf...@redhat.com Gerrit-Reviewer: Ayal Baron aba...@redhat.com Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com Gerrit-Reviewer: Eduardo ewars...@redhat.com Gerrit-Reviewer: Oved Ourfali oourf...@redhat.com Gerrit-Reviewer: Shu Ming shum...@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches