mirror of
https://github.com/schoebel/mars
synced 2025-02-20 14:17:10 +00:00
test_suite: the first argument to marsadm_do_cmd must not be an option (e.g. --force)
This commit is contained in:
parent
61ec08c5a8
commit
b9d52bcb74
@ -100,7 +100,7 @@ function resource_leave
|
|||||||
if resource_joined $host $res; then
|
if resource_joined $host $res; then
|
||||||
resource_secondary $host $res
|
resource_secondary $host $res
|
||||||
local cmd
|
local cmd
|
||||||
for cmd in "down" "--force leave-resource"; do
|
for cmd in "down" "leave-resource --force"; do
|
||||||
marsadm_do_cmd $host "$cmd" $res || lib_exit 1
|
marsadm_do_cmd $host "$cmd" $res || lib_exit 1
|
||||||
done
|
done
|
||||||
resource_do_after_leave_loops $host $res
|
resource_do_after_leave_loops $host $res
|
||||||
|
@ -159,7 +159,7 @@ function switch2primary_force
|
|||||||
if [ $switch2primary_connected -eq 0 ]; then
|
if [ $switch2primary_connected -eq 0 ]; then
|
||||||
net_do_impact_cmd $orig_secondary "on" "remote_host=$orig_primary"
|
net_do_impact_cmd $orig_secondary "on" "remote_host=$orig_primary"
|
||||||
fi
|
fi
|
||||||
marsadm_do_cmd $orig_secondary "--force primary" "$res" || lib_exit 1
|
marsadm_do_cmd $orig_secondary "primary --force" "$res" || lib_exit 1
|
||||||
if [ $switch2primary_logrotate_orig_primary -eq 1 ]; then
|
if [ $switch2primary_logrotate_orig_primary -eq 1 ]; then
|
||||||
logrotate_loop $orig_primary $res 3 4
|
logrotate_loop $orig_primary $res 3 4
|
||||||
fi
|
fi
|
||||||
@ -281,9 +281,9 @@ function switch2primary_correct_split_brain
|
|||||||
else
|
else
|
||||||
local lv_dev=$(lv_config_get_lv_device $res)
|
local lv_dev=$(lv_config_get_lv_device $res)
|
||||||
marsadm_do_cmd $new_secondary "down" "$res" || lib_exit 1
|
marsadm_do_cmd $new_secondary "down" "$res" || lib_exit 1
|
||||||
marsadm_do_cmd $new_secondary "--force leave-resource" "$res" || \
|
marsadm_do_cmd $new_secondary "leave-resource --force" "$res" || \
|
||||||
lib_exit 1
|
lib_exit 1
|
||||||
marsadm_do_cmd $new_secondary "--force join-resource" "$res $lv_dev" \
|
marsadm_do_cmd $new_secondary "join-resource --force" "$res $lv_dev" \
|
||||||
|| lib_exit 1
|
|| lib_exit 1
|
||||||
fi
|
fi
|
||||||
lib_wait_for_initial_end_of_sync $new_primary $new_secondary $res \
|
lib_wait_for_initial_end_of_sync $new_primary $new_secondary $res \
|
||||||
|
@ -18,6 +18,8 @@ function marsadm_do_cmd
|
|||||||
resize*|pause-sync*|primary*|secondary*) \
|
resize*|pause-sync*|primary*|secondary*) \
|
||||||
$post_condition_check $host "$cmd_args"
|
$post_condition_check $host "$cmd_args"
|
||||||
;;
|
;;
|
||||||
|
_*) lib_exit 1 "invalid command starting with - or _"
|
||||||
|
;;
|
||||||
*) :
|
*) :
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user