mirror of https://github.com/schoebel/mars
test_suite: fix replay is-device-on with is-device in marsadm wait-resource
This commit is contained in:
parent
7d0ce1d9d7
commit
e5ce64e69e
|
@ -127,7 +127,7 @@ function marsadm_check_post_condition_role_switch
|
||||||
local res=${cmd_args[0]}
|
local res=${cmd_args[0]}
|
||||||
local role_act ls_returncode_req ls_returncode_act maxcount=5 count=0
|
local role_act ls_returncode_req ls_returncode_act maxcount=5 count=0
|
||||||
case $role_req in # (((
|
case $role_req in # (((
|
||||||
primary) marsadm_do_cmd $host "wait-resource" "$res is-device-on" || lib_exit 1
|
primary) marsadm_do_cmd $host "wait-resource" "$res is-device" || lib_exit 1
|
||||||
ls_returncode_req=0
|
ls_returncode_req=0
|
||||||
;;
|
;;
|
||||||
secondary) marsadm_do_cmd $host "wait-resource" "$res is-device-off" || lib_exit 1
|
secondary) marsadm_do_cmd $host "wait-resource" "$res is-device-off" || lib_exit 1
|
||||||
|
|
|
@ -55,7 +55,7 @@ function resource_quick_prepare_first_resource
|
||||||
cluster_clear_and_mount_mars_dir_all
|
cluster_clear_and_mount_mars_dir_all
|
||||||
cluster_insert_mars_module_all
|
cluster_insert_mars_module_all
|
||||||
marsadm_do_cmd $primary_host "create-resource" "$res $dev" || lib_exit 1
|
marsadm_do_cmd $primary_host "create-resource" "$res $dev" || lib_exit 1
|
||||||
marsadm_do_cmd $primary_host "wait-resource" "$res is-device-on" || \
|
marsadm_do_cmd $primary_host "wait-resource" "$res is-device" || \
|
||||||
lib_exit 1
|
lib_exit 1
|
||||||
resource_check_data_device_after_create $primary_host $res
|
resource_check_data_device_after_create $primary_host $res
|
||||||
lib_rw_remote_check_device_fs $primary_host $data_dev "xfs"
|
lib_rw_remote_check_device_fs $primary_host $data_dev "xfs"
|
||||||
|
@ -422,7 +422,7 @@ function resource_create
|
||||||
cluster_insert_mars_module_all
|
cluster_insert_mars_module_all
|
||||||
marsadm_do_cmd $host "create-resource $resource_create_flag" \
|
marsadm_do_cmd $host "create-resource $resource_create_flag" \
|
||||||
"$res $dev $res ${size}G"
|
"$res $dev $res ${size}G"
|
||||||
marsadm_do_cmd $host "wait-resource" "$res is-device-on"
|
marsadm_do_cmd $host "wait-resource" "$res is-device"
|
||||||
rc=$?
|
rc=$?
|
||||||
if [ $rc -ne 0 ]; then
|
if [ $rc -ne 0 ]; then
|
||||||
let count+=1
|
let count+=1
|
||||||
|
@ -670,7 +670,7 @@ function resource_check_replication
|
||||||
local primary_host=$1 secondary_host=$2 res=$3 debug_msg_prefix="$4"
|
local primary_host=$1 secondary_host=$2 res=$3 debug_msg_prefix="$4"
|
||||||
local data_dev=$(resource_get_data_device $res)
|
local data_dev=$(resource_get_data_device $res)
|
||||||
lib_vmsg " ${debug_msg_prefix}check replication, primary=$primary_host, secondary=$secondary_host"
|
lib_vmsg " ${debug_msg_prefix}check replication, primary=$primary_host, secondary=$secondary_host"
|
||||||
marsadm_do_cmd $primary_host "wait-resource" "$res is-device-on" || \
|
marsadm_do_cmd $primary_host "wait-resource" "$res is-device" || \
|
||||||
lib_exit 1
|
lib_exit 1
|
||||||
lib_vmsg " ${debug_msg_prefix}write to $primary_host:$data_dev and log-rotate/delete"
|
lib_vmsg " ${debug_msg_prefix}write to $primary_host:$data_dev and log-rotate/delete"
|
||||||
local count=0 maxcount=3
|
local count=0 maxcount=3
|
||||||
|
|
|
@ -384,8 +384,7 @@ function switch2primary_correct_split_brain
|
||||||
sleep 15
|
sleep 15
|
||||||
marsadm_do_cmd $new_primary "log-purge-all --force" "$res" || lib_exit 1
|
marsadm_do_cmd $new_primary "log-purge-all --force" "$res" || lib_exit 1
|
||||||
fi
|
fi
|
||||||
marsadm_do_cmd $new_primary "wait-resource" "$res is-device-on" || \
|
marsadm_do_cmd $new_primary "wait-resource" "$res is-device" || lib_exit 1
|
||||||
lib_exit 1
|
|
||||||
lib_vmsg " $switch2primary_flow_msg_prefix: check whether new primary $new_primary works standalone"
|
lib_vmsg " $switch2primary_flow_msg_prefix: check whether new primary $new_primary works standalone"
|
||||||
switch2primary_check_standalone_primary $new_primary $res
|
switch2primary_check_standalone_primary $new_primary $res
|
||||||
if [ $network_cut -eq 1 ]; then
|
if [ $network_cut -eq 1 ]; then
|
||||||
|
|
Loading…
Reference in New Issue