From 6ef9ffea7fee43ea6f59c8c36fd183f90e9c26f8 Mon Sep 17 00:00:00 2001 From: N Balachandran Date: Thu, 25 Jul 2019 11:51:32 +0530 Subject: glusterd: create separate logdirs for cluster.rc instances Create a separate logdir for each host instance created by cluster.rc. This makes it easier to determine the files belonging to a particular instance. Change-Id: Ic8321f83f98995412b7d5f095b3d3f0391767a8b Fixes: bz#1733042 Signed-off-by: N Balachandran --- tests/cluster.rc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'tests/cluster.rc') diff --git a/tests/cluster.rc b/tests/cluster.rc index 99be8e79c21..06f329e0ef6 100644 --- a/tests/cluster.rc +++ b/tests/cluster.rc @@ -50,15 +50,16 @@ function define_glusterds() { sopt="management.glusterd-sockfile=${!b}/glusterd/gd.sock" #Get the logdir logdir=`gluster --print-logdir` + clopt="management.cluster-test-mode=${logdir}/$i"; #Fetch the testcases name and prefix the glusterd log with it logfile=`echo ${0##*/}`_glusterd$i.log - lopt="--log-file=$logdir/$logfile" + lopt="--log-file=$logdir/$i/$logfile" if [ "$2" == "-LDEBUG" ]; then - eval "glusterd_$i='glusterd -LDEBUG --xlator-option $wopt --xlator-option $bopt --xlator-option $ropt --xlator-option $sopt $lopt $popt'"; - eval "glusterd$i='glusterd -LDEBUG --xlator-option $wopt --xlator-option $bopt --xlator-option $ropt --xlator-option $sopt $lopt $popt'"; + eval "glusterd_$i='glusterd -LDEBUG --xlator-option $wopt --xlator-option $bopt --xlator-option $ropt --xlator-option $sopt --xlator-option $clopt $lopt $popt'"; + eval "glusterd$i='glusterd -LDEBUG --xlator-option $wopt --xlator-option $bopt --xlator-option $ropt --xlator-option $sopt --xlator-option $clopt $lopt $popt'"; else - eval "glusterd_$i='glusterd --xlator-option $wopt --xlator-option $bopt --xlator-option $ropt --xlator-option $sopt $lopt $popt'"; - eval "glusterd$i='glusterd --xlator-option $wopt --xlator-option $bopt --xlator-option $ropt --xlator-option $sopt $lopt $popt'"; + eval "glusterd_$i='glusterd --xlator-option $wopt --xlator-option $bopt --xlator-option $ropt --xlator-option $sopt --xlator-option $clopt $lopt $popt'"; + eval "glusterd$i='glusterd --xlator-option $wopt --xlator-option $bopt --xlator-option $ropt --xlator-option $sopt --xlator-option $clopt $lopt $popt'"; fi done } -- cgit