2 # == Class: cinder::backend::glusterfs
4 # Configures Cinder to use GlusterFS as a volume driver
9 # (required) An array of GlusterFS volume locations.
10 # Must be an array even if there is only one volume.
12 # [*volume_backend_name*]
13 # (optional) Allows for the volume_backend_name to be separate of $name.
16 # [*glusterfs_disk_util*]
17 # Removed in Icehouse.
19 # [*glusterfs_sparsed_volumes*]
20 # (optional) Whether or not to use sparse (thin) volumes.
21 # Defaults to undef which uses the driver's default of "true".
23 # [*glusterfs_mount_point_base*]
24 # (optional) Where to mount the Gluster volumes.
25 # Defaults to undef which uses the driver's default of "$state_path/mnt".
27 # [*glusterfs_shares_config*]
28 # (optional) The config file to store the given $glusterfs_shares.
29 # Defaults to '/etc/cinder/shares.conf'
33 # cinder::backend::glusterfs { 'myGluster':
34 # glusterfs_shares = ['192.168.1.1:/volumes'],
37 define cinder::backend::glusterfs (
39 $volume_backend_name = $name,
40 $glusterfs_disk_util = false,
41 $glusterfs_sparsed_volumes = undef,
42 $glusterfs_mount_point_base = undef,
43 $glusterfs_shares_config = '/etc/cinder/shares.conf'
46 if $glusterfs_disk_util {
47 fail('glusterfs_disk_util is removed in Icehouse.')
50 $content = join($glusterfs_shares, "\n")
52 file { $glusterfs_shares_config:
53 content => "${content}\n",
54 require => Package['cinder'],
55 notify => Service['cinder-volume']
59 "${name}/volume_backend_name": value => $volume_backend_name;
60 "${name}/volume_driver": value =>
61 'cinder.volume.drivers.glusterfs.GlusterfsDriver';
62 "${name}/glusterfs_shares_config": value => $glusterfs_shares_config;
63 "${name}/glusterfs_sparsed_volumes": value => $glusterfs_sparsed_volumes;
64 "${name}/glusterfs_mount_point_base": value => $glusterfs_mount_point_base;