f338ef
From 48f7be493588fdf5e99dff0c3b91327e07da05f3 Mon Sep 17 00:00:00 2001
f338ef
From: Mohammed Rafi KC <rkavunga@redhat.com>
f338ef
Date: Thu, 11 Jul 2019 12:48:34 +0530
f338ef
Subject: [PATCH 242/255] Revert "tests/shd: Add test coverage for shd mux"
f338ef
f338ef
This reverts commit b7f832288d2d2e57231d90765afc049ad7cb2f9d.
f338ef
f338ef
BUG: 1471742
f338ef
Change-Id: Ifccac5150f07b98006714e43c77c5a4b1fd38cb8
f338ef
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
f338ef
Reviewed-on: https://code.engineering.redhat.com/gerrit/175951
f338ef
Tested-by: RHGS Build Bot <nigelb@redhat.com>
f338ef
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
f338ef
---
f338ef
 tests/basic/glusterd-restart-shd-mux.t |  96 ---------------------
f338ef
 tests/basic/shd-mux.t                  | 149 ---------------------------------
f338ef
 tests/basic/volume-scale-shd-mux.t     | 112 -------------------------
f338ef
 tests/volume.rc                        |  15 ----
f338ef
 4 files changed, 372 deletions(-)
f338ef
 delete mode 100644 tests/basic/glusterd-restart-shd-mux.t
f338ef
 delete mode 100644 tests/basic/shd-mux.t
f338ef
 delete mode 100644 tests/basic/volume-scale-shd-mux.t
f338ef
f338ef
diff --git a/tests/basic/glusterd-restart-shd-mux.t b/tests/basic/glusterd-restart-shd-mux.t
f338ef
deleted file mode 100644
f338ef
index a50af9d..0000000
f338ef
--- a/tests/basic/glusterd-restart-shd-mux.t
f338ef
+++ /dev/null
f338ef
@@ -1,96 +0,0 @@
f338ef
-#!/bin/bash
f338ef
-
f338ef
-. $(dirname $0)/../include.rc
f338ef
-. $(dirname $0)/../volume.rc
f338ef
-
f338ef
-cleanup;
f338ef
-
f338ef
-TESTS_EXPECTED_IN_LOOP=20
f338ef
-
f338ef
-TEST glusterd
f338ef
-TEST pidof glusterd
f338ef
-TEST $CLI volume create $V0 replica 3 $H0:$B0/${V0}{0,1,2,3,4,5}
f338ef
-TEST $CLI volume set $V0 cluster.background-self-heal-count 0
f338ef
-TEST $CLI volume set $V0 cluster.eager-lock off
f338ef
-TEST $CLI volume set $V0 performance.flush-behind off
f338ef
-TEST $CLI volume start $V0
f338ef
-
f338ef
-for i in $(seq 1 3); do
f338ef
-   TEST $CLI volume create ${V0}_afr$i replica 3 $H0:$B0/${V0}_afr${i}{0,1,2,3,4,5}
f338ef
-   TEST $CLI volume start ${V0}_afr$i
f338ef
-   TEST $CLI volume create ${V0}_ec$i disperse 6 redundancy 2 $H0:$B0/${V0}_ec${i}{0,1,2,3,4,5}
f338ef
-   TEST $CLI volume start ${V0}_ec$i
f338ef
-done
f338ef
-
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^1$" shd_count
f338ef
-
f338ef
-#Stop the glusterd
f338ef
-TEST pkill glusterd
f338ef
-#Only stopping glusterd, so there will be one shd
f338ef
-EXPECT_WITHIN $PROCESS_DOWN_TIMEOUT "^1$" shd_count
f338ef
-TEST glusterd
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^1$" shd_count
f338ef
-#Check the thread count become to number of volumes*number of ec subvolume (3*6=18)
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^18$" number_healer_threads_shd $V0 "__ec_shd_healer_wait"
f338ef
-#Check the thread count become to number of volumes*number of afr subvolume (4*6=24)
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^24$" number_healer_threads_shd $V0 "__afr_shd_healer_wait"
f338ef
-
f338ef
-shd_pid=$(get_shd_mux_pid $V0)
f338ef
-for i in $(seq 1 3); do
f338ef
-    afr_path="/var/run/gluster/shd/${V0}_afr$i/${V0}_afr$i-shd.pid"
f338ef
-    EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^${shd_pid}$" cat $afr_path
f338ef
-    ec_path="/var/run/gluster/shd/${V0}_ec$i/${V0}_ec${i}-shd.pid"
f338ef
-    EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^${shd_pid}$" cat $ec_path
f338ef
-done
f338ef
-
f338ef
-#Reboot a node scenario
f338ef
-TEST pkill gluster
f338ef
-#Only stopped glusterd, so there will be one shd
f338ef
-EXPECT_WITHIN $PROCESS_DOWN_TIMEOUT "^0$" shd_count
f338ef
-
f338ef
-TEST glusterd
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^1$" shd_count
f338ef
-
f338ef
-#Check the thread count become to number of volumes*number of ec subvolume (3*6=18)
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^18$" number_healer_threads_shd $V0 "__ec_shd_healer_wait"
f338ef
-#Check the thread count become to number of volumes*number of afr subvolume (4*6=24)
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^24$" number_healer_threads_shd $V0 "__afr_shd_healer_wait"
f338ef
-
f338ef
-shd_pid=$(get_shd_mux_pid $V0)
f338ef
-for i in $(seq 1 3); do
f338ef
-    afr_path="/var/run/gluster/shd/${V0}_afr$i/${V0}_afr$i-shd.pid"
f338ef
-    EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^${shd_pid}$" cat $afr_path
f338ef
-    ec_path="/var/run/gluster/shd/${V0}_ec$i/${V0}_ec${i}-shd.pid"
f338ef
-    EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^${shd_pid}$" cat $ec_path
f338ef
-done
f338ef
-
f338ef
-for i in $(seq 1 3); do
f338ef
-   TEST $CLI volume stop ${V0}_afr$i
f338ef
-   TEST $CLI volume stop ${V0}_ec$i
f338ef
-done
f338ef
-
f338ef
-EXPECT_WITHIN $PROCESS_DOWN_TIMEOUT "^6$" number_healer_threads_shd $V0 "__afr_shd_healer_wait"
f338ef
-
f338ef
-TEST $GFS --volfile-id=/$V0 --volfile-server=$H0 $M0
f338ef
-
f338ef
-TEST kill_brick $V0 $H0 $B0/${V0}0
f338ef
-TEST kill_brick $V0 $H0 $B0/${V0}3
f338ef
-
f338ef
-TEST touch $M0/foo{1..100}
f338ef
-
f338ef
-EXPECT_WITHIN $HEAL_TIMEOUT "^204$" get_pending_heal_count $V0
f338ef
-
f338ef
-TEST $CLI volume start ${V0} force
f338ef
-
f338ef
-EXPECT_WITHIN $HEAL_TIMEOUT "^0$" get_pending_heal_count $V0
f338ef
-
f338ef
-TEST rm -rf $M0/*
f338ef
-EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
f338ef
-
f338ef
-
f338ef
-TEST $CLI volume stop ${V0}
f338ef
-TEST $CLI volume delete ${V0}
f338ef
-
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^0$" shd_count
f338ef
-
f338ef
-cleanup
f338ef
diff --git a/tests/basic/shd-mux.t b/tests/basic/shd-mux.t
f338ef
deleted file mode 100644
f338ef
index e42a34a..0000000
f338ef
--- a/tests/basic/shd-mux.t
f338ef
+++ /dev/null
f338ef
@@ -1,149 +0,0 @@
f338ef
-#!/bin/bash
f338ef
-
f338ef
-. $(dirname $0)/../include.rc
f338ef
-. $(dirname $0)/../volume.rc
f338ef
-
f338ef
-cleanup;
f338ef
-
f338ef
-TESTS_EXPECTED_IN_LOOP=16
f338ef
-
f338ef
-TEST glusterd
f338ef
-TEST pidof glusterd
f338ef
-TEST $CLI volume create $V0 replica 3 $H0:$B0/${V0}{0,1,2,3,4,5}
f338ef
-TEST $CLI volume set $V0 cluster.background-self-heal-count 0
f338ef
-TEST $CLI volume set $V0 cluster.eager-lock off
f338ef
-TEST $CLI volume set $V0 performance.flush-behind off
f338ef
-TEST $CLI volume start $V0
f338ef
-TEST $GFS --volfile-id=/$V0 --volfile-server=$H0 $M0
f338ef
-
f338ef
-shd_pid=$(get_shd_mux_pid $V0)
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^6$" number_healer_threads_shd $V0 "__afr_shd_healer_wait"
f338ef
-
f338ef
-#Create a one more volume
f338ef
-TEST $CLI volume create ${V0}_1 replica 3 $H0:$B0/${V0}_1{0,1,2,3,4,5}
f338ef
-TEST $CLI volume start ${V0}_1
f338ef
-
f338ef
-#Check whether the shd has multiplexed or not
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^1$" shd_count
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^${shd_pid}$" get_shd_mux_pid ${V0}_1
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^${shd_pid}$" get_shd_mux_pid ${V0}
f338ef
-
f338ef
-TEST $CLI volume set ${V0}_1 cluster.background-self-heal-count 0
f338ef
-TEST $CLI volume set ${V0}_1 cluster.eager-lock off
f338ef
-TEST $CLI volume set ${V0}_1 performance.flush-behind off
f338ef
-TEST $GFS --volfile-id=/${V0}_1 --volfile-server=$H0 $M1
f338ef
-
f338ef
-TEST kill_brick $V0 $H0 $B0/${V0}0
f338ef
-TEST kill_brick $V0 $H0 $B0/${V0}4
f338ef
-TEST kill_brick ${V0}_1 $H0 $B0/${V0}_10
f338ef
-TEST kill_brick ${V0}_1 $H0 $B0/${V0}_14
f338ef
-
f338ef
-TEST touch $M0/foo{1..100}
f338ef
-TEST touch $M1/foo{1..100}
f338ef
-
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^204$" get_pending_heal_count $V0
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^204$" get_pending_heal_count ${V0}_1
f338ef
-
f338ef
-TEST $CLI volume start ${V0} force
f338ef
-TEST $CLI volume start ${V0}_1 force
f338ef
-
f338ef
-EXPECT_WITHIN $HEAL_TIMEOUT "^0$" get_pending_heal_count $V0
f338ef
-EXPECT_WITHIN $HEAL_TIMEOUT "^0$" get_pending_heal_count ${V0}_1
f338ef
-
f338ef
-TEST rm -rf $M0/*
f338ef
-TEST rm -rf $M1/*
f338ef
-EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M1
f338ef
-
f338ef
-#Stop the volume
f338ef
-TEST $CLI volume stop ${V0}_1
f338ef
-TEST $CLI volume delete ${V0}_1
f338ef
-
f338ef
-#Check the stop succeeded and detached the volume with out restarting it
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^1$" shd_count
f338ef
-
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^${shd_pid}$" get_shd_mux_pid $V0
f338ef
-
f338ef
-#Check the thread count become to earlier number after stopping
f338ef
-EXPECT_WITHIN $PROCESS_DOWN_TIMEOUT "^6$" number_healer_threads_shd $V0 "__afr_shd_healer_wait"
f338ef
-
f338ef
-
f338ef
-#Now create a  ec volume and check mux works
f338ef
-TEST $CLI volume create ${V0}_2 disperse 6 redundancy 2 $H0:$B0/${V0}_2{0,1,2,3,4,5}
f338ef
-TEST $CLI volume start ${V0}_2
f338ef
-
f338ef
-#Check whether the shd has multiplexed or not
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^1$" shd_count
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^${shd_pid}$" get_shd_mux_pid ${V0}_2
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^${shd_pid}$" get_shd_mux_pid ${V0}
f338ef
-
f338ef
-TEST $CLI volume set ${V0}_2 cluster.background-self-heal-count 0
f338ef
-TEST $CLI volume set ${V0}_2 cluster.eager-lock off
f338ef
-TEST $CLI volume set ${V0}_2 performance.flush-behind off
f338ef
-TEST $GFS --volfile-id=/${V0}_2 --volfile-server=$H0 $M1
f338ef
-
f338ef
-TEST kill_brick $V0 $H0 $B0/${V0}0
f338ef
-TEST kill_brick $V0 $H0 $B0/${V0}4
f338ef
-TEST kill_brick ${V0}_2 $H0 $B0/${V0}_20
f338ef
-TEST kill_brick ${V0}_2 $H0 $B0/${V0}_22
f338ef
-
f338ef
-TEST touch $M0/foo{1..100}
f338ef
-TEST touch $M1/foo{1..100}
f338ef
-
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^204$" get_pending_heal_count $V0
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^404$" get_pending_heal_count ${V0}_2
f338ef
-
f338ef
-TEST $CLI volume start ${V0} force
f338ef
-TEST $CLI volume start ${V0}_2 force
f338ef
-
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^6$" number_healer_threads_shd $V0 "__ec_shd_healer_wait"
f338ef
-
f338ef
-EXPECT_WITHIN $HEAL_TIMEOUT "^0$" get_pending_heal_count $V0
f338ef
-EXPECT_WITHIN $HEAL_TIMEOUT "^0$" get_pending_heal_count ${V0}_2
f338ef
-
f338ef
-TEST rm -rf $M0/*
f338ef
-TEST rm -rf $M1/*
f338ef
-
f338ef
-
f338ef
-#Stop the volume
f338ef
-TEST $CLI volume stop ${V0}_2
f338ef
-TEST $CLI volume delete ${V0}_2
f338ef
-
f338ef
-#Check the stop succeeded and detached the volume with out restarting it
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^1$" shd_count
f338ef
-
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^${shd_pid}$" get_shd_mux_pid $V0
f338ef
-
f338ef
-#Check the thread count become to zero for ec related threads
f338ef
-EXPECT_WITHIN $PROCESS_DOWN_TIMEOUT "^0$" number_healer_threads_shd $V0 "__ec_shd_healer_wait"
f338ef
-#Check the thread count become to earlier number after stopping
f338ef
-EXPECT_WITHIN $PROCESS_DOWN_TIMEOUT "^6$" number_healer_threads_shd $V0 "__afr_shd_healer_wait"
f338ef
-
f338ef
-for i in $(seq 1 3); do
f338ef
-   TEST $CLI volume create ${V0}_afr$i replica 3 $H0:$B0/${V0}_afr${i}{0,1,2,3,4,5}
f338ef
-   TEST $CLI volume start ${V0}_afr$i
f338ef
-   TEST $CLI volume create ${V0}_ec$i disperse 6 redundancy 2 $H0:$B0/${V0}_ec${i}{0,1,2,3,4,5}
f338ef
-   TEST $CLI volume start ${V0}_ec$i
f338ef
-done
f338ef
-
f338ef
-#Check the thread count become to number of volumes*number of ec subvolume (3*6=18)
f338ef
-EXPECT_WITHIN $PROCESS_DOWN_TIMEOUT "^18$" number_healer_threads_shd $V0 "__ec_shd_healer_wait"
f338ef
-#Check the thread count become to number of volumes*number of afr subvolume (4*6=24)
f338ef
-EXPECT_WITHIN $PROCESS_DOWN_TIMEOUT "^24$" number_healer_threads_shd $V0 "__afr_shd_healer_wait"
f338ef
-#Delete the volumes
f338ef
-for i in $(seq 1 3); do
f338ef
-   TEST $CLI volume stop ${V0}_afr$i
f338ef
-   TEST $CLI volume stop ${V0}_ec$i
f338ef
-   TEST $CLI volume delete ${V0}_afr$i
f338ef
-   TEST $CLI volume delete ${V0}_ec$i
f338ef
-done
f338ef
-
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^${shd_pid}$" get_shd_mux_pid $V0
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^1$" shd_count
f338ef
-
f338ef
-EXPECT_WITHIN $PROCESS_DOWN_TIMEOUT "^6$" number_healer_threads_shd $V0 "__afr_shd_healer_wait"
f338ef
-
f338ef
-TEST $CLI volume stop ${V0}
f338ef
-TEST $CLI volume delete ${V0}
f338ef
-EXPECT_WITHIN $PROCESS_DOWN_TIMEOUT "^0$" shd_count
f338ef
-
f338ef
-cleanup
f338ef
diff --git a/tests/basic/volume-scale-shd-mux.t b/tests/basic/volume-scale-shd-mux.t
f338ef
deleted file mode 100644
f338ef
index dd9cf83..0000000
f338ef
--- a/tests/basic/volume-scale-shd-mux.t
f338ef
+++ /dev/null
f338ef
@@ -1,112 +0,0 @@
f338ef
-#!/bin/bash
f338ef
-
f338ef
-. $(dirname $0)/../include.rc
f338ef
-. $(dirname $0)/../volume.rc
f338ef
-
f338ef
-cleanup;
f338ef
-
f338ef
-TESTS_EXPECTED_IN_LOOP=6
f338ef
-
f338ef
-TEST glusterd
f338ef
-TEST pidof glusterd
f338ef
-TEST $CLI volume create $V0 replica 3 $H0:$B0/${V0}{0,1,2,3,4,5}
f338ef
-TEST $CLI volume set $V0 cluster.background-self-heal-count 0
f338ef
-TEST $CLI volume set $V0 cluster.eager-lock off
f338ef
-TEST $CLI volume set $V0 performance.flush-behind off
f338ef
-TEST $CLI volume start $V0
f338ef
-
f338ef
-for i in $(seq 1 2); do
f338ef
-   TEST $CLI volume create ${V0}_afr$i replica 3 $H0:$B0/${V0}_afr${i}{0,1,2,3,4,5}
f338ef
-   TEST $CLI volume start ${V0}_afr$i
f338ef
-   TEST $CLI volume create ${V0}_ec$i disperse 6 redundancy 2 $H0:$B0/${V0}_ec${i}{0,1,2,3,4,5}
f338ef
-   TEST $CLI volume start ${V0}_ec$i
f338ef
-done
f338ef
-
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^1$" shd_count
f338ef
-
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^1$" shd_count
f338ef
-#Check the thread count become to number of volumes*number of ec subvolume (2*6=12)
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^12$" number_healer_threads_shd $V0 "__ec_shd_healer_wait"
f338ef
-#Check the thread count become to number of volumes*number of afr subvolume (3*6=18)
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^18$" number_healer_threads_shd $V0 "__afr_shd_healer_wait"
f338ef
-
f338ef
-TEST $CLI volume add-brick $V0 replica 3 $H0:$B0/${V0}{6,7,8};
f338ef
-#Check the thread count become to number of volumes*number of afr subvolume plus 3 additional threads from newly added bricks (3*6+3=21)
f338ef
-
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^1$" shd_count
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^21$" number_healer_threads_shd $V0 "__afr_shd_healer_wait"
f338ef
-
f338ef
-#Remove the brick and check the detach is successful
f338ef
-$CLI volume remove-brick $V0 $H0:$B0/${V0}{6,7,8} force
f338ef
-
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^18$" number_healer_threads_shd $V0 "__afr_shd_healer_wait"
f338ef
-
f338ef
-TEST $CLI volume add-brick ${V0}_ec1 $H0:$B0/${V0}_ec1_add{0,1,2,3,4,5};
f338ef
-#Check the thread count become to number of volumes*number of ec subvolume plus 2 additional threads from newly added bricks (2*6+6=18)
f338ef
-
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^1$" shd_count
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^18$" number_healer_threads_shd $V0 "__ec_shd_healer_wait"
f338ef
-
f338ef
-#Remove the brick and check the detach is successful
f338ef
-$CLI volume remove-brick ${V0}_ec1 $H0:$B0/${V0}_ec1_add{0,1,2,3,4,5} force
f338ef
-
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^12$" number_healer_threads_shd $V0 "__ec_shd_healer_wait"
f338ef
-
f338ef
-
f338ef
-for i in $(seq 1 2); do
f338ef
-   TEST $CLI volume stop ${V0}_afr$i
f338ef
-   TEST $CLI volume stop ${V0}_ec$i
f338ef
-done
f338ef
-
f338ef
-EXPECT_WITHIN $PROCESS_DOWN_TIMEOUT "^6$" number_healer_threads_shd $V0 "__afr_shd_healer_wait"
f338ef
-
f338ef
-TEST $GFS --volfile-id=/$V0 --volfile-server=$H0 $M0
f338ef
-
f338ef
-TEST kill_brick $V0 $H0 $B0/${V0}0
f338ef
-TEST kill_brick $V0 $H0 $B0/${V0}4
f338ef
-
f338ef
-TEST touch $M0/foo{1..100}
f338ef
-
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^204$" get_pending_heal_count $V0
f338ef
-
f338ef
-TEST $CLI volume start ${V0} force
f338ef
-
f338ef
-EXPECT_WITHIN $HEAL_TIMEOUT "^0$" get_pending_heal_count $V0
f338ef
-
f338ef
-TEST rm -rf $M0/*
f338ef
-EXPECT_WITHIN $UMOUNT_TIMEOUT "Y" force_umount $M0
f338ef
-shd_pid=$(get_shd_mux_pid $V0)
f338ef
-TEST $CLI volume create ${V0}_distribute1 $H0:$B0/${V0}_distribute10
f338ef
-TEST $CLI volume start ${V0}_distribute1
f338ef
-
f338ef
-#Creating a non-replicate/non-ec volume should not have any effect in shd
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^6$" number_healer_threads_shd $V0 "__afr_shd_healer_wait"
f338ef
-EXPECT "^${shd_pid}$" get_shd_mux_pid $V0
f338ef
-
f338ef
-TEST mkdir $B0/add/
f338ef
-#Now convert the distributed volume to replicate
f338ef
-TEST $CLI volume add-brick ${V0}_distribute1 replica 3 $H0:$B0/add/{2..3}
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^9$" number_healer_threads_shd $V0 "__afr_shd_healer_wait"
f338ef
-
f338ef
-#scale down the volume
f338ef
-TEST $CLI volume remove-brick ${V0}_distribute1 replica 1 $H0:$B0/add/{2..3} force
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^6$" number_healer_threads_shd $V0 "__afr_shd_healer_wait"
f338ef
-
f338ef
-TEST $CLI volume stop ${V0}
f338ef
-TEST $CLI volume delete ${V0}
f338ef
-EXPECT_WITHIN $PROCESS_DOWN_TIMEOUT "^0$" shd_count
f338ef
-
f338ef
-TEST rm -rf $B0/add/
f338ef
-TEST mkdir $B0/add/
f338ef
-#Now convert the distributed volume back to replicate and make sure that a new shd is spawned
f338ef
-TEST $CLI volume add-brick ${V0}_distribute1 replica 3 $H0:$B0/add/{2..3};
f338ef
-EXPECT_WITHIN $PROCESS_UP_TIMEOUT "^1$" shd_count
f338ef
-EXPECT_WITHIN $HEAL_TIMEOUT "^3$" number_healer_threads_shd ${V0}_distribute1 "__afr_shd_healer_wait"
f338ef
-
f338ef
-#Now convert the replica volume to distribute again and make sure the shd is now stopped
f338ef
-TEST $CLI volume remove-brick ${V0}_distribute1 replica 1 $H0:$B0/add/{2..3} force
f338ef
-TEST rm -rf $B0/add/
f338ef
-
f338ef
-EXPECT_WITHIN $PROCESS_DOWN_TIMEOUT "^0$" shd_count
f338ef
-
f338ef
-cleanup
f338ef
diff --git a/tests/volume.rc b/tests/volume.rc
f338ef
index 6a78c37..022d972 100644
f338ef
--- a/tests/volume.rc
f338ef
+++ b/tests/volume.rc
f338ef
@@ -913,21 +913,6 @@ function volgen_check_ancestry {
f338ef
         fi
f338ef
 }
f338ef
 
f338ef
-function get_shd_mux_pid {
f338ef
-   local volume=$1
f338ef
-   pid=`$CLI volume status $volume shd | awk '/Self-heal/{print $8}'`
f338ef
-   echo $pid
f338ef
-}
f338ef
-
f338ef
-function shd_count {
f338ef
-   ps aux | grep "glustershd" | grep -v grep | wc -l
f338ef
-}
f338ef
-
f338ef
-function number_healer_threads_shd {
f338ef
-   local pid=$(get_shd_mux_pid $1)
f338ef
-   pstack $pid | grep $2 | wc -l
f338ef
-}
f338ef
-
f338ef
 function get_mtime {
f338ef
     local time=$(get-mdata-xattr -m $1)
f338ef
     if [ $time == "-1" ];
f338ef
-- 
f338ef
1.8.3.1
f338ef