summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Shubin <james@shubin.ca>2014-01-24 19:19:15 -0500
committerJames Shubin <james@shubin.ca>2014-01-24 20:44:08 -0500
commit0191594e5390a70503b0dce177d2998a0a0f434a (patch)
treec36027e916409b29b0e21d7f312776db45914756
parent7448b4712fda8c0a9c982d5b3a66846b2e92d0e6 (diff)
downloadpuppet-gluster-0191594e5390a70503b0dce177d2998a0a0f434a.tar.gz
puppet-gluster-0191594e5390a70503b0dce177d2998a0a0f434a.tar.xz
puppet-gluster-0191594e5390a70503b0dce177d2998a0a0f434a.zip
Small bugfixes.
It seems the seluser is now server_t. If someone thinks it should be different, please let me know! I think the --xml output of gluster volume status --xml <v> changed.
-rw-r--r--files/xml.py12
-rw-r--r--manifests/host.pp4
-rw-r--r--templates/glusterd.vol.erb2
3 files changed, 15 insertions, 3 deletions
diff --git a/files/xml.py b/files/xml.py
index b3150cd..27f39df 100644
--- a/files/xml.py
+++ b/files/xml.py
@@ -188,6 +188,12 @@ elif args.mode == 'port':
v = str(j.find('volName').text)
#print v
for k in j.findall('.//node'):
+ if k.find('node') is not None:
+ # this is a node in a node
+ # the NFS Server entry is doing
+ # doing this and might be a bug
+ continue
+
h = str(k.find('hostname').text)
p = str(k.find('path').text)
#print h, p
@@ -218,6 +224,12 @@ elif args.mode == 'ports':
# if no volume is specified, we use all of them...
if args.volume is None or args.volume == v:
for k in j.findall('.//node'):
+ if k.find('node') is not None:
+ # this is a node in a node
+ # the NFS Server entry is doing
+ # doing this and might be a bug
+ continue
+
h = str(k.find('hostname').text)
p = str(k.find('path').text)
#print h, p
diff --git a/manifests/host.pp b/manifests/host.pp
index d4c0a9c..6ed4262 100644
--- a/manifests/host.pp
+++ b/manifests/host.pp
@@ -121,7 +121,7 @@ define gluster::host(
group => root,
mode => 600, # u=rw,go=r
seltype => 'glusterd_var_lib_t',
- seluser => 'unconfined_u',
+ seluser => 'system_u',
ensure => present,
notify => Service['glusterd'],
require => File['/var/lib/glusterd/'],
@@ -207,7 +207,7 @@ define gluster::host(
# NOTE: this mode was found by inspecting the process
mode => 600, # u=rw,go=r
seltype => 'glusterd_var_lib_t',
- seluser => 'unconfined_u',
+ seluser => 'system_u',
notify => [
# propagate the notify up
File['/var/lib/glusterd/peers/'],
diff --git a/templates/glusterd.vol.erb b/templates/glusterd.vol.erb
index 31853ba..a258b9a 100644
--- a/templates/glusterd.vol.erb
+++ b/templates/glusterd.vol.erb
@@ -8,7 +8,7 @@ volume management
<% if @valid_rpcauthallowinsecure -%>
option rpc-auth-allow-insecure on
<% end -%>
-<% if @valid_baseport > 0 -%>
+<% if @valid_baseport.to_i > 0 -%>
option base-port <%= @valid_baseport %>
<% else -%>
# option base-port 49152