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