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