summaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorSoumya Koduri <skoduri@redhat.com>2015-06-30 19:26:27 +0530
committerNiels de Vos <ndevos@redhat.com>2015-07-01 03:04:41 -0700
commitc0ff88a6f2ac836cc4e0716be8fc0247b62e9a57 (patch)
tree2444e13e5bf6021e2e7be233b52a8607e4ed3b85 /extras
parentf321a87f9eea3272a92b94d9e3a09e308d584974 (diff)
common-ha: Fix '/var/lib/nfs/statd/state' path creation
'/var/lib/nfs/statd/state' which contains NSM state number should be a file instead of directory. This is a backport of the below fix - http://review.gluster.org/#/c/11468/ Change-Id: Id008b4f4dd810fe6d6b4d2599cbc0b488010384b BUG: 1238057 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/11468 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11476 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'extras')
-rwxr-xr-xextras/ganesha/scripts/ganesha-ha.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/extras/ganesha/scripts/ganesha-ha.sh b/extras/ganesha/scripts/ganesha-ha.sh
index ccaa3d81338..69794a37db3 100755
--- a/extras/ganesha/scripts/ganesha-ha.sh
+++ b/extras/ganesha/scripts/ganesha-ha.sh
@@ -783,7 +783,9 @@ setup_state_volume()
if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs/statd ]; then
mkdir ${mnt}/nfs-ganesha/${dirname}/nfs/statd
fi
- touch ${mnt}/nfs-ganesha/${dirname}/nfs/state
+ if [ ! -e ${mnt}/nfs-ganesha/${dirname}/nfs/state ]; then
+ touch ${mnt}/nfs-ganesha/${dirname}/nfs/state
+ fi
if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs/ganesha/v4recov ]; then
mkdir ${mnt}/nfs-ganesha/${dirname}/nfs/ganesha/v4recov
fi
@@ -796,8 +798,8 @@ setup_state_volume()
if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm.bak ]; then
mkdir ${mnt}/nfs-ganesha/${dirname}/nfs/statd/sm.bak
fi
- if [ ! -d ${mnt}/nfs-ganesha/${dirname}/nfs/statd/state ]; then
- mkdir ${mnt}/nfs-ganesha/${dirname}/nfs/statd/state
+ if [ ! -e ${mnt}/nfs-ganesha/${dirname}/nfs/statd/state ]; then
+ touch ${mnt}/nfs-ganesha/${dirname}/nfs/statd/state
fi
for server in ${HA_SERVERS} ; do
if [ ${server} != ${dirname} ]; then