diff --git a/tools/ocft/IPaddr2v4 b/tools/ocft/IPaddr2v4 index 14482212c..4d371683b 100644 --- a/tools/ocft/IPaddr2v4 +++ b/tools/ocft/IPaddr2v4 @@ -1,295 +1,323 @@ # IPaddr2v4 # Note: This test case uses two NICs(eth0, eth1) and # a IPv4 address prefix (192.168.144.0/24). # Adjust them according to your environment at VARIABLE section if needed. CONFIG Agent IPaddr2 AgentRoot /usr/lib/ocf/resource.d/heartbeat HangTimeout 20 VARIABLE OCFT_target_ip=192.168.144.2 OCFT_target_nic=eth0 OCFT_target_prefix=24 OCFT_target_netaddr=192.168.144.1/$OCFT_target_prefix OCFT_target_brd=192.168.144.255 OCFT_wrong_ip=192.168.120.1 OCFT_force_nic=eth1 OCFT_force_prefix=16 OCFT_force_prefix2=28 OCFT_force_brd=192.168.255.255 SETUP-AGENT ip addr add $OCFT_target_netaddr dev $OCFT_target_nic brd $OCFT_target_brd CLEANUP-AGENT ip addr del $OCFT_target_netaddr dev $OCFT_target_nic CASE-BLOCK required_args Env OCF_RESKEY_ip=$OCFT_target_ip Env OCFT_check_ip=$OCFT_target_ip Env OCFT_check_prefix=$OCFT_target_prefix Env OCFT_check_nic=$OCFT_target_nic CASE-BLOCK check_ip_assigned Bash ip -4 -o addr show $OCFT_check_nic | grep -w $OCFT_check_ip/$OCFT_check_prefix >/dev/null # checking if the IPv4 address was assigned correctly CASE-BLOCK check_ip_removed Bash ! ip -4 -o addr show $OCFT_check_nic | grep -w $OCFT_check_ip/$OCFT_check_prefix >/dev/null # checking if the IPv4 address was removed correctly CASE-BLOCK base_ip_assigned Bash ip addr add $OCFT_target_netaddr dev $OCFT_target_nic brd $OCFT_target_brd CASE-BLOCK base_ip_removed Bash ip addr del $OCFT_target_netaddr dev $OCFT_target_nic CASE-BLOCK default_status AgentRun stop CASE-BLOCK prepare Include required_args Include default_status # CASE No.0 # CASE "normal start" Include prepare AgentRun start OCF_SUCCESS Include check_ip_assigned # CASE No.1 # CASE "normal stop" Include prepare AgentRun start AgentRun stop OCF_SUCCESS Include check_ip_removed # CASE No.2 # CASE "double start" Include prepare AgentRun start AgentRun start OCF_SUCCESS # CASE No.3 # CASE "double stop" Include prepare AgentRun stop OCF_SUCCESS # CASE No.4 # CASE "monitor with running" Include prepare AgentRun start AgentRun monitor OCF_SUCCESS # CASE No.5 # CASE "monitor with not running" Include prepare AgentRun monitor OCF_NOT_RUNNING # CASE No.6 +# Note: this result is different from IPaddr2 in 3.9.3. +# IPaddr2 succeeds if the ip matched based on the netmask of the subnet +# or fails if it did not match to any. +# Recommended to always specify both nic, cidr_netmask, and broadcast when you needed. # IPaddr2 in 3.9.3 was using a wrong subnet mask (constant of 32) in this case. # CASE "params with nic, no cidr_netmask" Include prepare Env OCF_RESKEY_nic=$OCFT_target_nic - Env OCFT_check_prefix=32 # This is wrong. AgentRun start OCF_SUCCESS Include check_ip_assigned AgentRun monitor OCF_SUCCESS AgentRun stop OCF_SUCCESS Include check_ip_removed # CASE No.7 # CASE "params with nic, cidr_netmask" Include prepare Env OCF_RESKEY_nic=$OCFT_target_nic Env OCF_RESKEY_cidr_netmask=$OCFT_target_prefix AgentRun start OCF_SUCCESS Include check_ip_assigned AgentRun monitor OCF_SUCCESS AgentRun stop OCF_SUCCESS Include check_ip_removed # CASE No.8 # CASE "error params with wrong ip" Include prepare Env OCF_RESKEY_ip=$OCFT_wrong_ip AgentRun start OCF_ERR_GENERIC # CASE No.9 +# Note: this result is different from IPaddr2 in 3.9.3. +# IPaddr2 fails when it could not determine the correct subnet mask. +# When it could not get base ip, it becomes the error. +# Recommended to always specify both nic, cidr_netmask, and broadcast when you needed. # IPaddr2 in 3.9.3 was using a wrong subnet mask (constant of 32) in this case. # CASE "params with force nic" Include prepare Env OCF_RESKEY_nic=$OCFT_force_nic Env OCFT_check_nic=$OCFT_force_nic - AgentRun start OCF_SUCCESS - AgentRun stop OCF_SUCCESS + AgentRun start OCF_ERR_GENERIC Include check_ip_removed Unenv OCF_RESKEY_nic # CASE No.10 +# Note: this result is different from IPaddr2 in 3.9.3. +# IPaddr2 fails when it could not determine the broadcast. +# Recommended to always specify both nic, cidr_netmask, and broadcast when you needed. # IPaddr2 in 3.9.3 succeeded but it's considered ambiguous. # CASE "params with force cidr_netmask (base netmask > assigned netmask)" Include prepare Env OCF_RESKEY_cidr_netmask=$OCFT_force_prefix Env OCFT_check_prefix=$OCFT_force_prefix - AgentRun start OCF_SUCCESS - AgentRun stop OCF_SUCCESS + AgentRun start OCF_ERR_GENERIC Include check_ip_removed # CASE No.11 +# Note: this result is different from IPaddr2 in 3.9.3. +# IPaddr2 succeeds but the broadcast is not set. +# This is because findif.sh can not calculate a broadcast from a netmask. +# Recommended to always specify both nic, cidr_netmask, and broadcast when you needed. # IPaddr2 in 3.9.3 succeeded with using a calculated broadcast. # CASE "force to use the specified nic and cidr_netmask" Include prepare Env OCF_RESKEY_nic=$OCFT_force_nic Env OCF_RESKEY_cidr_netmask=$OCFT_force_prefix Env OCFT_check_nic=$OCFT_force_nic Env OCFT_check_prefix=$OCFT_force_prefix AgentRun start OCF_SUCCESS AgentRun stop OCF_SUCCESS Include check_ip_removed Unenv OCF_RESKEY_cidr_netmask # CASE No.12 +# Note: this result is different from IPaddr2 in 3.9.3. +# IPaddr2 fails when it could not determine the correct subnet mask. +# When it could not get base ip, it becomes the error. +# Recommended to always specify both nic, cidr_netmask, and broadcast when you needed. # IPaddr2 in 3.9.3 was using a wrong subnet mask (constant of 32) in this case. # CASE "error params with wrong ip and nic (not exist base_ip)" Include prepare Include base_ip_removed Env OCF_RESKEY_nic=$OCFT_target_nic Env OCFT_check_nic=$OCFT_target_nic - AgentRun start OCF_SUCCESS - AgentRun stop OCF_SUCCESS + AgentRun start OCF_ERR_GENERIC Include check_ip_removed Include base_ip_assigned # CASE No.13 # CASE "params with cidr_netmask" Include prepare Env OCF_RESKEY_cidr_netmask=$OCFT_target_prefix AgentRun start OCF_SUCCESS Include check_ip_assigned AgentRun monitor OCF_SUCCESS AgentRun stop OCF_SUCCESS Include check_ip_removed # CASE No.14 +# Note: this result is different from IPaddr2 in 3.9.3. +# IPaddr2 does not override the broadcast by cidr_netmask. +# Recommended to always specify both nic, cidr_netmask, and broadcast when you needed. # IPaddr2 in 3.9.3 overrode the broadcast calculated by cidr_netmask. # CASE "params with force cidr_netmask (base netmask < assigned netmask)" Include prepare Env OCF_RESKEY_cidr_netmask=$OCFT_force_prefix2 Env OCFT_check_prefix=$OCFT_force_prefix2 AgentRun start OCF_SUCCESS Include check_ip_assigned AgentRun monitor OCF_SUCCESS AgentRun stop OCF_SUCCESS Include check_ip_removed # CASE No.15 +# Note: this result is different from IPaddr2 in 3.9.3. +# IPaddr2 fails when it could not determine the broadcast. +# Recommended to always specify both nic, cidr_netmask, and broadcast when you needed. # IPaddr2 in 3.9.3 succeeded but it's considered ambiguous. # CASE "error params with wrong ip and cidr_netmask (not exist base_ip)" Include prepare Include base_ip_removed Env OCF_RESKEY_cidr_netmask=$OCFT_target_prefix - AgentRun start OCF_SUCCESS - AgentRun stop OCF_SUCCESS + AgentRun start OCF_ERR_GENERIC Include base_ip_assigned # CASE No.16 +# Note: this result is different from IPaddr2 in 3.9.3. +# IPaddr2 succeeds but the broadcast is not set. +# This is because findif.sh can not calculate a broadcast from a netmask. +# Recommended to always specify both nic, cidr_netmask, and broadcast when you needed. # IPaddr2 in 3.9.3 succeeded with using a calculated broadcast. # CASE "force to use the specified nic and cidr_netmask" Include prepare Env OCF_RESKEY_nic=$OCFT_force_nic Env OCF_RESKEY_cidr_netmask=$OCFT_force_prefix2 Env OCFT_check_prefix=$OCFT_force_prefix2 Env OCFT_check_nic=$OCFT_force_nic AgentRun start OCF_SUCCESS AgentRun stop OCF_SUCCESS Include check_ip_removed # CASE No.17 +# Note: this result is different from IPaddr2 in 3.9.3. +# IPaddr2 succeeds but the broadcast is not set. +# This is because findif.sh can not calculate a broadcast from a netmask. +# Recommended to always specify both nic, cidr_netmask, and broadcast when you needed. # IPaddr2 in 3.9.3 succeeded with using a calculated broadcast. # CASE "force to use the specified nic and cidr_netmask (not exist base_ip)" Include prepare Include base_ip_removed Env OCF_RESKEY_nic=$OCFT_force_nic Env OCF_RESKEY_cidr_netmask=$OCFT_force_prefix2 Env OCFT_check_prefix=$OCFT_force_prefix2 Env OCFT_check_nic=$OCFT_force_nic AgentRun start OCF_SUCCESS AgentRun stop OCF_SUCCESS Unenv OCF_RESKEY_nic Unenv OCF_RESKEY_cidr_netmask Include base_ip_assigned # CASE No.18 # CASE "params with broadcast, no nic, no cidr_netmask" Include prepare Env OCF_RESKEY_broadcast=$OCFT_force_brd AgentRun start OCF_SUCCESS Include check_ip_assigned AgentRun monitor OCF_SUCCESS AgentRun stop OCF_SUCCESS Include check_ip_removed # CASE No.19 # CASE "params with broadcast, no nic, no cidr_netmask" Include prepare Include base_ip_removed Env OCF_RESKEY_broadcast=$OCFT_force_brd AgentRun start OCF_ERR_GENERIC Include base_ip_assigned # CASE No.20 # CASE "force to use the specified nic and cidr_netmask" Include prepare Env OCF_RESKEY_nic=$OCFT_force_nic Env OCF_RESKEY_cidr_netmask=$OCFT_force_prefix Env OCF_RESKEY_broadcast=$OCFT_force_brd Env OCFT_check_nic=$OCFT_force_nic Env OCFT_check_prefix=$OCFT_force_prefix AgentRun start OCF_SUCCESS Include check_ip_assigned AgentRun monitor OCF_SUCCESS AgentRun stop OCF_SUCCESS Include check_ip_removed Unenv OCF_RESKEY_cidr_netmask # CASE No.21 # CASE "force to use the specified nic and cidr_netmask" Include prepare Include base_ip_removed Env OCF_RESKEY_nic=$OCFT_force_nic Env OCF_RESKEY_cidr_netmask=$OCFT_force_prefix2 Env OCF_RESKEY_broadcast=$OCFT_target_brd Env OCFT_check_nic=$OCFT_force_nic Env OCFT_check_prefix=$OCFT_force_prefix2 AgentRun start OCF_SUCCESS Include check_ip_assigned AgentRun monitor OCF_SUCCESS AgentRun stop OCF_SUCCESS Include check_ip_removed Include base_ip_assigned diff --git a/tools/ocft/IPaddr2v4 b/tools/ocft/IPaddr2v6 similarity index 58% copy from tools/ocft/IPaddr2v4 copy to tools/ocft/IPaddr2v6 index 14482212c..0685dea0c 100644 --- a/tools/ocft/IPaddr2v4 +++ b/tools/ocft/IPaddr2v6 @@ -1,295 +1,250 @@ -# IPaddr2v4 +# IPaddr2v6 # Note: This test case uses two NICs(eth0, eth1) and -# a IPv4 address prefix (192.168.144.0/24). +# a IPv6 address prefix (2001:db8::/32, RFC3849). # Adjust them according to your environment at VARIABLE section if needed. CONFIG Agent IPaddr2 AgentRoot /usr/lib/ocf/resource.d/heartbeat HangTimeout 20 VARIABLE - OCFT_target_ip=192.168.144.2 + OCFT_target_ip=2001:db8:1234::2 OCFT_target_nic=eth0 - OCFT_target_prefix=24 - OCFT_target_netaddr=192.168.144.1/$OCFT_target_prefix - OCFT_target_brd=192.168.144.255 - OCFT_wrong_ip=192.168.120.1 + OCFT_target_prefix=64 + OCFT_target_netaddr=2001:db8:1234::1/$OCFT_target_prefix + OCFT_target_linklocal=fe80::2 + OCFT_wrong_ip=2001:db8:5678::2 OCFT_force_nic=eth1 - OCFT_force_prefix=16 - OCFT_force_prefix2=28 - OCFT_force_brd=192.168.255.255 + OCFT_force_prefix=80 + OCFT_force_prefix2=48 SETUP-AGENT - ip addr add $OCFT_target_netaddr dev $OCFT_target_nic brd $OCFT_target_brd + ip addr add $OCFT_target_netaddr dev $OCFT_target_nic CLEANUP-AGENT ip addr del $OCFT_target_netaddr dev $OCFT_target_nic CASE-BLOCK required_args Env OCF_RESKEY_ip=$OCFT_target_ip Env OCFT_check_ip=$OCFT_target_ip Env OCFT_check_prefix=$OCFT_target_prefix Env OCFT_check_nic=$OCFT_target_nic CASE-BLOCK check_ip_assigned - Bash ip -4 -o addr show $OCFT_check_nic | grep -w $OCFT_check_ip/$OCFT_check_prefix >/dev/null # checking if the IPv4 address was assigned correctly + Bash ip -6 -o addr show $OCFT_check_nic | grep -w $OCFT_check_ip/$OCFT_check_prefix >/dev/null # checking if the IPv6 address was assigned correctly CASE-BLOCK check_ip_removed - Bash ! ip -4 -o addr show $OCFT_check_nic | grep -w $OCFT_check_ip/$OCFT_check_prefix >/dev/null # checking if the IPv4 address was removed correctly + Bash ! ip -6 -o addr show $OCFT_check_nic | grep -w $OCFT_check_ip/$OCFT_check_prefix >/dev/null # checking if the IPv6 address was removed correctly CASE-BLOCK base_ip_assigned - Bash ip addr add $OCFT_target_netaddr dev $OCFT_target_nic brd $OCFT_target_brd + Bash ip addr add $OCFT_target_netaddr dev $OCFT_target_nic CASE-BLOCK base_ip_removed Bash ip addr del $OCFT_target_netaddr dev $OCFT_target_nic CASE-BLOCK default_status AgentRun stop CASE-BLOCK prepare Include required_args Include default_status # CASE No.0 # CASE "normal start" Include prepare AgentRun start OCF_SUCCESS Include check_ip_assigned # CASE No.1 # CASE "normal stop" Include prepare - AgentRun start + AgentRun start OCF_SUCCESS AgentRun stop OCF_SUCCESS Include check_ip_removed # CASE No.2 # CASE "double start" Include prepare AgentRun start AgentRun start OCF_SUCCESS # CASE No.3 # CASE "double stop" Include prepare AgentRun stop OCF_SUCCESS # CASE No.4 # CASE "monitor with running" Include prepare AgentRun start AgentRun monitor OCF_SUCCESS # CASE No.5 # CASE "monitor with not running" Include prepare AgentRun monitor OCF_NOT_RUNNING # CASE No.6 -# IPaddr2 in 3.9.3 was using a wrong subnet mask (constant of 32) in this case. # -CASE "params with nic, no cidr_netmask" +CASE "error params with wrong ip" Include prepare - Env OCF_RESKEY_nic=$OCFT_target_nic - Env OCFT_check_prefix=32 # This is wrong. - AgentRun start OCF_SUCCESS - Include check_ip_assigned - AgentRun monitor OCF_SUCCESS - AgentRun stop OCF_SUCCESS - Include check_ip_removed + Env OCF_RESKEY_ip=$OCFT_wrong_ip + AgentRun start OCF_ERR_GENERIC # CASE No.7 # -CASE "params with nic, cidr_netmask" +CASE "start for a link-local IPv6 address when no nic" + Include prepare + Env OCF_RESKEY_ip=$OCFT_target_linklocal + Env OCFT_check_ip=$OCFT_target_linklocal + # nic is mandatory for a link-local address + AgentRun start OCF_ERR_GENERIC + +# CASE No.8 +# +CASE "params with nic, no cidr_netmask" Include prepare Env OCF_RESKEY_nic=$OCFT_target_nic - Env OCF_RESKEY_cidr_netmask=$OCFT_target_prefix AgentRun start OCF_SUCCESS Include check_ip_assigned AgentRun monitor OCF_SUCCESS AgentRun stop OCF_SUCCESS Include check_ip_removed -# CASE No.8 -# -CASE "error params with wrong ip" - Include prepare - Env OCF_RESKEY_ip=$OCFT_wrong_ip - AgentRun start OCF_ERR_GENERIC - # CASE No.9 -# IPaddr2 in 3.9.3 was using a wrong subnet mask (constant of 32) in this case. # -CASE "params with force nic" +CASE "normal usage for a link-local IPv6 address, params with nic" Include prepare - Env OCF_RESKEY_nic=$OCFT_force_nic - Env OCFT_check_nic=$OCFT_force_nic + Env OCF_RESKEY_ip=$OCFT_target_linklocal + Env OCFT_check_ip=$OCFT_target_linklocal + # nic is mandatory for a link-local address + Env OCF_RESKEY_nic=$OCFT_target_nic + Env OCFT_check_nic=$OCFT_target_nic AgentRun start OCF_SUCCESS + Include check_ip_assigned AgentRun stop OCF_SUCCESS Include check_ip_removed - Unenv OCF_RESKEY_nic # CASE No.10 -# IPaddr2 in 3.9.3 succeeded but it's considered ambiguous. # -CASE "params with force cidr_netmask (base netmask > assigned netmask)" +CASE "error params with wrong ip and nic (not exist base_ip)" Include prepare - Env OCF_RESKEY_cidr_netmask=$OCFT_force_prefix - Env OCFT_check_prefix=$OCFT_force_prefix - AgentRun start OCF_SUCCESS - AgentRun stop OCF_SUCCESS + Include base_ip_removed + Env OCF_RESKEY_nic=$OCFT_target_nic + Env OCFT_check_nic=$OCFT_target_nic + AgentRun start OCF_ERR_GENERIC Include check_ip_removed + Include base_ip_assigned # CASE No.11 -# IPaddr2 in 3.9.3 succeeded with using a calculated broadcast. # -CASE "force to use the specified nic and cidr_netmask" +CASE "params with force nic" Include prepare Env OCF_RESKEY_nic=$OCFT_force_nic - Env OCF_RESKEY_cidr_netmask=$OCFT_force_prefix Env OCFT_check_nic=$OCFT_force_nic - Env OCFT_check_prefix=$OCFT_force_prefix - AgentRun start OCF_SUCCESS - AgentRun stop OCF_SUCCESS + AgentRun start OCF_ERR_GENERIC Include check_ip_removed - Unenv OCF_RESKEY_cidr_netmask - + Unenv OCF_RESKEY_nic # CASE No.12 -# IPaddr2 in 3.9.3 was using a wrong subnet mask (constant of 32) in this case. # -CASE "error params with wrong ip and nic (not exist base_ip)" +CASE "params with force cidr_netmask" Include prepare - Include base_ip_removed - Env OCF_RESKEY_nic=$OCFT_target_nic - Env OCFT_check_nic=$OCFT_target_nic + Env OCF_RESKEY_cidr_netmask=$OCFT_target_prefix + Env OCFT_check_prefix=$OCFT_target_prefix AgentRun start OCF_SUCCESS + Include check_ip_assigned AgentRun stop OCF_SUCCESS Include check_ip_removed - Include base_ip_assigned # CASE No.13 # -CASE "params with cidr_netmask" +CASE "params with force cidr_netmask (base netmask < assigned netmask)" Include prepare - Env OCF_RESKEY_cidr_netmask=$OCFT_target_prefix - AgentRun start OCF_SUCCESS - Include check_ip_assigned - AgentRun monitor OCF_SUCCESS - AgentRun stop OCF_SUCCESS + Env OCF_RESKEY_cidr_netmask=$OCFT_force_prefix + Env OCFT_check_prefix=$OCFT_force_prefix + AgentRun start OCF_ERR_GENERIC Include check_ip_removed # CASE No.14 -# IPaddr2 in 3.9.3 overrode the broadcast calculated by cidr_netmask. # -CASE "params with force cidr_netmask (base netmask < assigned netmask)" +CASE "params with force cidr_netmask (base netmask > assigned netmask)" Include prepare Env OCF_RESKEY_cidr_netmask=$OCFT_force_prefix2 Env OCFT_check_prefix=$OCFT_force_prefix2 - AgentRun start OCF_SUCCESS - Include check_ip_assigned - AgentRun monitor OCF_SUCCESS - AgentRun stop OCF_SUCCESS + AgentRun start OCF_ERR_GENERIC Include check_ip_removed # CASE No.15 -# IPaddr2 in 3.9.3 succeeded but it's considered ambiguous. # -CASE "error params with wrong ip and cidr_netmask (not exist base_ip)" +CASE "params with cidr_netmask" Include prepare Include base_ip_removed Env OCF_RESKEY_cidr_netmask=$OCFT_target_prefix - AgentRun start OCF_SUCCESS - AgentRun stop OCF_SUCCESS + Env OCFT_check_prefix=$OCFT_target_prefix + AgentRun start OCF_ERR_GENERIC Include base_ip_assigned # CASE No.16 -# IPaddr2 in 3.9.3 succeeded with using a calculated broadcast. # -CASE "force to use the specified nic and cidr_netmask" +CASE "params with nic, cidr_netmask" Include prepare - Env OCF_RESKEY_nic=$OCFT_force_nic - Env OCF_RESKEY_cidr_netmask=$OCFT_force_prefix2 - Env OCFT_check_prefix=$OCFT_force_prefix2 - Env OCFT_check_nic=$OCFT_force_nic + Env OCF_RESKEY_nic=$OCFT_target_nic + Env OCF_RESKEY_cidr_netmask=$OCFT_target_prefix + Env OCFT_check_nic=$OCFT_target_nic + Env OCFT_check_prefix=$OCFT_target_prefix AgentRun start OCF_SUCCESS + Include check_ip_assigned AgentRun stop OCF_SUCCESS Include check_ip_removed # CASE No.17 -# IPaddr2 in 3.9.3 succeeded with using a calculated broadcast. # -CASE "force to use the specified nic and cidr_netmask (not exist base_ip)" +CASE "force to use the specified nic and cidr_netmask (base netmask < assigned netmask)" Include prepare - Include base_ip_removed Env OCF_RESKEY_nic=$OCFT_force_nic - Env OCF_RESKEY_cidr_netmask=$OCFT_force_prefix2 - Env OCFT_check_prefix=$OCFT_force_prefix2 + Env OCF_RESKEY_cidr_netmask=$OCFT_force_prefix Env OCFT_check_nic=$OCFT_force_nic - AgentRun start OCF_SUCCESS - AgentRun stop OCF_SUCCESS - Unenv OCF_RESKEY_nic - Unenv OCF_RESKEY_cidr_netmask - Include base_ip_assigned - -# CASE No.18 -# -CASE "params with broadcast, no nic, no cidr_netmask" - Include prepare - Env OCF_RESKEY_broadcast=$OCFT_force_brd + Env OCFT_check_prefix=$OCFT_force_prefix AgentRun start OCF_SUCCESS Include check_ip_assigned - AgentRun monitor OCF_SUCCESS AgentRun stop OCF_SUCCESS Include check_ip_removed -# CASE No.19 -# -CASE "params with broadcast, no nic, no cidr_netmask" - Include prepare - Include base_ip_removed - Env OCF_RESKEY_broadcast=$OCFT_force_brd - AgentRun start OCF_ERR_GENERIC - Include base_ip_assigned - -# CASE No.20 +# CASE No.18 +# This use case is now valid. It was not allowed until v3.9.2. # -CASE "force to use the specified nic and cidr_netmask" +CASE "force to use the specified nic and cidr_netmask (base netmask > assigned netmask)" Include prepare Env OCF_RESKEY_nic=$OCFT_force_nic - Env OCF_RESKEY_cidr_netmask=$OCFT_force_prefix - Env OCF_RESKEY_broadcast=$OCFT_force_brd + Env OCF_RESKEY_cidr_netmask=$OCFT_force_prefix2 Env OCFT_check_nic=$OCFT_force_nic - Env OCFT_check_prefix=$OCFT_force_prefix + Env OCFT_check_prefix=$OCFT_force_prefix2 AgentRun start OCF_SUCCESS Include check_ip_assigned - AgentRun monitor OCF_SUCCESS AgentRun stop OCF_SUCCESS Include check_ip_removed - Unenv OCF_RESKEY_cidr_netmask -# CASE No.21 +# CASE No.19 # -CASE "force to use the specified nic and cidr_netmask" +CASE "force to use the specified nic and cidr_netmask (base netmask > assigned netmask)" Include prepare Include base_ip_removed Env OCF_RESKEY_nic=$OCFT_force_nic Env OCF_RESKEY_cidr_netmask=$OCFT_force_prefix2 - Env OCF_RESKEY_broadcast=$OCFT_target_brd Env OCFT_check_nic=$OCFT_force_nic Env OCFT_check_prefix=$OCFT_force_prefix2 AgentRun start OCF_SUCCESS Include check_ip_assigned - AgentRun monitor OCF_SUCCESS AgentRun stop OCF_SUCCESS Include check_ip_removed Include base_ip_assigned diff --git a/tools/ocft/Makefile.am b/tools/ocft/Makefile.am index 4199e241c..733e4877e 100644 --- a/tools/ocft/Makefile.am +++ b/tools/ocft/Makefile.am @@ -1,52 +1,53 @@ # Author: John Shi # jshi@suse.de # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = $(ocftcfgs_DATA) $(ocft_DATA) sbin_SCRIPTS = ocft ocftcfgsdir = $(datadir)/$(PACKAGE_NAME)/ocft/configs ocftcfgs_DATA = apache \ IPaddr2 \ IPaddr2v4 \ + IPaddr2v6 \ IPv6addr \ Filesystem \ LVM \ Raid1 \ IPsrcaddr \ MailTo \ mysql \ mysql-proxy \ pgsql \ db2 \ oracle \ drbd.linbit \ nfsserver \ portblock \ iscsi \ named \ postfix \ Xinetd \ SendArp ocftdir = $(datadir)/$(PACKAGE_NAME)/ocft ocft_DATA = README \ README.zh_CN \ caselib