[Linux-ha-dev] IPaddr in -dev does not work
Lars Marowsky-Bree
lmb at suse.de
Wed Dec 13 10:57:00 MST 2006
On 2006-11-27T10:19:28, Andrew Beekhof <beekhof at gmail.com> wrote:
Andrew,
your "fixes" to the IPaddr script are broken.
9572:b91c7d5049fc introduces the netmask parameter in addition to the
cidr_netmask one in the meta-data section, but the script only uses the
cidr_netmask one.
Or rather:
9572: IFCMD="$FINDIF $OCF_RESKEY_ip"
9572: if [ -n "$OCF_RESKEY_cidr_netmask" -o -n "$OCF_RESKEY_netmask" ]; then
9572: if [ -n "$OCF_RESKEY_netmask" ]; then
9572: IFCMD="$IFCMD/$OCF_RESKEY_netmask"
9572: else
9572: IFCMD="$IFCMD/$OCF_RESKEY_cidr_netmask"
9572: fi
Here it will use either.
9572: if [ "x$OCF_RESKEY_netmask" = "x" ]; then
9572: ocf_log info "Using calculated netmask for ${OCF_RESKEY_ip}: $tmp"
9572: OCF_RESKEY_netmask=$tmp
9572: # We cant do this because netmask used to take the CIDR form...
9572: # elif [ x$tmp != x${OCF_RESKEY_netmask} ]; then
9572: # ocf_log err "Invalid parameter value: netmask [$OCF_RESKEY_netmask [Calculated netmask: $tmp]"
9572: # return $OCF_ERR_ARGS
Here it'll only use one.
With due respect, that's crap ;-)
Can someone please fix the script to
a) Export only one name in the meta-data, I don't care which, but my preference
is on the plain "netmask" one;
b) Make the script accept both names, for compatibility;
c) Make the code simply accept both formats? It's not as if that's particularly
hard.
d) World domination!
My excuse for not doing that is that I'm on vacation in 4 minutes, and I
found this during reviewing all the 2.0.7 -> 2.0.8 changes. ;-) I might
pick it up if it's still there when I return from vacation, but not sure
you want to wait for this.
Sincerely,
Lars
--
SUSE Labs, Research and Development
SUSE LINUX Products GmbH - A Novell Business -- Charles Darwin
"Ignorance more frequently begets confidence than does knowledge."
More information about the Linux-HA-Dev
mailing list