From 5cafead14809d1773a9536a71b16d5a7e4ce58ba Mon Sep 17 00:00:00 2001 From: Georges Bossert Date: Thu, 19 Feb 2015 15:33:41 +0100 Subject: [PATCH] Update 'unless' condition before triggering a glusterfs volume startup. IMHO, previous 'unless' statement was ineffective to prevent successive attempts of volume startup leading to multiple log entries. --- manifests/volume.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/volume.pp b/manifests/volume.pp index 7a6ae2b..a7752ae 100644 --- a/manifests/volume.pp +++ b/manifests/volume.pp @@ -18,7 +18,7 @@ } exec { "/usr/sbin/gluster volume start ${title}": - unless => "[ \"`gluster volume info ${title} | egrep '^Status:'`\" = 'Status: Started' ]", + unless => "gluster volume info ${title} | grep '^Status: Started' > /dev/null", path => [ '/usr/sbin', '/usr/bin', '/sbin', '/bin' ], require => Exec["gluster volume create ${title}"], }