diff options
author | Jack Peterson <jack.peterson@gmail.com> | 2015-03-09 21:18:21 -0700 |
---|---|---|
committer | Jack Peterson <jack.peterson@gmail.com> | 2015-03-09 21:35:40 -0700 |
commit | 981ff7ed49a5a5a7809216a14e2a4bacb222bce3 (patch) | |
tree | 55011af593df55662266b9c09e0f25009fce5553 | |
parent | ae24ecc28844404ff3b29ff80230a1564485b2b8 (diff) | |
download | puppet-gluster-981ff7ed49a5a5a7809216a14e2a4bacb222bce3.tar.gz puppet-gluster-981ff7ed49a5a5a7809216a14e2a4bacb222bce3.tar.xz puppet-gluster-981ff7ed49a5a5a7809216a14e2a4bacb222bce3.zip |
Add nofail and nobootwait for respective OSes
The purpose of this PR is to allow failed fstab entries to not cause an
OS to hang on boot. This is particularly problematic on cloud providers
like AWS where there is not a quick way to manage an instance and select
a skip option prior to SSH access becoming available.
-rw-r--r-- | data/params/Debian.yaml | 4 | ||||
-rw-r--r-- | manifests/brick.pp | 6 | ||||
-rw-r--r-- | manifests/params.pp | 3 |
3 files changed, 10 insertions, 3 deletions
diff --git a/data/params/Debian.yaml b/data/params/Debian.yaml index 1c051bc..d0e2a9b 100644 --- a/data/params/Debian.yaml +++ b/data/params/Debian.yaml @@ -14,4 +14,8 @@ gluster::params::program_fping: '/usr/bin/fping' gluster::params::program_awk: '/usr/bin/awk' # TODO: the debian family of glusterd needs a reload command in the init file ! gluster::params::misc_gluster_reload: '/usr/sbin/service glusterfs-server restart' + +# Debian based OS use nobootwait whereas Fedora based OS use nofail. +gluster::params::misc_mount_nofail: 'nobootwait' + # vim: ts=8 diff --git a/manifests/brick.pp b/manifests/brick.pp index 371be49..4ebdcb1 100644 --- a/manifests/brick.pp +++ b/manifests/brick.pp @@ -340,7 +340,7 @@ define gluster::brick( default => '', } - $options_list = ["${option01}", "${option02}"] + $options_list = ["${option01}", "${option02}","${::gluster::params::misc_mount_nofail}"] } elsif ( $valid_fstype == 'ext4' ) { # exec requires @@ -351,7 +351,7 @@ define gluster::brick( $mkfs_exec = "${::gluster::params::program_mkfs_ext4} -U '${valid_fsuuid}' ${dev2}" # mount options - $options_list = [] # TODO + $options_list = ["${::gluster::params::misc_mount_nofail}"] # TODO } elsif ( $valid_fstype == 'btrfs' ) { # exec requires @@ -364,7 +364,7 @@ define gluster::brick( $mkfs_exec = "${::gluster::params::program_mkfs_btrfs} -U '${valid_fsuuid}' ${dev2}" # mount options - $options_list = [] # TODO + $options_list = ["${::gluster::params::misc_mount_nofail}"] # TODO } else { fail('The $fstype is invalid.') diff --git a/manifests/params.pp b/manifests/params.pp index d53c599..5f16f86 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -79,6 +79,9 @@ class gluster::params( # the operatingsystemrelease string used in the repository URL. $misc_repo_operatingsystemrelease = "${operatingsystemrelease}", + # A failed or missing /etc/fstab entry should not cause the system to hang. + $misc_mount_nofail = 'nofail', + # comment... $comment = '' |