diff options
author | Samikshan Bairagya <samikshan@gmail.com> | 2017-04-05 18:03:10 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2017-04-12 23:43:08 -0400 |
commit | b4beaa0505e8b23ac027fb6c995aa259c3f7550a (patch) | |
tree | ce6702fd243088b829d87599a98839c8491a1c62 /tests | |
parent | e536bea09aa0776164716f9a0d480584c0a761f2 (diff) |
glusterd: Add client details to get-state output
This commit optionally adds client details corresponding to the
locally running bricks to the get-state output. Since getting
the client details involves sending RPC requests to the respective
local bricks, this is a relatively more costly operation. These
client details would be added to the get-state output only if the
get-state command is invoked with the 'detail' option.
This commit therefore also changes the get-state CLI usage. The
modified usage is as follows:
# gluster get-state [<daemon>] [[odir </path/to/output/dir/>] \
[file <filename>]] [detail]
Change-Id: I42cd4ef160f9e96d55a08a10d32c8ba44e4cd3d8
BUG: 1431183
Signed-off-by: Samikshan Bairagya <samikshan@gmail.com>
Reviewed-on: https://review.gluster.org/17003
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs/cli/bug-1353156-get-state-cli-validations.t | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/tests/bugs/cli/bug-1353156-get-state-cli-validations.t b/tests/bugs/cli/bug-1353156-get-state-cli-validations.t index 6ab7a084da0..f6e72a591ce 100644 --- a/tests/bugs/cli/bug-1353156-get-state-cli-validations.t +++ b/tests/bugs/cli/bug-1353156-get-state-cli-validations.t @@ -77,7 +77,15 @@ TEST positive_test $CLI get-state odir $ODIR file gdstate TEST positive_test $CLI get-state glusterd odir $ODIR file gdstate -TEST positive_test $CLI get-state glusterd odir $ODIR file gdstate +TEST positive_test $CLI get-state detail + +TEST positive_test $CLI get-state glusterd detail + +TEST positive_test $CLI get-state odir $ODIR detail + +TEST positive_test $CLI get-state glusterd odir $ODIR detail + +TEST positive_test $CLI get-state glusterd odir $ODIR file gdstate detail TEST ! $CLI get-state glusterfsd odir $ODIR; ERRSTR=$($CLI get-state glusterfsd odir $ODIR 2>&1 >/dev/null); @@ -111,19 +119,12 @@ TEST ! $CLI get-state glusterd foo bar; ERRSTR=$($CLI get-state glusterd foo bar 2>&1 >/dev/null); EXPECT 'Problem' get_parsing_arguments_part $ERRSTR; -cleanup; +TEST ! $CLI get-state glusterd detail file gdstate; +ERRSTR=$($CLI get-state glusterd foo bar 2>&1 >/dev/null); +EXPECT 'Problem' get_parsing_arguments_part $ERRSTR; + +TEST ! $CLI get-state glusterd foo bar detail; +ERRSTR=$($CLI get-state glusterd foo bar 2>&1 >/dev/null); +EXPECT 'Problem' get_parsing_arguments_part $ERRSTR; -# I've cleaned this up as much as I can - making sure the gdstates directory -# gets cleaned up, checking whether the CLI command actually succeeded before -# parsing its output, etc. - but it still fails in Jenkins. Specifically, the -# first get-state request that hits the server (i.e. doesn't bail out with a -# parse error first) succeeds, but any others time out. They don't even get as -# far as the glusterd log message that says we received a get-state request. -# There doesn't seem to be a core file, so glusterd doesn't seem to have -# crashed, but it's not responding either. Even worse, the problem seems to be -# environment-dependent; Jenkins is the only place I've seen it, and that's -# just about the worst environment ever for debugging anything. -# -# I'm marking this test bad so progress can be made elsewhere. If anybody else -# thinks this functionality is important, and wants to make it debuggable, good -# luck to you. +cleanup; |