]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
vstart: handle multiple ganesha's more sanely
authorJeff Layton <jlayton@redhat.com>
Wed, 17 Jun 2020 16:11:51 +0000 (12:11 -0400)
committerVarsha Rao <varao@redhat.com>
Wed, 8 Jul 2020 05:36:35 +0000 (07:36 +0200)
Currently, if you have more than one ganesha daemon, it clobbers the
log, config and pidfiles from the previous daemons. Give them each
their own files.

While we're in here, move the log and pidfile to the out/ directory
with all of the other logfiles/pidfiles.

Fixes: https://tracker.ceph.com/issues/46079
Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit eea01dfa78738e3b3c67751d00d2430a1ff6ee5d)

src/vstart.sh

index a5573cc85fba53c060136308251f2d01a84ad1c9..54591e6308410b746be1a38ab9893b11b43fe54b 100755 (executable)
@@ -1126,20 +1126,20 @@ start_ganesha() {
         RADOS_URLS {
           Userid = $test_user;
           watch_url = \"$url\";
-        }" > "$ganesha_dir/ganesha.conf"
+        }" > "$ganesha_dir/ganesha-$name.conf"
        wconf <<EOF
 [ganesha.$name]
         host = $HOSTNAME
         ip = $IP
         port = $port
         ganesha data = $ganesha_dir
-        pid file = $ganesha_dir/ganesha.pid
+        pid file = $ganesha_dir/ganesha-$name.pid
 EOF
 
         prun env CEPH_CONF="${conf_fn}" ganesha-rados-grace --userid $test_user -p $pool_name -n $namespace add $name
         prun env CEPH_CONF="${conf_fn}" ganesha-rados-grace --userid $test_user -p $pool_name -n $namespace
 
-        prun env CEPH_CONF="${conf_fn}" /usr/bin/ganesha.nfsd -L "$ganesha_dir/ganesha.log" -f "$ganesha_dir/ganesha.conf" -p "$ganesha_dir/ganesha.pid" -N NIV_DEBUG
+        prun env CEPH_CONF="${conf_fn}" /usr/bin/ganesha.nfsd -L "$CEPH_OUT_DIR/ganesha-$name.log" -f "$ganesha_dir/ganesha-$name.conf" -p "$CEPH_OUT_DIR/ganesha-$name.pid" -N NIV_DEBUG
 
         # Wait few seconds for grace period to be removed
         sleep 2
@@ -1147,7 +1147,7 @@ EOF
         prun env CEPH_CONF="${conf_fn}" ganesha-rados-grace --userid $test_user -p $pool_name -n $namespace
 
         if $with_mgr_dashboard; then
-            $CEPH_BIN/rados -p $pool_name put "conf-$name" "$ganesha_dir/ganesha.conf"
+            $CEPH_BIN/rados -p $pool_name put "conf-$name" "$ganesha_dir/ganesha-$name.conf"
         fi
 
         echo "$test_user ganesha daemon $name started on port: $port"