3 .
"${TEST_SCRIPTS_DIR}/unit.sh"
5 define_test
"1 IP configured, broken configuration, takeip"
8 setup_ctdb_policy_routing
10 # Configuration for 1 IP
11 create_policy_routing_config
1 default
13 # takeip should add routes for the given address
14 ctdb_get_1_public_address |
15 while read dev ip bits
; do
16 # Now add configuration breakage by changing default route into a
17 # link local route with a gateway
18 net
=$
(ipv4_host_addr_to_net
"$ip" "$bits")
19 sed -i -e "s@0\.0\.0\.0/0@${net}@" "$CTDB_PER_IP_ROUTING_CONF"
22 RTNETLINK answers: File exists
23 add_routing_for_ip: failed to add route: ${net} via ${net%.*}.254 dev ${dev} table ctdb.${ip}
25 simple_test_event
"takeip" $dev $ip $bits