LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

RE: No buffer space available

To: 'Roberto Nibali ' <ratz@xxxxxxxxxxxx>, "'lvs-users@xxxxxxxxxxxxxxxxxxxxxx '" <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>, 'Jeremy Kusnetz ' <JKusnetz@xxxxxxxx>
Subject: RE: No buffer space available
From: Peter Mueller <pmueller@xxxxxxxxxxxx>
Date: Mon, 30 Sep 2002 10:42:58 -0700
You guys have been busy.  I'm glad I got to sleep ;)

Ratz here is choice cuts from IPaddr.  Someday you will have to mail me an
explanation of why /proc/slabinfo is so useful and uh.. what it is.  It
makes me want to BBQ.

IFCONFIG=/sbin/ifconfig
ROUTE=/sbin/route
SENDARP=$HA_BIN/send_arp
FINDIF=$HA_BIN/findif
USAGE="usage: $0 ip-address {start|stop|status}";

find_interface() {
ip_stop() {
  BASEIP=`echo $1 | sed s'%/.*%%'`
  IF=`find_interface $BASEIP`
  if
    [ -z "$IF" ]
  then
    : Requested interface not in use
    exit 0
  fi

  if
    [ -x $HA_RCDIR/local_giveip ]
  then
    $HA_RCDIR/local_giveip $*
  fi

  $ROUTE del -host $BASEIP
  $IFCONFIG $IF down
  ha_log "info: IP Address $BASEIP released"
}
ip_start() {
#
#       Do we already service this IP address?
#
  if
    $IFCONFIG | grep "inet addr:$1 " >/dev/null 2>&1
  then
    exit 0      # We already own this IP address
  fi

  if
    IFINFO=`find_free_interface $1`
  then
    : OK got interface [$IFINFO] for $1
  else
    exit 1
  fi
  IF=`echo "$IFINFO" | cut -f1`
  IFEXTRA=`echo "$IFINFO" | cut -f2-`
  BASEIP=`echo $1 | sed s'%/.*%%'`

  if
    [ -x $HA_RCDIR/local_takeip ]
  then
    $HA_RCDIR/local_takeip $*
  fi

  ha_log "info: ifconfig $IF $BASEIP $IFEXTRA"
  $IFCONFIG $IF $BASEIP $IFEXTRA

  $ROUTE add -host $BASEIP dev $IF

  TARGET_INTERFACE=`echo $IF | sed 's%:.*%%'`

  MACADDR=$($IFCONFIG $TARGET_INTERFACE  | \
      fgrep $TARGET_INTERFACE | \
      sed \
      's/^.*HWaddr
\(..\):\(..\):\(..\):\(..\):\(..\):\(..\).*$/\1\2\3\4\5\6/')

  if [ "${MACADDR:=NULL}" = "NULL" ]; then
      ha_log "ERROR: Could not locate obtain hardware address for
$TARGET_INTERFACE"
  fi

  ha_log "info: Sending Gratuitous Arp for $BASEIP on $IF
[$TARGET_INTERFACE]"

  for j in 1 2 3 4 5
  do
   $SENDARP $TARGET_INTERFACE ${BASEIP} ${MACADDR} ${BASEIP} ffffffffffff \
     || ha_log "ERROR: Could not send gratuitous arp"
     sleep 2
  done &
}


-----Original Message-----
From: Roberto Nibali
To: lvs-users@xxxxxxxxxxxxxxxxxxxxxx; Jeremy Kusnetz
Sent: 9/30/2002 10:10 AM
Subject: Re: No  buffer space available

> /etc/ha.d/resource.d/IPaddr 216.163.120.45 start
> /etc/ha.d/resource.d/IPaddr 216.163.120.46 start

I don't know heartbeat, sorry.




<Prev in Thread] Current Thread [Next in Thread>