[Debian-ha-maintainers] Bug#720453: findif does not find netmask and NIC automatically
Harald Weidner
hweidner at gmx.net
Thu Aug 22 05:57:05 UTC 2013
Package: resource-agents
Version: 1:3.9.2-5+deb7u1
The output of /usr/lib/heartbeat/findif --help suggests that OCF_RESKEY_ip
is the only required parameter for findif:
/usr/lib/heartbeat/findif version 2.99.1 Copyright Alan Robertson
Usage: /usr/lib/heartbeat/findif [-C]
Options:
-C: Output netmask as the number of bits rather than as 4 octets.
Environment variables:
OCF_RESKEY_ip ip address (mandatory!)
OCF_RESKEY_cidr_netmask netmask of interface
OCF_RESKEY_broadcast broadcast address for interface
OCF_RESKEY_nic interface to assign to
This was true in Debian 6 and earlier. findif used the current routing
table to discover the netmask and NIC unless explicitely set.
However, in Debian wheezy this is no longer true. findif refuses to work
when OCF_RESKEY_cidr_netmask is unset. Moreover, if OCF_RESKEY_nic is unset,
always the interface name of the default gateway is taken, even if the
IP address belogs to an other network.
Example: on a host with this routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 10.1.10.1 0.0.0.0 UG 0 0 0 bond0
10.1.20.0 0.0.0.0 255.255.255.0 U 0 0 0 bond1
10.1.10.0 0.0.0.0 255.255.255.0 U 0 0 0 bond0
findif refuses to work without cidr_netmask:
$ OCF_RESKEY_ip=10.1.20.5 /usr/lib/heartbeat/findif -C
ERROR: Cannot use default route w/o netmask [10.1.20.5]
and outputs the wrong interface:
$ OCF_RESKEY_ip=10.1.20.5 OCF_RESKEY_cidr_netmask=24 /usr/lib/heartbeat/findif -C
bond0 netmask 24 broadcast 10.1.20.255
This change makes it necessary to rewrite all the IPaddr2 cluster resoures giving
explicit cidr_netmask and nic parameters.
This changed behaviour should either be reverted or explicitly stated in the
changelog and --help output.
Regards, Harald
More information about the Debian-ha-maintainers
mailing list