Ayal Baron has posted comments on this change.
Change subject: improve message when trying to attach import domain with wrong permissions ......................................................................
Patch Set 8: I would prefer that you didn't submit this
(2 inline comments)
.................................................... File vdsm/storage/storage_exception.py Line 916: " access to the storage. Verify permission settings."\ Line 917: " Cause: %s." Line 918: def __init__(self, targetPath, cause): Line 919: self.value = targetPath Line 920: self.value = cause this is a bug (you're overriding 'value' with cause after setting it with targetPath).
vdsm deliberately does not support dynamic exceptions due to support of localization in engine. Simplest would probably be to add an exception: StorageServerAccessOwnershipError Line 921: self.message = self.message % (targetPath, cause) Line 922: Line 923: class MountTypeError(StorageException): Line 924: code = 470
.................................................... File vdsm/storage/storageServer.py Line 181: Line 182: try: Line 183: validatePermissions(self.getMountObj().getRecord().fs_file) Line 184: except StorageServerAccessPermissionError: Line 185: self.disconnect() disconnect should be in try...catch clause otherwise an exception there would mask the real problem here. Line 186: raise Line 187: Line 188: def isConnected(self): Line 189: return self._mount.isMounted()
-- 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: 8 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