test_suite: fix replay is-device-on with is-device in marsadm wait-resource

This commit is contained in:
Frank Liepold 2014-04-09 12:59:29 +02:00
parent 7d0ce1d9d7
commit e5ce64e69e
3 changed files with 5 additions and 6 deletions

View File

@ -127,7 +127,7 @@ function marsadm_check_post_condition_role_switch
local res=${cmd_args[0]}
local role_act ls_returncode_req ls_returncode_act maxcount=5 count=0
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
;;
secondary) marsadm_do_cmd $host "wait-resource" "$res is-device-off" || lib_exit 1

View File

@ -55,7 +55,7 @@ function resource_quick_prepare_first_resource
cluster_clear_and_mount_mars_dir_all
cluster_insert_mars_module_all
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
resource_check_data_device_after_create $primary_host $res
lib_rw_remote_check_device_fs $primary_host $data_dev "xfs"
@ -422,7 +422,7 @@ function resource_create
cluster_insert_mars_module_all
marsadm_do_cmd $host "create-resource $resource_create_flag" \
"$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=$?
if [ $rc -ne 0 ]; then
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 data_dev=$(resource_get_data_device $res)
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_vmsg " ${debug_msg_prefix}write to $primary_host:$data_dev and log-rotate/delete"
local count=0 maxcount=3

View File

@ -384,8 +384,7 @@ function switch2primary_correct_split_brain
sleep 15
marsadm_do_cmd $new_primary "log-purge-all --force" "$res" || lib_exit 1
fi
marsadm_do_cmd $new_primary "wait-resource" "$res is-device-on" || \
lib_exit 1
marsadm_do_cmd $new_primary "wait-resource" "$res is-device" || lib_exit 1
lib_vmsg " $switch2primary_flow_msg_prefix: check whether new primary $new_primary works standalone"
switch2primary_check_standalone_primary $new_primary $res
if [ $network_cut -eq 1 ]; then