[Linux-HA] cl_status rscstatus

Guochun Shi gshi at ncsa.uiuc.edu
Thu Oct 20 11:56:48 MDT 2005


At 09:24 AM 10/20/2005 -0600, you wrote:
>Pascal Bleser wrote:
>>Jens Grigel wrote:
>
>>Any advice on the best way to know whether the node I'm running on is
>>the "active" node ?
>
>That question is meaningless to heartbeat.
>
>>There are no resources that are local to a given node. Hence, I
>>suppose that I should never get the "foreign" or "local" status. Am I
>>correct ? ;-)
>>As far as I understand this, "local" and "foreign" could only happen
>if, say, I have a different
>>haresources definition on node 1 than on node 2, with e.g. some
>haresources that are only defined on
>>node 1.
>
>No.  That would be a misunderstanding.
>
>>My current /etc/ha.d/haresources is as follows: lvs1 10.10.2.10/24
>>mon rinetd apache2
>>where "lvs1" = the preferred cluster node, "10.10.2.10/24" = the
>cluster VIP
>>I have exactly the same haresources definition on the 2nd node.
>>Could I still end up with a resource status "foreign" or "local" in
>the cl_status output
>
>Absolutely.  Foreign is unlikely (but possible), but local, none or all are easy to come up with.
>
>For example, if you're running on lvs1, and it is running the IP address, mon, etc, then you'll get "local" or "all".
>
>If you're running on lvs2, and it is running those resources you'll get "all" or "foreign".
>
>If you're running on lvs1 and it is not running those resources, you'll get foreign, or none.
>
>If you're running on lvs2 and it is not running these resources, you'll get local or none.
>
>The meaning of these terms is clearer if you're running an active/active cluster like from this haresources file:
>        lvs1    10.10.2.10/24 mon rinetd apache2
>        lvs2    10.10.2.11/24
>
>On LVS1:
>        local == 10.10.2.10/24 mon rinetd apache2
>        foreign == 10.10.2.11/24
>        all == 10.10.2.10/24 mon rinetd apache2 10.10.2.11/24
>On LVS2:
>        foreign == 10.10.2.10/24 mon rinetd apache2
>        local == 10.10.2.11/24
>        all == 10.10.2.10/24 mon rinetd apache2 10.10.2.11/24
>
>LVS1(local) implies LVS2(local)
>LVS1(foreign) implies LVS2(foreign)
>LVS1(all) implies LVS2(none) (or LVS2 down)
>LVS1(none) implies LVS2(all)
>
>LVS2(local) implies LVS1(local)
>LVS2(foreign) implies LVS1(foreign)
>LVS2(all) implies LVS1(none) (or LVS1 down)
>LVS2(none) implies LVS1(all)
>
>
>If you issue this command on both nodes (one at a time):
>        cl_standby local

I believe you meant to say "hb_standby" here :)

-Guochun



>then after this, both machines will be running foreign resources. Weird, but if you want, you can do it.  This is about the only way to make a node run only foreign resources.
>
>
>-- 
>    Alan Robertson <alanr at unix.sh>
>
>"Openness is the foundation and preservative of friendship...  Let me claim from you at all times your undisguised opinions." - William Wilberforce
>_______________________________________________
>Linux-HA mailing list
>Linux-HA at lists.linux-ha.org
>http://lists.linux-ha.org/mailman/listinfo/linux-ha
>See also: http://linux-ha.org/ReportingProblems




More information about the Linux-HA mailing list