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

List:       linux-ha-dev
Subject:    Re: [Linux-ha-dev] Some code: Indicates Primary
From:       Alan Robertson <alanr () unix ! sh>
Date:       2002-04-30 23:57:19
[Download RAW message or body]

dru-hb@redwoodsoft.com wrote:

> Hello,
> 
> I have added some code to 0.4.9.1 to indicate to
> the resource scripts the condition that they
> were running on the primary node or not. It sets
> the environment variable HA_ONPRIMARY to "Yes" or
> "No".
> 
> This can be used, for example, to properly turn on the
> AudibleAlarm when a node fails and to turn it off when
> the primary comes back online. (Note: like in normal,
> operation, it does not cause the primary to beep when
> the secondary is off-line. I think that is more of a
> problem with the way AudibleAlarm is treated as a resource.
> I think this patch just makes it usable for a simple case).
> 
> I also need this for a few other resources (some of the
> block devices resources)
> 
> This handles NICEFAILBACK by treating any node that it runs
> on as HA_ONPRIMARY = Yes.
> 
> This is a really tiny patch, and of course, expect to
> hear comments on this.
> 


This sounds like a generally good idea.

There are logically three conditions, (but I'm not sure if there is a need 
to keep them distinct).

1) I'm running on the preferred node
2) I'm not running on the preferred node
3) There is no preference of node indicated by the configuration.

What you're doing is collapsing cases (1) and (3).  Would it be a problem to 
keep them distinct?


	-- 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