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