summaryrefslogtreecommitdiffstats
path: root/manifests/brick.pp
diff options
context:
space:
mode:
authorJames Shubin <james@shubin.ca>2014-04-03 17:53:49 -0400
committerJames Shubin <james@shubin.ca>2014-04-10 17:21:23 -0400
commitc1e6e037316d9e6b2027f2051d8dfe1102b1b3d1 (patch)
treef424db69d0ce3efc1c16b51c6ca5563a8f7de2e6 /manifests/brick.pp
parent117ac5c4f57708e76dd0ebc3a00a33d4861835bc (diff)
downloadpuppet-gluster-c1e6e037316d9e6b2027f2051d8dfe1102b1b3d1.tar.gz
puppet-gluster-c1e6e037316d9e6b2027f2051d8dfe1102b1b3d1.tar.xz
puppet-gluster-c1e6e037316d9e6b2027f2051d8dfe1102b1b3d1.zip
Allow raid_su and raid_sw to be blank, even if it is not recommended.
There could be some cases when you want to omit these choices. Bug reported by Gilles Dubreuil.
Diffstat (limited to 'manifests/brick.pp')
-rw-r--r--manifests/brick.pp10
1 files changed, 8 insertions, 2 deletions
diff --git a/manifests/brick.pp b/manifests/brick.pp
index a44ce2e..2fb3cae 100644
--- a/manifests/brick.pp
+++ b/manifests/brick.pp
@@ -166,7 +166,10 @@ define gluster::brick(
$lvm_dataalignment = inline_template('<%= @raid_su.to_i*@raid_sw.to_i %>')
- $lvm_pvcreate = "/sbin/pvcreate --dataalignment ${lvm_dataalignment}K ${dev1}"
+ $lvm_pvcreate = "${raid_su}${raid_sw}" ? { # both empty ?
+ '' => "/sbin/pvcreate ${dev1}",
+ default => "/sbin/pvcreate --dataalignment ${lvm_dataalignment}K ${dev1}",
+ }
$lvm_vgcreate = "/sbin/vgcreate ${lvm_vgname} ${dev1}"
@@ -241,7 +244,10 @@ define gluster::brick(
# system. These options are sometimes auto-detected but manual
# configuration is needed with many of the hardware RAID
# volumes.
- $xfs_arg05 = "-d su=${raid_su}k,sw=${raid_sw}"
+ $xfs_arg05 = "${raid_su}${raid_sw}" ? { # both empty ?
+ '' => '',
+ default => "-d su=${raid_su}k,sw=${raid_sw}",
+ }
$xfs_cmdlist = [
"${xfs_arg00}",