Change in vdsm[master]: hsm.py: Deprecate setStoragePoolDescription

amureini at redhat.com amureini at redhat.com
Fri Apr 8 10:38:43 UTC 2016


Allon Mureinik has uploaded a new change for review.

Change subject: hsm.py: Deprecate setStoragePoolDescription
......................................................................

hsm.py: Deprecate setStoragePoolDescription

Since the removal of 3.4 cluster support
(see commit 23650fb), the setStoragePoolDescription call has become
pointless. With a memory backend (used in 3.5 clusters) that does not
persist anything, it doesn't really do anything besides waste CPU
cycles. Since this version of VDSM can no longer be part of a cluster
that uses the disk backend, there's no flow where this call actually
does something useful, this patch hollows out the function to a simple
pass call and makes its deprecation explicit.

Unfortunately, 3.5 engines still call this function, so it cannot be
completely removed yet. Once the support for that engine's version will
be removed, this method can be removed altogether.

Change-Id: I5ce0c9f94a13a8b23712055d2bf14b91044058c7
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M vdsm/storage/hsm.py
1 file changed, 5 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/58/55858/1

diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 0b1c284..a92e006 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -1221,25 +1221,15 @@
         pool = self.getPool(spUUID)
         pool.activateSD(sdUUID)
 
+    @deprecated
     @public
     def setStoragePoolDescription(self, spUUID, description, options=None):
         """
-        Sets the storage pool's description.
-
-        :param spUUID: The UUID of the storage pool that you want to set it's
-                       description.
-        :type spUUID: UUID
-        :param description: A human readable description of the storage pool.
-        :type description: str
-        :param options: ?
+        Deprecated, as the storage pool's metadata is no longer persisted.
+        When the support for 3.5 clusters is removed, this version can also be
+        deleted.
         """
-        vars.task.setDefaultException(
-            se.StoragePoolActionError(
-                "spUUID=%s, descr=%s" % (spUUID, description)))
-        vars.task.getExclusiveLock(STORAGE, spUUID)
-        pool = self.getPool(spUUID)
-        if isinstance(pool.getBackend(), StoragePoolDiskBackend):
-            pool.getBackend().setDescription(description)
+        pass
 
     @public
     def setVolumeDescription(self, sdUUID, spUUID, imgUUID, volUUID,


-- 
To view, visit https://gerrit.ovirt.org/55858
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ce0c9f94a13a8b23712055d2bf14b91044058c7
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini at redhat.com>


More information about the vdsm-patches mailing list