From 7102088482559af60549fcce6194d3365c0605ad Mon Sep 17 00:00:00 2001 From: James Shubin Date: Tue, 11 Mar 2014 18:33:40 -0400 Subject: Silence unnecessary warnings if we know they're unnecessary. --- manifests/brick.pp | 7 +++++-- 1 file 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 ! -- cgit