diff options
author | Vincent Deygas <Vincent.Deygas@rewardgateway.com> | 2015-01-20 09:38:32 +0000 |
---|---|---|
committer | James Shubin <james@shubin.ca> | 2015-01-20 05:56:08 -0500 |
commit | 66ecd6a9035f5209b9a990de9ab1bbd315c7e428 (patch) | |
tree | cb16825121f15434b5e4263632b26e9886ea53bd /manifests/volume.pp | |
parent | 30fda96121c6037e3c4d0855f5fdbb713b618035 (diff) | |
download | puppet-gluster-66ecd6a9035f5209b9a990de9ab1bbd315c7e428.tar.gz puppet-gluster-66ecd6a9035f5209b9a990de9ab1bbd315c7e428.tar.xz puppet-gluster-66ecd6a9035f5209b9a990de9ab1bbd315c7e428.zip |
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
Diffstat (limited to 'manifests/volume.pp')
-rw-r--r-- | manifests/volume.pp | 7 |
1 files 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 |