From 66ecd6a9035f5209b9a990de9ab1bbd315c7e428 Mon Sep 17 00:00:00 2001 From: Vincent Deygas Date: Tue, 20 Jan 2015 09:38:32 +0000 Subject: Used `--mode-script` option for "volume stop" command Workaround for : "Stopping volume make its data inaccessible. Do you want to continue? (y/n)" See https://access.redhat.com/documentation/en-US/Red_Hat_Storage/2.0/html/Installation_Guide/ch08.html --- manifests/volume.pp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/manifests/volume.pp b/manifests/volume.pp index b203482..69ca38c 100644 --- a/manifests/volume.pp +++ b/manifests/volume.pp @@ -319,11 +319,10 @@ define gluster::volume( } elsif ( $start == false ) { # try to stop volume if running # NOTE: this will still succeed even if a client is mounted - # NOTE: This uses `yes` to workaround the: Stopping volume will + # NOTE: This uses `--mode-script` to workaround the: Stopping volume will # make its data inaccessible. Do you want to continue? (y/n) - # TODO: http://community.gluster.org/q/how-can-i-make-automatic-scripts/ - # TODO: gluster --mode=script volume stop ... - exec { "/usr/bin/yes | ${::gluster::params::program_gluster} volume stop ${name}": + # https://access.redhat.com/documentation/en-US/Red_Hat_Storage/2.0/html/Installation_Guide/ch08.html + exec { "${::gluster::params::program_gluster} --mode=script volume stop ${name}": logoutput => on_failure, onlyif => "${::gluster::params::program_gluster} volume status ${name}", # returns true if started require => $settled ? { # require if type exists -- cgit