From b0f905c751ded462c1c4400c3a7c1d1513608a5b Mon Sep 17 00:00:00 2001 From: James Shubin Date: Thu, 23 Jan 2014 19:27:16 -0500 Subject: Add support for specifying the base-port option in glusterd.vol See: https://bugzilla.redhat.com/show_bug.cgi?id=987555 for info. --- manifests/server.pp | 7 ++++++- manifests/simple.pp | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'manifests') diff --git a/manifests/server.pp b/manifests/server.pp index 247f4d4..c306f22 100644 --- a/manifests/server.pp +++ b/manifests/server.pp @@ -22,6 +22,7 @@ class gluster::server( $version = '', # pick a specific version (defaults to latest) $vrrp = false, $password = '', # global vrrp password to use + $baseport = '', # specify base port option as used in glusterd.vol file $shorewall = false, $zone = 'net', # TODO: allow a list of zones $ips = false, # an optional list of ip's for each in hosts[] @@ -71,8 +72,12 @@ class gluster::server( require => Package['glusterfs-server'], } + # NOTE: this option can be useful for users of libvirt migration as in: + # https://bugzilla.redhat.com/show_bug.cgi?id=987555 + $valid_baseport = inline_template('<%= [Fixnum, String].include?(@baseport.class) ? @baseport.to_i : 0 %>') + file { '/etc/glusterfs/glusterd.vol': - content => template('gluster/glusterd.vol.erb'), # NOTE: currently no templating is being done + content => template('gluster/glusterd.vol.erb'), owner => root, group => root, mode => 644, # u=rw,go=r diff --git a/manifests/simple.pp b/manifests/simple.pp index 2078c85..44ec2c6 100644 --- a/manifests/simple.pp +++ b/manifests/simple.pp @@ -25,6 +25,7 @@ class gluster::simple( $version = '', $vrrp = false, $password = '', # global vrrp password to use + $baseport = '', # specify base port option as used in glusterd.vol file $shorewall = true ) { include gluster::vardir @@ -66,6 +67,7 @@ class gluster::simple( version => "${version}", vrrp => $vrrp, password => "${password}", + baseport => $baseport, #zone => 'net', # defaults to net shorewall => $shorewall, } -- cgit