[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-ha-dev
Subject:    Re: [Linux-ha-dev] heartbeat not stopping network rc script
From:       Alan Robertson <alanr () unix ! sh>
Date:       2001-03-15 22:34:48
[Download RAW message or body]

David Sonenberg wrote:
> 
> I have heartbeat setup with this line in my haresources:
> 
> firewall1.metistech.com network mon
> 
> Heartbeat starts networking fine but doesn't shutdown the network when
> it fails over (I currently use mon to do this).  If I'm not mistaken
> heartbeat should send run the following command
> '/etc/rc.d/init.d/network stop'.  Mon get shut off when during a
> failover.  I'm running heartbeat-0.4.8m-1.   Here is the network script:

[snip]

The key thing is the "status" function...  This is how heartbeat tells if a
given node owns a given resource.

>   status)
>        echo "Configured devices:"
>        echo lo $interfaces
> 
>        if [ -x /bin/linuxconf ] ; then
>                eval `/bin/linuxconf --hint netdev`
>                echo "Devices that are down:"
>                echo $DEV_UP
>                echo "Devices with modified configuration:"
>                echo $DEV_RECONF
>        else
>                echo "Currently active devices:"
>                echo `/sbin/ifconfig | grep ^[a-z] | awk '{print $1}'`
>        fi
>        ;;

The convention that Red Hat follows is that their "status" scripts normally
output the word "running" when the corresponding service is running.  SuSE's
scripts output the word "OK" when the corresponding service is running. 
Heartbeat looks at the output for either running or OK.

This script doesn't appear to do either.

However, there is an additional constraint which you will probably run afoul
of when you get past this one...

Heartbeat expects to be in sole control of these resources.  In other words,
a particular resource (network in this case) is expected to be running ONLY
when heartbeat starts it.

My guess is that is not what you want to do.  Otherwise, you would be
completely unable to reach a machine when it is the backup.  This would make
the machine difficult to maintain, and you would be unable to test the
networking hardware in this configuration.  If your backup machine's
networking hardware failed, you would be unable to tell this until it didn't
fail over properly.  And then, you would have to walk up to the machine's
physical console to tell that.  Not very highly-available.

My thought is that shutting down the entire network is too coarse-grained an
approach.

Perhaps I misunderstand what you're trying to do...

	-- Alan Robertson
	   alanr@unix.sh
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.community.tummy.com
http://lists.community.tummy.com/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic