Simone Tiraboschi has uploaded a new change for review. Change subject: hsm: use activateStorageDomain just to refresh it if SP=BLANCK ......................................................................
hsm: use activateStorageDomain just to refresh it if SP=BLANCK In order to use a block device SD not connected to any SP is still necessary to have it linked under /rhev/data-center/mnt/blockSD/ Use activateStorageDomain with spUUID=BLANK_UUID to achieve that. Change-Id: I81ff996d61ded495a39e90465eb5ae538070b8dd Bug-Url: https://bugzilla.redhat.com/1258465 Signed-off-by: Simone Tiraboschi <[email protected]> --- M vdsm/storage/hsm.py 1 file changed, 9 insertions(+), 4 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/75/46375/1 diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py index 397c95a..6fc49b4 100644 --- a/vdsm/storage/hsm.py +++ b/vdsm/storage/hsm.py @@ -1244,6 +1244,7 @@ def activateStorageDomain(self, sdUUID, spUUID, options=None): """ Activates a storage domain that is already a member in a storage pool. + Just refresh it if spUUID == BLANK_UUID :param sdUUID: The UUID of the storage domain that you want to activate. @@ -1257,10 +1258,14 @@ se.StorageDomainActionError( "sdUUID=%s, spUUID=%s" % (sdUUID, spUUID))) - vars.task.getExclusiveLock(STORAGE, spUUID) - vars.task.getExclusiveLock(STORAGE, sdUUID) - pool = self.getPool(spUUID) - pool.activateSD(sdUUID) + if spUUID == sd.BLANK_UUID: + vars.task.getExclusiveLock(STORAGE, sdUUID) + sdCache.produce(sdUUID=sdUUID).refresh() + else: + vars.task.getExclusiveLock(STORAGE, spUUID) + vars.task.getExclusiveLock(STORAGE, sdUUID) + pool = self.getPool(spUUID) + pool.activateSD(sdUUID) @public def setStoragePoolDescription(self, spUUID, description, options=None): -- To view, visit https://gerrit.ovirt.org/46375 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I81ff996d61ded495a39e90465eb5ae538070b8dd Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Simone Tiraboschi <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
