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