summaryrefslogtreecommitdiffstats
path: root/tests/volume.rc
diff options
context:
space:
mode:
authorSakshi <sabansal@redhat.com>2015-05-28 11:23:55 +0530
committerRaghavendra G <rgowdapp@redhat.com>2016-07-04 21:29:08 -0700
commit755b8c7e108a66211b876cf87a6f7fa244360b94 (patch)
tree57677524a9d40cfc34e516c29ae70d81d200eca5 /tests/volume.rc
parent31de95d5f3b71b4bfd0042e2612fc2ee15f9834c (diff)
cli: different status output for rebalance fix-layout
Backport of http://review.gluster.org/10956 > Change-Id: I6ded40a1b1cff5c72e5b61fd353db3d8c688efd8 > BUG: 1225718 > Signed-off-by: Sakshi <sabansal@redhat.com> > Reviewed-on: http://review.gluster.org/10956 > Smoke: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Change-Id: I6ded40a1b1cff5c72e5b61fd353db3d8c688efd8 BUG: 1352393 Signed-off-by: Sakshi <sabansal@redhat.com> Reviewed-on: http://review.gluster.org/14851 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'tests/volume.rc')
-rw-r--r--tests/volume.rc8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/volume.rc b/tests/volume.rc
index f3dbaf4a7f2..6c72dbd05b9 100644
--- a/tests/volume.rc
+++ b/tests/volume.rc
@@ -41,12 +41,16 @@ function volume_option()
}
function rebalance_status_field {
- #The rebalance status can be upto 3 words, (ex:'fix-layout in progress'), hence the awk-print $7 thru $9.
+ $CLI volume rebalance $1 status | awk '{print $7}' | sed -n 3p
+}
+
+function fix-layout_status_field {
+ #The fix-layout status can be upto 3 words, (ex:'fix-layout in progress'), hence the awk-print $2 thru $4.
#But if the status is less than 3 words, it also prints the next field i.e the run_time_in_secs.(ex:'completed 3.00').
#So we trim the numbers out with `tr`. Finally remove the trailing white spaces with sed. What we get is one of the
#strings in the 'cli_vol_task_status_str' char array of cli-rpc-ops.c
- $CLI volume rebalance $1 status | awk '{print $7,$8,$9}' |sed -n 3p |tr -d '[^0-9+\.]'|sed 's/ *$//g'
+ $CLI volume rebalance $1 status | awk '{print $2,$3,$4}' |sed -n 3p |tr -d '[^0-9+\.]'|sed 's/ *$//g'
}
function detach_tier_status_field {