Changes

Qemu native GlusterFS integration

4,291 bytes added, 13:33, 20 December 2013
/* GlusterFS */
= GlusterFS =
 
'''NOTE: this got implemented in stoney cloud 1.2.10.4 and you should not have to perform the following steps.'''
Since we run Qemu as unprivileged user we have to permit access to GlusterFS from an unprivileged port as well as an unprivileged user.
= Libvirt =
The XML has to be changed only slightly. Following is an example:.
'''current'''<presyntaxhighlight lang='xml'> <disk type='file' device='disk'> <driver name='qemu' type='qcow2' cache='none'/> <source file='/var/virtualization/vm-templates/5b77d2f6-061f-410c-8ee7-9e61da6f1927/f3d87cf9-f7d8-4224-b908-cc9fc6c8fcd4.qcow2'/> <target dev='vda' bus='virtio'/> <alias name='virtio-disk0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/> </disk></syntaxhighlight> '''direct-gluster-access'''<syntaxhighlight lang='xml'>
<disk type='network' device='disk'>
<driver name='qemu' type='qcow2' cache='none'/>
<source protocol='gluster' name='virtualization/vm-templates/5b77d2f6-061f-410c-8ee7-9e61da6f1927/f3d87cf9-f7d8-4224-b908-cc9fc6c8fcd4.qcow2'>
<host name='10.1.120.11'/>
</source>
<target dev='vda' bus='virtio'/>
<alias name='virtio-disk0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
</disk>
</presyntaxhighlightWhat changes:
The changed elements are:
;<code>disk type</code>:has to be <code>network</code> instead of <code>file</code>
;<code>source</code>:has now a <code>protocol</code> and a <code>name</code> instead of a <code>file</code> attribute as well as a new subelement <code>host</code>, where the <code>name</code> is the filename without <code>/var/</code>
 
= LDAP =
== Current ==
<syntaxhighlight lang='ldif'>
dn: sstDisk=vda,ou=devices,sstVirtualMachine=ece1eab1-4a9e-4729-bfc1-59d9f01550a5,ou=virtual machines,ou=virtualization,ou=services,dc=foss-cloud,dc=org
objectclass: top
objectclass: sstVirtualizationVirtualMachineDisk
sstType: file
sstDevice: disk
sstDriverName: qemu
sstDriverType: qcow2
sstDriverCache: none
sstVolumeName: 3aa376a5-6d09-442b-8662-425de888385b
sstSourceFile: /var/virtualization/vm-persistent/0f83f084-8080-413e-b558-b678e504836e/3aa376a5-6d09-442b-8662-425de888385b.qcow2
sstDisk: vda
sstTargetBus: virtio
sstReadonly: FALSE
sstVolumeAllocation: 0
sstVolumeCapacity: 32212254720
</syntaxhighlight>
 
== New ==
<syntaxhighlight lang='ldif'>
dn: sstDisk=vda,ou=devices,sstVirtualMachine=ece1eab1-4a9e-4729-bfc1-59d9f01550a5,ou=virtual machines,ou=virtualization,ou=services,dc=foss-cloud,dc=org
objectclass: top
objectclass: sstVirtualizationVirtualMachineDisk
sstType: network -> instead of file
sstDevice: disk
sstDriverName: qemu
sstDriverType: qcow2
sstDriverCache: none
sstVolumeName: 3aa376a5-6d09-442b-8662-425de888385b
sstSourceProtocol: gluster -> new
sstSourceName: virtualization/vm-persistent/0f83f084-8080-413e-b558-b678e504836e/3aa376a5-6d09-442b-8662-425de888385b.qcow2 -> new attribute
sstSourceHostName: 10.1.120.11 -> new and multi-valued attribute (for later use, currently, only one entry is supported)
sstDisk: vda
sstTargetBus: virtio
sstReadonly: FALSE
sstVolumeAllocation: 0
sstVolumeCapacity: 32212254720
</syntaxhighlight>
 
== Notes for Configuration in LDAP ==
=== Persistent Storage Pool ===
<syntaxhighlight lang='ldif'>
sstStoragePool=0f83f084-8080-413e-b558-b678e504836e,ou=storage pools,ou=virtualization,ou=services,o=stepping-stone,c=ch
</syntaxhighlight>
 
==== file ====
<syntaxhighlight lang='ldif'>
sstStoragePoolURI: file:///var/virtualization/vm-persistent/0f83f084-8080-413e-b558-b678e504836e
</syntaxhighlight>
 
==== gluster ====
<syntaxhighlight lang='ldif'>
sstStoragePoolURI: gluster:///tier1-storage-node-01/gv-tier1-vm-01/vm-persistent/0f83f084-8080-413e-b558-b678e504836e
</syntaxhighlight>
 
=== Questions / Open Issues ===
* Where do we store the following configuration values?
** Possible storage pool types: file, gluster (others could follow)
** Host names or ip addresses (in case of gluster): tier1-storage-node-01
** Mount point: /var/virtualization/vm-persistent/ or /gv-tier1-vm-01/vm-persistent/
** Storage Pool Names: 0f83f084-8080-413e-b558-b678e504836e
** Where and how to we store the information, that we have slow and fast storage?
= Test =
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x7
</pre>
 
= Troubleshooting =
 
== Qemu hang ==
 
Should Qemu hang after start, check the brick logfile (in our default setup this would be <code>/var/log/glusterfs/bricks/var-data-gluster-volume-01.log</code>) for the following entries:
<pre>
[2013-08-04 11:02:34.022328] E [addr.c:152:gf_auth] 0-auth/addr: client is bound to port 50037 which is not privileged
[2013-08-04 11:02:34.022362] E [authenticate.c:239:gf_authenticate] 0-auth: no authentication module is interested in accepting remote-client (null)
[2013-08-04 11:02:34.022410] E [server-handshake.c:578:server_setvolume] 0-virtualization-server: Cannot authenticate client from foss-cloud-node-01-12502-2013/08/04-11:02:33:989625-virtualization-clie
nt-1-0 3.4.0
</pre>
This means that one of the configuration options from above didn't work and/or you forgot to restart <code>glusterd</code> or the volume.
= Caveats =
At the moment it is not possible to specify more than one server.
 
== libvirt integration ==
 
Libvirt is supposed to be able to create images on a GlusterFS. But a storage pool must be set up first with the appropriate configuration.
[[Category:Snippets]]
Bureaucrat, administrator
425
edits