When shuttind down, we always unconditionally try to remove the natgw address
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 28 Oct 2010 02:36:24 +0000 (13:36 +1100)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 28 Oct 2010 02:38:07 +0000 (13:38 +1100)
even if we are not currently the natgw master.
This adds extra reliability in case we have stopped previously without removing it proper,
but does add spam messages to syslog everytime we shutdowm.

Remove these spam messages from pulluting the syslog upon normal shutdown

config/events.d/11.natgw

index 34aee19e21e79090bc80e71065bb0f2357220ae5..512f8dee8e6a86b2fc130f4e0cf1bd71da3a1615 100755 (executable)
@@ -22,7 +22,7 @@ delete_all() {
        local _maskbits=`echo $CTDB_NATGW_PUBLIC_IP | cut -d '/' -f2`
 
        [ -z "$CTDB_NATGW_PUBLIC_IFACE" ] || {
-           delete_ip_from_iface $CTDB_NATGW_PUBLIC_IFACE $_ip $_maskbits
+           delete_ip_from_iface $CTDB_NATGW_PUBLIC_IFACE $_ip $_maskbits 2>/dev/null
        }
        delete_ip_from_iface lo $_ip 32