summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Shubin <james@shubin.ca>2014-03-11 18:33:40 -0400
committerJames Shubin <james@shubin.ca>2014-03-16 22:39:08 -0400
commit7102088482559af60549fcce6194d3365c0605ad (patch)
treee64c4421b66f85d3ecdbbeb3c6fa1a8cc0261a21
parente367d108216a0b97c9fd201317fd2e6390845d66 (diff)
downloadpuppet-gluster-7102088482559af60549fcce6194d3365c0605ad.tar.gz
puppet-gluster-7102088482559af60549fcce6194d3365c0605ad.tar.xz
puppet-gluster-7102088482559af60549fcce6194d3365c0605ad.zip
Silence unnecessary warnings if we know they're unnecessary.
-rw-r--r--manifests/brick.pp7
1 files changed, 5 insertions, 2 deletions
diff --git a/manifests/brick.pp b/manifests/brick.pp
index e68a4c8..d753d5f 100644
--- a/manifests/brick.pp
+++ b/manifests/brick.pp
@@ -78,8 +78,11 @@ define gluster::brick(
# TODO: check inputs for sanity and auto-detect if one is empty
# TODO: maybe we can detect these altogether from the raid set!
if "${raid_su}" == '' and "${raid_sw}" == '' {
- if $lvm or "${fstype}" == 'xfs' {
- warning('Setting $raid_su and $raid_sw is recommended.')
+ # if we are not using a real device, we should ignore warnings!
+ if type($dev) != 'boolean' { # real devices!
+ if $lvm or "${fstype}" == 'xfs' {
+ warning('Setting $raid_su and $raid_sw is recommended.')
+ }
}
} elsif "${raid_su}" != '' and "${raid_sw}" != '' {
# ensure both are positive int's !