Change in vdsm[master]: improve message when trying to attach import domain with wro...

abaron at redhat.com abaron at redhat.com
Sun Aug 26 09:36:05 UTC 2012


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 at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Eduardo <ewarszaw at redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali at redhat.com>
Gerrit-Reviewer: Shu Ming <shuming at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list