From a86e5ede7866a18c681ab95d83cc3ae875a71930 Mon Sep 17 00:00:00 2001 From: gaohuatao Date: Mon, 26 Apr 2021 10:09:46 +0800 Subject: [PATCH 086/104] move reinstall_thinpool to helper.sh Signed-off-by: gaohuatao --- .../container_cases/graph_root_test.sh | 38 --------- .../container_cases/storage_opts_dm.sh | 30 ------- CI/test_cases/helpers.sh | 79 +++++++++++++++++++ 3 files changed, 79 insertions(+), 68 deletions(-) diff --git a/CI/test_cases/container_cases/graph_root_test.sh b/CI/test_cases/container_cases/graph_root_test.sh index 678d176e..4beb5d9e 100644 --- a/CI/test_cases/container_cases/graph_root_test.sh +++ b/CI/test_cases/container_cases/graph_root_test.sh @@ -22,44 +22,6 @@ declare -r curr_path=$(dirname $(readlink -f "$0")) source ../helpers.sh -function reinstall_thinpool() -{ - local ret=0 - - cat /etc/isulad/daemon.json | grep driver | grep devicemapper - if [[ $? -ne 0 ]]; then - return ${ret} - fi - - dev_disk=`pvs | grep isulad | awk '{print$1}'` - rm -rf /var/lib/isulad/* - dmsetup remove_all - lvremove -f isulad/thinpool - lvremove -f isulad/thinpoolmeta - vgremove -f isulad - pvremove -f $dev_disk - mount | grep $dev_disk | grep /var/lib/isulad - if [ x"$?" == x"0" ]; then - umount /var/lib/isulad - fi - touch /etc/lvm/profile/isulad-thinpool.profile - cat > /etc/lvm/profile/isulad-thinpool.profile < /etc/lvm/profile/isulad-thinpool.profile < /etc/lvm/profile/isulad-thinpool.profile <