From c6f040524d75011c44dcc9afdfef80c60c78f7f7 Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Thu, 19 Jun 2014 15:51:39 +0530 Subject: mgmt/glusterd: display snapd status as part of volume status * Made changes to save the port used by snapd in the info file for the volume i.e. /vols//info This is how the gluster volume status of a volume would look like for which the uss feature is enabled. [root@tatooine ~]# gluster volume status vol Status of volume: vol Gluster process Port Online Pid ------------------------------------------------------------------------------ Brick tatooine:/export1/vol 49155 Y 5041 Snapshot Daemon on localhost 49156 Y 5080 NFS Server on localhost 2049 Y 5087 Task Status of Volume vol ------------------------------------------------------------------------------ There are no active volume tasks Change-Id: I8f3e5d7d764a728497c2a5279a07486317bd7c6d BUG: 1111041 Signed-off-by: Raghavendra Bhat Reviewed-on: http://review.gluster.org/8114 Tested-by: Gluster Build System Reviewed-by: Kaushal M --- tests/bugs/bug-1111041.t | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tests/bugs/bug-1111041.t (limited to 'tests') diff --git a/tests/bugs/bug-1111041.t b/tests/bugs/bug-1111041.t new file mode 100644 index 00000000000..d6cf2e91df0 --- /dev/null +++ b/tests/bugs/bug-1111041.t @@ -0,0 +1,36 @@ +#!/bin/bash + +. $(dirname $0)/../include.rc +. $(dirname $0)/../volume.rc +. $(dirname $0)/../fileio.rc +. $(dirname $0)/../nfs.rc + +cleanup; + +function is_snapd_running { + $CLI volume status $1 | grep "Snap Daemon" | wc -l; +} + +TEST glusterd; + +TEST pidof glusterd; + +TEST $CLI volume create $V0 $H0:$B0/${V0}0 $H0:$B0/${V0}1 + +TEST $CLI volume start $V0; + +EXPECT "0" is_snapd_running $v0 + +TEST $CLI volume set $V0 features.uss enable; + +EXPECT "1" is_snapd_running $V0 + +SNAPD_PID=$(ps aux | grep snapd | grep -v grep | awk '{print $2}'); + +TEST [ $SNAPD_PID -gt 0 ]; + +SNAPD_PID2=$($CLI volume status $V0 | grep "Snap Daemon" | awk {'print $7'}); + +TEST [ $SNAPD_PID -eq $SNAPD_PID2 ] + +cleanup ; -- cgit