Ala Hino has uploaded a new change for review.
Change subject: virt: enable libgfapi
......................................................................
virt: enable libgfapi
This change is based on Federico's changes:
https://gerrit.ovirt.org/33768/
Change-Id: I54b81e87b959b0b49c0f06810f88410e7c75de1d
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
Signed-off-by: Ala Hino <ahino(a)redhat.com>
---
M vdsm/storage/glusterVolume.py
M vdsm/storage/hsm.py
M vdsm/virt/vm.py
3 files changed, 22 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/61/44061/1
diff --git a/vdsm/storage/glusterVolume.py b/vdsm/storage/glusterVolume.py
index 8f701ba..109d1c9 100644
--- a/vdsm/storage/glusterVolume.py
+++ b/vdsm/storage/glusterVolume.py
@@ -54,4 +54,5 @@
return {'volType': VmVolumeInfo.TYPE_NETWORK, 'path':
glusterPath,
'protocol': 'gluster', 'volPort': volPort,
'volTransport': volTrans,
- 'volfileServer': volfileServer}
+ 'volfileServer': volfileServer,
+ 'bricks': volInfo[volname]['bricks']}
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index f68d3bb..109cdfa 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -3209,8 +3209,7 @@
path = os.path.join(dom.domaindir, sd.DOMAIN_IMAGES, imgUUID,
volUUID)
volInfo = {'domainID': sdUUID, 'imageID': imgUUID,
- 'volumeID': volUUID, 'path': path,
- 'volType': "path"}
+ 'volumeID': volUUID, 'path': path}
leasePath, leaseOffset = dom.getVolumeLease(imgUUID, volUUID)
@@ -3221,8 +3220,8 @@
})
imgVolumesInfo.append(volInfo)
- if volUUID == leafUUID:
- leafInfo = volInfo
+
+ leafInfo = dom.produceVolume(imgUUID, leafUUID).getVmVolumeInfo()
return {'path': leafPath, 'info': leafInfo,
'imgVolumesInfo': imgVolumesInfo}
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 71a74b3..2976f3b 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -805,6 +805,23 @@
# A destroy request has been issued, exit early
break
drive['path'] = self.cif.prepareVolumePath(drive, self.id)
+ if drive.get('diskType') == DISK_TYPE.NETWORK:
+ volinfo = drive.get('volumeInfo')
+ drive['path'] = volinfo['path']
+ drive['protocol'] = volinfo['protocol']
+ if drive.get('hosts') is None:
+ """
+ THIS CODE COMMENTED OUT DUE TO A BUG IN LIBVIRT,
+ CANNOT WORK WITH MULTIPLE HOSTS
+ """
+ """
+ hosts = [dict(name=brick.split(":")[0],
+ port='0', transport='tcp')
+ for brick in volinfo['bricks']]
+ """
+ hosts =
[dict(name=volinfo['bricks'][0].split(":")[0],
+ port='0', transport='tcp')]
+ drive['hosts'] = hosts
else:
# Now we got all the resources we needed
--
To view, visit
https://gerrit.ovirt.org/44061
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I54b81e87b959b0b49c0f06810f88410e7c75de1d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ala Hino <ahino(a)redhat.com>