14f8ab
From 7e71723a46237f13a570961054b361dc1b34ab25 Mon Sep 17 00:00:00 2001
14f8ab
From: Soumya Koduri <skoduri@redhat.com>
14f8ab
Date: Thu, 19 Jan 2017 15:01:12 +0530
14f8ab
Subject: [PATCH 079/124] common-ha: All statd related files need to be owned
14f8ab
 by rpcuser
14f8ab
14f8ab
Statd service is started as rpcuser by default. Hence the
14f8ab
files/directories needed by it under '/var/lib/nfs' should be
14f8ab
owned by the same user.
14f8ab
14f8ab
Note: This change is not in mainline as the cluster-bits
14f8ab
are being moved to storehaug project -
14f8ab
http://review.gluster.org/#/c/16349/
14f8ab
http://review.gluster.org/#/c/16333/
14f8ab
14f8ab
Label: DOWNSTREAM ONLY
14f8ab
14f8ab
Upstream Reference :
14f8ab
> Change-Id: I89fd06aa9700c5ce60026ac825da7c154d9f48fd
14f8ab
> BUG: 1414665
14f8ab
> Signed-off-by: Soumya Koduri <skoduri@redhat.com>
14f8ab
> Reviewed-on: http://review.gluster.org/16433
14f8ab
> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
14f8ab
> Smoke: Gluster Build System <jenkins@build.gluster.org>
14f8ab
> Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
14f8ab
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
14f8ab
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
14f8ab
14f8ab
Change-Id: I89fd06aa9700c5ce60026ac825da7c154d9f48fd
14f8ab
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
14f8ab
Reviewed-on: https://code.engineering.redhat.com/gerrit/167164
14f8ab
Reviewed-by: Soumya Koduri <skoduri@redhat.com>
14f8ab
Tested-by: RHGS Build Bot <nigelb@redhat.com>
14f8ab
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
14f8ab
---
14f8ab
 extras/ganesha/scripts/ganesha-ha.sh | 8 ++++++++
14f8ab
 1 file changed, 8 insertions(+)
14f8ab
14f8ab
diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh
14f8ab
index 4e5799f..4a98f32 100644
14f8ab
--- a/extras/ganesha/scripts/ganesha-ha.sh
14f8ab
+++ b/extras/ganesha/scripts/ganesha-ha.sh
14f8ab
@@ -756,9 +756,11 @@ setup_state_volume()
14f8ab
         fi
14f8ab
         if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs/statd ]; then
14f8ab
             mkdir ${mnt}/nfs-ganesha/${dirname}/nfs/statd
14f8ab
+            chown rpcuser:rpcuser ${mnt}/nfs-ganesha/${dirname}/nfs/statd
14f8ab
         fi
14f8ab
         if [ ! -e ${mnt}/nfs-ganesha/${dirname}/nfs/state ]; then
14f8ab
             touch ${mnt}/nfs-ganesha/${dirname}/nfs/state
14f8ab
+            chown rpcuser:rpcuser ${mnt}/nfs-ganesha/${dirname}/nfs/state
14f8ab
         fi
14f8ab
         if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs/ganesha/v4recov ]; then
14f8ab
             mkdir ${mnt}/nfs-ganesha/${dirname}/nfs/ganesha/v4recov
14f8ab
@@ -768,9 +770,11 @@ setup_state_volume()
14f8ab
         fi
14f8ab
         if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm ]; then
14f8ab
             mkdir ${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm
14f8ab
+            chown rpcuser:rpcuser ${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm
14f8ab
         fi
14f8ab
         if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm.bak ]; then
14f8ab
             mkdir ${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm.bak
14f8ab
+            chown rpcuser:rpcuser ${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm.bak
14f8ab
         fi
14f8ab
         if [ ! -e ${mnt}/nfs-ganesha/${dirname}/nfs/statd/state ]; then
14f8ab
             touch ${mnt}/nfs-ganesha/${dirname}/nfs/statd/state
14f8ab
@@ -830,9 +834,11 @@ addnode_state_volume()
14f8ab
     fi
14f8ab
     if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs/statd ]; then
14f8ab
         mkdir ${mnt}/nfs-ganesha/${dirname}/nfs/statd
14f8ab
+        chown rpcuser:rpcuser ${mnt}/nfs-ganesha/${dirname}/nfs/statd
14f8ab
     fi
14f8ab
     if [ ! -e ${mnt}/nfs-ganesha/${dirname}/nfs/state ]; then
14f8ab
         touch ${mnt}/nfs-ganesha/${dirname}/nfs/state
14f8ab
+        chown rpcuser:rpcuser ${mnt}/nfs-ganesha/${dirname}/nfs/state
14f8ab
     fi
14f8ab
     if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs/ganesha/v4recov ]; then
14f8ab
         mkdir ${mnt}/nfs-ganesha/${dirname}/nfs/ganesha/v4recov
14f8ab
@@ -842,9 +848,11 @@ addnode_state_volume()
14f8ab
     fi
14f8ab
     if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm ]; then
14f8ab
         mkdir ${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm
14f8ab
+        chown rpcuser:rpcuser ${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm
14f8ab
     fi
14f8ab
     if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm.bak ]; then
14f8ab
         mkdir ${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm.bak
14f8ab
+        chown rpcuser:rpcuser ${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm.bak
14f8ab
     fi
14f8ab
     if [ ! -e ${mnt}/nfs-ganesha/${dirname}/nfs/statd/state ]; then
14f8ab
         touch ${mnt}/nfs-ganesha/${dirname}/nfs/statd/state
14f8ab
-- 
14f8ab
1.8.3.1
14f8ab