summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Deygas <Vincent.Deygas@rewardgateway.com>2015-01-20 09:48:44 +0000
committerJames Shubin <james@shubin.ca>2015-01-20 05:56:08 -0500
commitbf64d77d729383bd8fd4a5a779cc86dc7ec8a61b (patch)
treef376d27b0ffb527109617d88e2d96347d22b32ac
parent91d788614bb21ca42a8f1508472bc4afb8eaa2df (diff)
downloadpuppet-gluster-bf64d77d729383bd8fd4a5a779cc86dc7ec8a61b.zip
puppet-gluster-bf64d77d729383bd8fd4a5a779cc86dc7ec8a61b.tar.gz
puppet-gluster-bf64d77d729383bd8fd4a5a779cc86dc7ec8a61b.tar.xz
Allowed to use 'glusterfs' or 'ntfs' as fstype for gluster::mount
Depending of gluster use, performances could be very impacted by this choice. See http://www.gluster.org/community/documentation/index.php/Gluster_3.2:_Using_NFS_with_Gluster
-rw-r--r--manifests/mount.pp17
1 files changed, 13 insertions, 4 deletions
diff --git a/manifests/mount.pp b/manifests/mount.pp
index 2e842b1..db437a3 100644
--- a/manifests/mount.pp
+++ b/manifests/mount.pp
@@ -24,8 +24,9 @@ define gluster::mount(
# defs, but not actually mount (testing)
$repo = true, # add a repo automatically? true or false
$version = '', # pick a specific version (defaults to latest)
- $ip = '', # you can specify which ip address to use (if multiple)
- $shorewall = false
+ $ip = '', # you can specify which ip address to use (if multiple)
+ $type = 'glusterfs', # use 'glusterfs' or 'nfs'
+ $shorewall = false,
) {
include gluster::params
@@ -77,6 +78,7 @@ define gluster::mount(
fail('No valid IP exists!')
}
+ # TODO: review shorewall rules against nfs fstype mount option
if $shorewall {
$safename = regsubst("${name}", '/', '_', 'G') # make /'s safe
@@shorewall::rule { "glusterd-management-${fqdn}-${safename}":
@@ -142,6 +144,7 @@ define gluster::mount(
alias => "${short_name}", # don't allow duplicates name's
}
+ # TODO: review packages content against nfs fstype mount option
$packages = "${::gluster::params::package_glusterfs_fuse}" ? {
'' => ["${::gluster::params::package_glusterfs}"],
default => [
@@ -149,6 +152,12 @@ define gluster::mount(
"${::gluster::params::package_glusterfs_fuse}",
],
}
+
+ $valid_type = "${type}" ? {
+ 'nfs' => 'nfs',
+ default => 'glusterfs',
+ }
+
# Mount Options:
# * backupvolfile-server=server-name
# * fetch-attempts=N (where N is number of attempts)
@@ -165,13 +174,13 @@ define gluster::mount(
atboot => true,
ensure => $mounted_bool,
device => "${server}",
- fstype => 'glusterfs',
+ fstype => "${valid_type}",
options => "defaults,_netdev,${rw_bool}", # TODO: will $suid_bool work with gluster ?
dump => '0', # fs_freq: 0 to skip file system dumps
pass => '0', # fs_passno: 0 to skip fsck on boot
require => [
Package[$packages],
- File["${long_name}"], # the mountpoint
+ File["${long_name}"], # the mountpoint
Exec['gluster-fuse'], # ensure fuse is loaded!
],
}