Liron Ar has uploaded a new change for review.
Change subject: core: fixing attribute error on fenceSpmStorage
......................................................................
core: fixing attribute error on fenceSpmStorage
In change I75493d1db60e51cccd5231b516f963c970d24c99 the pool metadata
operations were moved to the pool backend, while the call to
invalidateMetadata in fenceSpmStorage was left as it was, leading to an
attribute error.
This patch fixes it by executing the operation on the pool backend object
rather than on the pool, as the metadata operation are implemented only in
StoragePoolDiskBackend - there's also a check for the backend type before
executing it.
Though it's not the nicest way for doing so, it's the pattern already used in
hsm.py,therefore in the meanwhile it can be fixed the same way.
Change-Id: I5ae4c371e2dc97686621ea16b8cef971183a6ab2
Bug-Url:
https://bugzilla.redhat.com/show_bug.cgi?id=1082365
Signed-off-by: Liron Aravot <laravot(a)redhat.com>
---
M vdsm/storage/hsm.py
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/58/26358/1
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 0ebe129..d9697ef 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -3529,7 +3529,8 @@
se.SpmFenceError("spUUID=%s, lastOwner=%s, lastLver=%s" %
(spUUID, lastOwner, lastLver)))
pool = self.getPool(spUUID)
- pool.invalidateMetadata()
+ if isinstance(pool.getBackend(), StoragePoolDiskBackend):
+ pool.getBackend().invalidateMetadata()
vars.task.getExclusiveLock(STORAGE, spUUID)
pool.forceFreeSpm()
return dict(spm_st=self._getSpmStatusInfo(pool))
--
To view, visit
http://gerrit.ovirt.org/26358
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ae4c371e2dc97686621ea16b8cef971183a6ab2
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Liron Ar <laravot(a)redhat.com>