Federico Simoncelli has uploaded a new change for review.
Change subject: hsm: remove master info from getStorageDomainInfo
......................................................................
hsm: remove master info from getStorageDomainInfo
Bug-Url:
https://bugzilla.redhat.com/show_bug.cgi?id=1033942
Change-Id: I8c046db3884b56b57cc1bf040f3e9cc136c6d877
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
---
M vdsm/storage/hsm.py
1 file changed, 1 insertion(+), 36 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/24/22824/1
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 6f4e3c4..99a7389 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -2712,42 +2712,7 @@
# getSharedLock(connectionsResource...)
vars.task.getSharedLock(STORAGE, sdUUID)
- info = dom.getInfo()
- # This only occurred because someone
- # thought it would be clever to return pool
- # information in the domain.getInfo() method
- # In a perfect world I would have just stopped
- # giving this information in the response.
- # This, of-course breaks backward compatibility.
- # These keys are not likely to change (also because of
- # BC) so it's not that horrible. In any case please
- # remove this when we can stop supporting this API.
- info.update({'lver': -1, 'spm_id': -1, 'master_ver': 0})
- if info['role'] == sd.MASTER_DOMAIN:
- try:
- # Verify that the host is connected to the same pool which
- # the SD is attached to.
- pool = self.getPool(info['pool'][0])
- except IndexError:
- self.log.error("Domain %s is marked as master but is not "
- "attached to any pool", sdUUID)
- except se.StoragePoolUnknown:
- current = self.pools.keys()[0].spUUID if self.pools else None
- self.log.error("Domain %s, marked as master, is attached to "
- "pool %s but this host is connected to pool
%s",
- sdUUID, info['pool'], current, exc_info=True)
- else:
- # make sure it's THE master of this pool
- if pool.masterDomain.sdUUID != sdUUID:
- self.log.warn("Domain %s is marked as master but actual "
- "master is %s",
- sdUUID, pool.masterDomain.sdUUID)
- else:
- poolInfo = pool.getInfo()
- for key in ('lver', 'spm_id', 'master_ver'):
- info[key] = poolInfo[key]
-
- return dict(info=info)
+ return dict(info=dom.getInfo())
@public
def getStorageDomainStats(self, sdUUID, options=None):
--
To view, visit
http://gerrit.ovirt.org/22824
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8c046db3884b56b57cc1bf040f3e9cc136c6d877
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>