summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKrutika Dhananjay <kdhananj@redhat.com>2013-09-24 17:01:46 +0530
committerAnand Avati <avati@redhat.com>2013-10-08 23:13:16 -0700
commite51ca3c1c991416895e1e8693f7c3e6332d57464 (patch)
tree1d77373831ba8129eaaa3e6c257702062591f6e3 /tests
parent11bb1fc5849a557d1a26e59bd651fbd0d07a1b8d (diff)
cli,glusterd: Implement 'volume status tasks'
oVirt's Gluster Integration needs an inexpensive command that can be executed every 10 seconds to monitor async tasks and their parameters, for all volumes. The solution involves adding a 'tasks' sub-command to 'volume status' to fetch only the async task IDs, type and other relevant parameters. Only the originator glusterd participates in this command as all the information needed is available on all the nodes. This is to make the command suitable for being executed every 10 seconds. Change-Id: I1edc607baf29b001a5585079dec681d7c641b3d1 BUG: 1012346 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/6006 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs/bug-857330/common.rc2
-rwxr-xr-xtests/bugs/bug-857330/normal.t6
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/bugs/bug-857330/common.rc b/tests/bugs/bug-857330/common.rc
index 4e5a73a0bb1..e5a7cd79adf 100644
--- a/tests/bugs/bug-857330/common.rc
+++ b/tests/bugs/bug-857330/common.rc
@@ -22,7 +22,7 @@ function check-and-store-task-id()
function get-task-id()
{
- $CLI $COMMAND | grep $PATTERN | grep -o -E "$UUID_REGEX"
+ $CLI $COMMAND | grep $PATTERN | grep -o -E "$UUID_REGEX" | tail -n1
}
diff --git a/tests/bugs/bug-857330/normal.t b/tests/bugs/bug-857330/normal.t
index 4455d162036..24dfe52c490 100755
--- a/tests/bugs/bug-857330/normal.t
+++ b/tests/bugs/bug-857330/normal.t
@@ -28,7 +28,7 @@ PATTERN="ID:"
TEST check-and-store-task-id
COMMAND="volume status $V0"
-PATTERN="Rebalance"
+PATTERN="ID"
EXPECT $TASK_ID get-task-id
COMMAND="volume rebalance $V0 status"
@@ -45,7 +45,7 @@ PATTERN="ID:"
TEST check-and-store-task-id
COMMAND="volume status $V0"
-PATTERN="Replace"
+PATTERN="ID"
EXPECT $TASK_ID get-task-id
COMMAND="volume replace-brick $V0 $REP_BRICK_PAIR status"
@@ -62,7 +62,7 @@ PATTERN="ID:"
TEST check-and-store-task-id
COMMAND="volume status $V0"
-PATTERN="Remove"
+PATTERN="ID"
EXPECT $TASK_ID get-task-id
COMMAND="volume remove-brick $V0 $H0:$B0/${V0}3 status"