Hello Sandro Bonazzola, Ewoud Kohl van Wijngaarden, Eduardo,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/21151
to review the following change.
Change subject: gluster prepareImage: return gluster-specific information
......................................................................
gluster prepareImage: return gluster-specific information
Since the introduction of gLuster storage domains (1d90895cdda8,
committed 9 months ago), prepareImage returns an additional element
beyond the path to the leaf: a dictionary keyed by "info", carrying
gluster-specific information.
This dictionary has been dropped by a recent refactoring of prepareImage
since the computation of its contents assumes that the leaf volume is
part of a storage pool, and this is harmful to the "Hosted Engine"
effort.
This patch re-introduces the lost functionality, in the price of a
redundant production of a volume. To make this a little less expensive
and harmful to HE, we limit the production to gluster volumes.
This patch is not the child we've prayed for, but it works.
Special thanks to Samuli Heinonen <[email protected]> for reporting
the bug and testing this patch.
Bug-Url: https://bugzilla.redhat.com/1022961
Change-Id: If9a8fbf2baafa1f9bfc3677b1301c7934ca74651
Signed-off-by: Dan Kenigsberg <[email protected]>
Signed-off-by: Eduardo Warszawski <[email protected]>
Reviewed-on: http://gerrit.ovirt.org/21059
Reviewed-by: Ewoud Kohl van Wijngaarden <[email protected]>
Reviewed-by: Sandro Bonazzola <[email protected]>
---
M vdsm/storage/hsm.py
1 file changed, 7 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/51/21151/1
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 1307699..7d3a5d4 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -3246,7 +3246,7 @@
volUUID)
volInfo = {'domainID': sdUUID, 'imageID': imgUUID,
'volumeID': volUUID, 'path': path,
- 'volType': "path"}
+ }
leasePath, leaseOffset = dom.getVolumeLease(imgUUID, volUUID)
@@ -3257,10 +3257,13 @@
})
imgVolumesInfo.append(volInfo)
- if volUUID == leafUUID:
- leafInfo = volInfo
- return {'path': leafPath, 'info': leafInfo,
+ if isinstance(dom.getRealDomain(), glusterSD.GlusterStorageDomain):
+ ginfo = dom.produceVolume(imgUUID, volUUID).getVmVolumeInfo()
+ else:
+ ginfo = {'volType': 'path'}
+
+ return {'path': leafPath, 'info': ginfo,
'imgVolumesInfo': imgVolumesInfo}
@public
--
To view, visit http://gerrit.ovirt.org/21151
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If9a8fbf2baafa1f9bfc3677b1301c7934ca74651
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.3
Gerrit-Owner: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Eduardo <[email protected]>
Gerrit-Reviewer: Ewoud Kohl van Wijngaarden <[email protected]>
Gerrit-Reviewer: Sandro Bonazzola <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches