[Linux-HA] ifconfig syntax error when releasing a FreeBSD IP address
François Belliard - ELIOS
francois.belliard at elios-informatique.fr
Tue Oct 17 02:56:24 MDT 2006
Hello
I installed heartbeat 2.0.7 on a FreeBSD 6.1 server.
When I stop heartbeat (heartbeat.sh stop), it can't release correctly
the IP address (as described below in ha-debug log file) and
automatically reboot the server.
* /var/log/ha-debug :
/...
INFO: /sbin/ifconfig xl0 192.168.8.8 inet delete
ifconfig: inet: bad value
WARNING: IP Address 192.168.8.8 NOT released
ERROR: IPaddr Generic error
.../
Is there a bug in IPaddr for FreeBSD ?
Because the "ifconfig" call generated is not correct for FreeBSD ("inet"
option shifted to the right of the IP address).
When looking in OCF resource "IPaddr", the call to "delete_interface"
function is
/delete_interface "$ifname $ipaddr"/
while its definition is
/delete_interface () {
ifname="$1"
ipaddr="$2"
case "$SYSTYPE" in
...
*BSD)
CMD="$IFCONFIG $ifname inet $ipaddr delete"
;;
.../
so that parameters in the call are interpreted as a single one due to
the quote usage.
And inside delete_interface function :
$ifname="$1" is initialised with both ifname and ipaddr and
$ipaddr="$2" is set empty
Regards,
--
Cordialement,
François Belliard
ELIOS Informatique
+33 2 99 63 85 30
More information about the Linux-HA
mailing list