mirror of https://github.com/schoebel/mars
test_suite: remove debug code and unnecessary comments
This commit is contained in:
parent
733aeac629
commit
923d0b9f10
|
@ -365,12 +365,10 @@ function switch2primary_correct_split_brain
|
|||
lib_vmsg " $switch2primary_flow_msg_prefix: special primary --force on $new_primary"
|
||||
lib_remote_idfile $new_primary "marsadm primary --timeout=240 --force $res" || lib_exit 1
|
||||
marsadm_do_cmd $new_primary "connect" "$res" || lib_exit 1
|
||||
##marsadm_do_cmd $new_primary "secondary" "$res" || lib_exit 1
|
||||
# if the new_primary was recreated, the delete-resource in
|
||||
# switch2primary_recreate_resource destroys the resource on the
|
||||
# new_secondary. Thus two branches to restore the replication are needed
|
||||
if [ $switch2primary_full_replay_not_possible -eq 0 ]; then
|
||||
##marsadm_do_cmd $new_secondary "secondary" "$res" || lib_exit 1
|
||||
if [ $network_cut -eq 0 \
|
||||
-a $switch2primary_disconnect_before_leave_resource -eq 1 ]
|
||||
then
|
||||
|
@ -379,29 +377,12 @@ function switch2primary_correct_split_brain
|
|||
network_cut=1
|
||||
fi
|
||||
marsadm_do_cmd $new_secondary "down" "$res" || lib_exit 1
|
||||
local new_method=1
|
||||
if (( new_method )); then
|
||||
marsadm_do_cmd $new_primary "leave-resource --force --host=$new_secondary" "$res" || \
|
||||
marsadm_do_cmd $new_primary \
|
||||
"leave-resource --force --host=$new_secondary" "$res" || \
|
||||
lib_exit 1
|
||||
else
|
||||
marsadm_do_cmd $new_secondary "leave-resource --force" "$res" || \
|
||||
lib_exit 1
|
||||
fi
|
||||
echo "sleeping for propagation...."
|
||||
sleep 15
|
||||
marsadm_do_cmd $new_primary "log-purge-all --force" "$res" || lib_exit 1
|
||||
if [ $network_cut -eq 0 ]; then
|
||||
echo "Branch A"
|
||||
##marsadm_do_cmd $new_primary "primary" "$res" || lib_exit 1
|
||||
else
|
||||
echo "Branch B"
|
||||
##marsadm_primary_force $new_primary $res
|
||||
fi
|
||||
else
|
||||
echo "Branch C"
|
||||
# we need primary --force, because the deleted resource on the
|
||||
# new_secondary does not switch from primary to secondary
|
||||
##marsadm_primary_force $new_primary $res
|
||||
fi
|
||||
lib_vmsg " $switch2primary_flow_msg_prefix: check whether new primary $new_primary works standalone"
|
||||
switch2primary_check_standalone_primary $new_primary $res
|
||||
|
|
Loading…
Reference in New Issue