Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux-HA: Users

active/active resources

 

 

Linux-HA users RSS feed   Index | Next | Previous | View Threaded


mattmoran76 at gmail

Nov 5, 2009, 9:41 AM

Post #1 of 10 (433 views)
Permalink
active/active resources

Hi,

I've got pacemaker running with heartbeat in a two node cluster. I'd
like haproxy service running on both servers with the VIP for each
server. But i'd like to failover the VIP if the local haproxy fails
to start or dies. I guess the problem is that haproxy shouldn't be a
primitive as its the same service on each server and I want it running
on both. The below crm doesn't work. i'm guessing the answer is going
to be really easy?

node $id="8d5816b1-a3d0-4fb8-b741-a090c2afb8b1" test-02.sl.local
node $id="ea6257d7-d639-434f-8581-e5c7a831325a" test-01.sl.local
primitive haproxy-1 lsb:haproxy \
op monitor interval="10s"
primitive haproxy-2 lsb:haproxy \
op monitor interval="10s"
primitive haproxy_vip_1 ocf:heartbeat:IPaddr \
params ip="192.168.0.111" \
op monitor interval="10s" nic="eth1"
primitive haproxy_vip_2 ocf:heartbeat:IPaddr \
params ip="192.168.0.112" \
op monitor interval="10s" nic="eth1"
group haproxy_group_1 haproxy_vip_1 haproxy-1
group haproxy_group_2 haproxy_vip_2 haproxy-2
location test-01_ha-01 haproxy_group_1 \
rule $id="test-01_ha-01_rule-1" 100: #uname eq test-01.sl.local
location test-01_ha-02 haproxy_group_2 \
rule $id="test-01_ha-02_rule-2" 90: #uname eq test-02.sl.local
location test-02_ha-01 haproxy_group_1 \
rule $id="test-02_ha-01_rule-2" 90: #uname eq test-01.sl.local
location test-02_ha-02 haproxy_group_2 \
rule $id="test-02_ha-02_rule-1" 100: #uname eq test-02.sl.local
property $id="cib-bootstrap-options" \
dc-version="1.0.5-462f1569a43740667daf7b0f6b521742e9eb8fa7" \
cluster-infrastructure="Heartbeat" \
stonith-enabled="false"
_______________________________________________
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


mattmoran76 at gmail

Nov 5, 2009, 10:28 AM

Post #2 of 10 (412 views)
Permalink
Re: active/active resources [In reply to]

Apologies, all I needed was the on-fail setting and clone function.
Now running a much simpler config!

node $id="8d5816b1-a3d0-4fb8-b741-a090c2afb8b1" test-02.sl.local
node $id="ea6257d7-d639-434f-8581-e5c7a831325a" test-01.sl.local
primitive haproxy lsb:haproxy \
op monitor on-fail="standby" interval="15s"
primitive haproxy_vip_1 ocf:heartbeat:IPaddr \
params ip="192.168.0.111" \
op monitor interval="10s" nic="eth1"
primitive haproxy_vip_2 ocf:heartbeat:IPaddr \
params ip="192.168.0.112" \
op monitor interval="10s" nic="eth1"
clone cl-haproxy haproxy
property $id="cib-bootstrap-options" \
dc-version="1.0.5-462f1569a43740667daf7b0f6b521742e9eb8fa7" \
cluster-infrastructure="Heartbeat" \
stonith-enabled="false"

2009/11/5 Matt <mattmoran76[at]gmail.com>:
> Hi,
>
> I've got pacemaker running with heartbeat in a two node cluster.  I'd
> like haproxy service running on both servers with the VIP for each
> server.  But i'd like to failover the VIP if the local haproxy fails
> to start or dies.  I guess the problem is that haproxy shouldn't be a
> primitive as its the same service on each server and I want it running
> on both.  The below crm doesn't work. i'm guessing the answer is going
> to be really easy?
>
> node $id="8d5816b1-a3d0-4fb8-b741-a090c2afb8b1" test-02.sl.local
> node $id="ea6257d7-d639-434f-8581-e5c7a831325a" test-01.sl.local
> primitive haproxy-1 lsb:haproxy \
>        op monitor interval="10s"
> primitive haproxy-2 lsb:haproxy \
>        op monitor interval="10s"
> primitive haproxy_vip_1 ocf:heartbeat:IPaddr \
>        params ip="192.168.0.111" \
>        op monitor interval="10s" nic="eth1"
> primitive haproxy_vip_2 ocf:heartbeat:IPaddr \
>        params ip="192.168.0.112" \
>        op monitor interval="10s" nic="eth1"
> group haproxy_group_1 haproxy_vip_1 haproxy-1
> group haproxy_group_2 haproxy_vip_2 haproxy-2
> location test-01_ha-01 haproxy_group_1 \
>        rule $id="test-01_ha-01_rule-1" 100: #uname eq test-01.sl.local
> location test-01_ha-02 haproxy_group_2 \
>        rule $id="test-01_ha-02_rule-2" 90: #uname eq test-02.sl.local
> location test-02_ha-01 haproxy_group_1 \
>        rule $id="test-02_ha-01_rule-2" 90: #uname eq test-01.sl.local
> location test-02_ha-02 haproxy_group_2 \
>        rule $id="test-02_ha-02_rule-1" 100: #uname eq test-02.sl.local
> property $id="cib-bootstrap-options" \
>        dc-version="1.0.5-462f1569a43740667daf7b0f6b521742e9eb8fa7" \
>        cluster-infrastructure="Heartbeat" \
>        stonith-enabled="false"
>
_______________________________________________
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


malte at snapscouts

Nov 5, 2009, 10:30 AM

Post #3 of 10 (412 views)
Permalink
Re: active/active resources [In reply to]

You might want to set
net.ipv4.ip_nonlocal_bind = 1

so haproxy can already listen on vip_1 and vip_2

kind regards,
Malte Geierhos
> Apologies, all I needed was the on-fail setting and clone function.
> Now running a much simpler config!
>
> node $id="8d5816b1-a3d0-4fb8-b741-a090c2afb8b1" test-02.sl.local
> node $id="ea6257d7-d639-434f-8581-e5c7a831325a" test-01.sl.local
> primitive haproxy lsb:haproxy \
> op monitor on-fail="standby" interval="15s"
> primitive haproxy_vip_1 ocf:heartbeat:IPaddr \
> params ip="192.168.0.111" \
> op monitor interval="10s" nic="eth1"
> primitive haproxy_vip_2 ocf:heartbeat:IPaddr \
> params ip="192.168.0.112" \
> op monitor interval="10s" nic="eth1"
> clone cl-haproxy haproxy
> property $id="cib-bootstrap-options" \
> dc-version="1.0.5-462f1569a43740667daf7b0f6b521742e9eb8fa7" \
> cluster-infrastructure="Heartbeat" \
> stonith-enabled="false"
>
> 2009/11/5 Matt <mattmoran76[at]gmail.com>:
>
>> Hi,
>>
>> I've got pacemaker running with heartbeat in a two node cluster. I'd
>> like haproxy service running on both servers with the VIP for each
>> server. But i'd like to failover the VIP if the local haproxy fails
>> to start or dies. I guess the problem is that haproxy shouldn't be a
>> primitive as its the same service on each server and I want it running
>> on both. The below crm doesn't work. i'm guessing the answer is going
>> to be really easy?
>>
>> node $id="8d5816b1-a3d0-4fb8-b741-a090c2afb8b1" test-02.sl.local
>> node $id="ea6257d7-d639-434f-8581-e5c7a831325a" test-01.sl.local
>> primitive haproxy-1 lsb:haproxy \
>> op monitor interval="10s"
>> primitive haproxy-2 lsb:haproxy \
>> op monitor interval="10s"
>> primitive haproxy_vip_1 ocf:heartbeat:IPaddr \
>> params ip="192.168.0.111" \
>> op monitor interval="10s" nic="eth1"
>> primitive haproxy_vip_2 ocf:heartbeat:IPaddr \
>> params ip="192.168.0.112" \
>> op monitor interval="10s" nic="eth1"
>> group haproxy_group_1 haproxy_vip_1 haproxy-1
>> group haproxy_group_2 haproxy_vip_2 haproxy-2
>> location test-01_ha-01 haproxy_group_1 \
>> rule $id="test-01_ha-01_rule-1" 100: #uname eq test-01.sl.local
>> location test-01_ha-02 haproxy_group_2 \
>> rule $id="test-01_ha-02_rule-2" 90: #uname eq test-02.sl.local
>> location test-02_ha-01 haproxy_group_1 \
>> rule $id="test-02_ha-01_rule-2" 90: #uname eq test-01.sl.local
>> location test-02_ha-02 haproxy_group_2 \
>> rule $id="test-02_ha-02_rule-1" 100: #uname eq test-02.sl.local
>> property $id="cib-bootstrap-options" \
>> dc-version="1.0.5-462f1569a43740667daf7b0f6b521742e9eb8fa7" \
>> cluster-infrastructure="Heartbeat" \
>> stonith-enabled="false"
>>
>>
> _______________________________________________
> 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
>

_______________________________________________
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


mattmoran76 at gmail

Nov 5, 2009, 10:52 AM

Post #4 of 10 (412 views)
Permalink
Re: active/active resources [In reply to]

Yep done that, works really well.

I thought my config was good, but now i'm having trouble bringing the
node back once failed. I'm unable to get it out of the on-fail state.
Anyone know how?

Node test-01.sl.local (ea6257d7-d639-434f-8581-e5c7a831325a): standby (on-fail)

online test-01.sl.local doesn't work.

2009/11/5 Malte Geierhos <malte[at]snapscouts.de>:
> You might want to set
> net.ipv4.ip_nonlocal_bind = 1
>
> so haproxy can already listen on vip_1 and vip_2
>
> kind regards,
> Malte Geierhos
>> Apologies, all I needed was the on-fail setting and clone function.
>> Now running a much simpler config!
>>
>> node $id="8d5816b1-a3d0-4fb8-b741-a090c2afb8b1" test-02.sl.local
>> node $id="ea6257d7-d639-434f-8581-e5c7a831325a" test-01.sl.local
>> primitive haproxy lsb:haproxy \
>>       op monitor on-fail="standby" interval="15s"
>> primitive haproxy_vip_1 ocf:heartbeat:IPaddr \
>>       params ip="192.168.0.111" \
>>       op monitor interval="10s" nic="eth1"
>> primitive haproxy_vip_2 ocf:heartbeat:IPaddr \
>>       params ip="192.168.0.112" \
>>       op monitor interval="10s" nic="eth1"
>> clone cl-haproxy haproxy
>> property $id="cib-bootstrap-options" \
>>       dc-version="1.0.5-462f1569a43740667daf7b0f6b521742e9eb8fa7" \
>>       cluster-infrastructure="Heartbeat" \
>>       stonith-enabled="false"
>>
>> 2009/11/5 Matt <mattmoran76[at]gmail.com>:
>>
>>> Hi,
>>>
>>> I've got pacemaker running with heartbeat in a two node cluster.  I'd
>>> like haproxy service running on both servers with the VIP for each
>>> server.  But i'd like to failover the VIP if the local haproxy fails
>>> to start or dies.  I guess the problem is that haproxy shouldn't be a
>>> primitive as its the same service on each server and I want it running
>>> on both.  The below crm doesn't work. i'm guessing the answer is going
>>> to be really easy?
>>>
>>> node $id="8d5816b1-a3d0-4fb8-b741-a090c2afb8b1" test-02.sl.local
>>> node $id="ea6257d7-d639-434f-8581-e5c7a831325a" test-01.sl.local
>>> primitive haproxy-1 lsb:haproxy \
>>>        op monitor interval="10s"
>>> primitive haproxy-2 lsb:haproxy \
>>>        op monitor interval="10s"
>>> primitive haproxy_vip_1 ocf:heartbeat:IPaddr \
>>>        params ip="192.168.0.111" \
>>>        op monitor interval="10s" nic="eth1"
>>> primitive haproxy_vip_2 ocf:heartbeat:IPaddr \
>>>        params ip="192.168.0.112" \
>>>        op monitor interval="10s" nic="eth1"
>>> group haproxy_group_1 haproxy_vip_1 haproxy-1
>>> group haproxy_group_2 haproxy_vip_2 haproxy-2
>>> location test-01_ha-01 haproxy_group_1 \
>>>        rule $id="test-01_ha-01_rule-1" 100: #uname eq test-01.sl.local
>>> location test-01_ha-02 haproxy_group_2 \
>>>        rule $id="test-01_ha-02_rule-2" 90: #uname eq test-02.sl.local
>>> location test-02_ha-01 haproxy_group_1 \
>>>        rule $id="test-02_ha-01_rule-2" 90: #uname eq test-01.sl.local
>>> location test-02_ha-02 haproxy_group_2 \
>>>        rule $id="test-02_ha-02_rule-1" 100: #uname eq test-02.sl.local
>>> property $id="cib-bootstrap-options" \
>>>        dc-version="1.0.5-462f1569a43740667daf7b0f6b521742e9eb8fa7" \
>>>        cluster-infrastructure="Heartbeat" \
>>>        stonith-enabled="false"
>>>
>>>
>> _______________________________________________
>> 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
>>
>
> _______________________________________________
> 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
>
_______________________________________________
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


andrew at beekhof

Nov 5, 2009, 12:39 PM

Post #5 of 10 (410 views)
Permalink
Re: active/active resources [In reply to]

On Thu, Nov 5, 2009 at 7:52 PM, Matt <mattmoran76[at]gmail.com> wrote:
> Yep done that, works really well.
>
> I thought my config was good, but now i'm having trouble bringing the
> node back once failed.  I'm unable to get it out of the on-fail state.
>  Anyone know how?
>
> Node test-01.sl.local (ea6257d7-d639-434f-8581-e5c7a831325a): standby (on-fail)
>
> online test-01.sl.local doesn't work.

presumably a resource failed (check the crm_mon output) and you need
to run: crm resource cleanup
_______________________________________________
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


mattmoran76 at gmail

Nov 5, 2009, 12:51 PM

Post #6 of 10 (411 views)
Permalink
Re: active/active resources [In reply to]

DIdn't seem to do anything. The only way I can get it to come out of
this mode is restarting heartbeat on that node.

Node test-01.sl.local (ea6257d7-d639-434f-8581-e5c7a831325a): standby (on-fail)

Tried cleaning up both resources on test-01 but it just stays like this.

2009/11/5 Andrew Beekhof <andrew[at]beekhof.net>:
> On Thu, Nov 5, 2009 at 7:52 PM, Matt <mattmoran76[at]gmail.com> wrote:
>> Yep done that, works really well.
>>
>> I thought my config was good, but now i'm having trouble bringing the
>> node back once failed.  I'm unable to get it out of the on-fail state.
>>  Anyone know how?
>>
>> Node test-01.sl.local (ea6257d7-d639-434f-8581-e5c7a831325a): standby (on-fail)
>>
>> online test-01.sl.local doesn't work.
>
> presumably a resource failed (check the crm_mon output) and you need
> to run: crm resource cleanup
> _______________________________________________
> 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
>
_______________________________________________
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


andrew at beekhof

Nov 5, 2009, 11:51 PM

Post #7 of 10 (401 views)
Permalink
Re: active/active resources [In reply to]

On Thu, Nov 5, 2009 at 9:51 PM, Matt <mattmoran76[at]gmail.com> wrote:
> DIdn't seem to do anything.  The only way I can get it to come out of
> this mode is restarting heartbeat on that node.
>
> Node test-01.sl.local (ea6257d7-d639-434f-8581-e5c7a831325a): standby (on-fail)
>
> Tried cleaning up both resources on test-01 but it just stays like this.

help me out here... you've got to give me something to go on :-)
logs? crm_mon output? crm configure show output?
_______________________________________________
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


mattmoran76 at gmail

Nov 6, 2009, 2:27 AM

Post #8 of 10 (391 views)
Permalink
Re: active/active resources [In reply to]

ITEM 1 configure show output:
node $id="8d5816b1-a3d0-4fb8-b741-a090c2afb8b1" test-02.sl.local \
attributes standby="off"
node $id="ea6257d7-d639-434f-8581-e5c7a831325a" test-01.sl.local \
attributes standby="off"
primitive haproxy lsb:haproxy \
op monitor on-fail="standby" interval="15s"
primitive haproxy_vip_1 ocf:heartbeat:IPaddr \
params ip="192.168.0.111" \
op monitor interval="10s" nic="eth1"
primitive haproxy_vip_2 ocf:heartbeat:IPaddr \
params ip="192.168.0.112" \
op monitor interval="10s" nic="eth1"
clone cl-haproxy haproxy
location loc-1-1 haproxy_vip_1 \
rule $id="rule-1" 100: #uname eq test-01.sl.local
location loc-1-2 haproxy_vip_2 \
rule $id="rule-2" 90: #uname eq test-01.sl.local
location loc-2-1 haproxy_vip_2 \
rule $id="rule-3" 100: #uname eq test-02.sl.local
location loc-2-2 haproxy_vip_1 \
rule $id="rule-4" 90: #uname eq test-02.sl.local
property $id="cib-bootstrap-options" \
dc-version="1.0.5-462f1569a43740667daf7b0f6b521742e9eb8fa7" \
cluster-infrastructure="Heartbeat" \
stonith-enabled="false" \
last-lrm-refresh="1257450377"

ITEM 2 crm_mon output:
Online: [ test-02.sl.local test-01.sl.local ]

haproxy_vip_1 (ocf::heartbeat:IPaddr): Started test-01.sl.local
Clone Set: cl-haproxy
Started: [ test-01.sl.local test-02.sl.local ]
haproxy_vip_2 (ocf::heartbeat:IPaddr): Started test-02.sl.local

------------
This works great. When I stop haproxy on a node the VIP gets moved to
its brother which is exactly what I want. crm_mon then outputs this:
------------
ITEM 3 crm_mon output:
Node test-02.sl.local (8d5816b1-a3d0-4fb8-b741-a090c2afb8b1): standby (on-fail)
Online: [ test-01.sl.local ]

haproxy_vip_1 (ocf::heartbeat:IPaddr): Started test-01.sl.local
Clone Set: cl-haproxy
Started: [ test-01.sl.local ]
Stopped: [ haproxy:1 ]
haproxy_vip_2 (ocf::heartbeat:IPaddr): Started test-01.sl.local

Failed actions:
haproxy:1_monitor_15000 (node=test-02.sl.local, call=5, rc=7,
status=complete): not running
--------------
Now when I start haproxy running again nothing happens (which is
fine), but i'm unable to find a command that gets test-02 out of this
standby (on-fail) mode, the only way I have found to do it if is I
restart heartbeat process.

I tried crm node online test-02.sl.local

but if I do /etc/init.d/heartbeat restart - this gives me the same
output of crm_mon as Item 2, and the cluster is back to normal.

Thanks,

Matt

2009/11/6 Andrew Beekhof <andrew[at]beekhof.net>:
> On Thu, Nov 5, 2009 at 9:51 PM, Matt <mattmoran76[at]gmail.com> wrote:
>> DIdn't seem to do anything.  The only way I can get it to come out of
>> this mode is restarting heartbeat on that node.
>>
>> Node test-01.sl.local (ea6257d7-d639-434f-8581-e5c7a831325a): standby (on-fail)
>>
>> Tried cleaning up both resources on test-01 but it just stays like this.
>
> help me out here... you've got to give me something to go on :-)
> logs? crm_mon output? crm configure show output?
> _______________________________________________
> 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
>
_______________________________________________
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


andrew at beekhof

Nov 6, 2009, 3:09 AM

Post #9 of 10 (392 views)
Permalink
Re: active/active resources [In reply to]

On Fri, Nov 6, 2009 at 11:27 AM, Matt <mattmoran76[at]gmail.com> wrote:
> ITEM 1 configure show output:
> node $id="8d5816b1-a3d0-4fb8-b741-a090c2afb8b1" test-02.sl.local \
>        attributes standby="off"
> node $id="ea6257d7-d639-434f-8581-e5c7a831325a" test-01.sl.local \
>        attributes standby="off"
> primitive haproxy lsb:haproxy \
>        op monitor on-fail="standby" interval="15s"
> primitive haproxy_vip_1 ocf:heartbeat:IPaddr \
>        params ip="192.168.0.111" \
>        op monitor interval="10s" nic="eth1"
> primitive haproxy_vip_2 ocf:heartbeat:IPaddr \
>        params ip="192.168.0.112" \
>        op monitor interval="10s" nic="eth1"
> clone cl-haproxy haproxy
> location loc-1-1 haproxy_vip_1 \
>        rule $id="rule-1" 100: #uname eq test-01.sl.local
> location loc-1-2 haproxy_vip_2 \
>        rule $id="rule-2" 90: #uname eq test-01.sl.local
> location loc-2-1 haproxy_vip_2 \
>        rule $id="rule-3" 100: #uname eq test-02.sl.local
> location loc-2-2 haproxy_vip_1 \
>        rule $id="rule-4" 90: #uname eq test-02.sl.local
> property $id="cib-bootstrap-options" \
>        dc-version="1.0.5-462f1569a43740667daf7b0f6b521742e9eb8fa7" \
>        cluster-infrastructure="Heartbeat" \
>        stonith-enabled="false" \
>        last-lrm-refresh="1257450377"
>
> ITEM 2 crm_mon output:
> Online: [ test-02.sl.local test-01.sl.local ]
>
> haproxy_vip_1   (ocf::heartbeat:IPaddr):        Started test-01.sl.local
> Clone Set: cl-haproxy
>        Started: [ test-01.sl.local test-02.sl.local ]
> haproxy_vip_2   (ocf::heartbeat:IPaddr):        Started test-02.sl.local
>
> ------------
> This works great.  When I stop haproxy on a node the VIP gets moved to
> its brother which is exactly what I want.  crm_mon then outputs this:
> ------------
> ITEM 3 crm_mon output:
> Node test-02.sl.local (8d5816b1-a3d0-4fb8-b741-a090c2afb8b1): standby (on-fail)
> Online: [ test-01.sl.local ]
>
> haproxy_vip_1   (ocf::heartbeat:IPaddr):        Started test-01.sl.local
> Clone Set: cl-haproxy
>        Started: [ test-01.sl.local ]
>        Stopped: [ haproxy:1 ]
> haproxy_vip_2   (ocf::heartbeat:IPaddr):        Started test-01.sl.local
>
> Failed actions:
>    haproxy:1_monitor_15000 (node=test-02.sl.local, call=5, rc=7,
> status=complete): not running
> --------------
> Now when I start haproxy running again nothing happens (which is
> fine), but i'm unable to find a command that gets test-02 out of this
> standby (on-fail) mode, the only way I have found to do it if is I
> restart heartbeat process.

crm resource clean cl-haproxy test-02.sl.local

if the node is still in standby after that, check the call id of the
failed action... if its different then the haproxy RA is probably
broken.

>
> I tried crm node online test-02.sl.local
>
> but if I do /etc/init.d/heartbeat restart - this gives me the same
> output of crm_mon as Item 2, and the cluster is back to normal.
>
> Thanks,
>
> Matt
>
> 2009/11/6 Andrew Beekhof <andrew[at]beekhof.net>:
>> On Thu, Nov 5, 2009 at 9:51 PM, Matt <mattmoran76[at]gmail.com> wrote:
>>> DIdn't seem to do anything.  The only way I can get it to come out of
>>> this mode is restarting heartbeat on that node.
>>>
>>> Node test-01.sl.local (ea6257d7-d639-434f-8581-e5c7a831325a): standby (on-fail)
>>>
>>> Tried cleaning up both resources on test-01 but it just stays like this.
>>
>> help me out here... you've got to give me something to go on :-)
>> logs? crm_mon output? crm configure show output?
>> _______________________________________________
>> 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
>>
> _______________________________________________
> 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
>
_______________________________________________
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


mattmoran76 at gmail

Nov 6, 2009, 3:19 AM

Post #10 of 10 (392 views)
Permalink
Re: active/active resources [In reply to]

Duh! - crm resource cleanup cl-haproxy test-02.sl.local - totally worked :-)

I was cleaning up the haproxy resource previously and not the clone.

Cheers!

2009/11/6 Andrew Beekhof <andrew[at]beekhof.net>:
> On Fri, Nov 6, 2009 at 11:27 AM, Matt <mattmoran76[at]gmail.com> wrote:
>> ITEM 1 configure show output:
>> node $id="8d5816b1-a3d0-4fb8-b741-a090c2afb8b1" test-02.sl.local \
>>        attributes standby="off"
>> node $id="ea6257d7-d639-434f-8581-e5c7a831325a" test-01.sl.local \
>>        attributes standby="off"
>> primitive haproxy lsb:haproxy \
>>        op monitor on-fail="standby" interval="15s"
>> primitive haproxy_vip_1 ocf:heartbeat:IPaddr \
>>        params ip="192.168.0.111" \
>>        op monitor interval="10s" nic="eth1"
>> primitive haproxy_vip_2 ocf:heartbeat:IPaddr \
>>        params ip="192.168.0.112" \
>>        op monitor interval="10s" nic="eth1"
>> clone cl-haproxy haproxy
>> location loc-1-1 haproxy_vip_1 \
>>        rule $id="rule-1" 100: #uname eq test-01.sl.local
>> location loc-1-2 haproxy_vip_2 \
>>        rule $id="rule-2" 90: #uname eq test-01.sl.local
>> location loc-2-1 haproxy_vip_2 \
>>        rule $id="rule-3" 100: #uname eq test-02.sl.local
>> location loc-2-2 haproxy_vip_1 \
>>        rule $id="rule-4" 90: #uname eq test-02.sl.local
>> property $id="cib-bootstrap-options" \
>>        dc-version="1.0.5-462f1569a43740667daf7b0f6b521742e9eb8fa7" \
>>        cluster-infrastructure="Heartbeat" \
>>        stonith-enabled="false" \
>>        last-lrm-refresh="1257450377"
>>
>> ITEM 2 crm_mon output:
>> Online: [ test-02.sl.local test-01.sl.local ]
>>
>> haproxy_vip_1   (ocf::heartbeat:IPaddr):        Started test-01.sl.local
>> Clone Set: cl-haproxy
>>        Started: [ test-01.sl.local test-02.sl.local ]
>> haproxy_vip_2   (ocf::heartbeat:IPaddr):        Started test-02.sl.local
>>
>> ------------
>> This works great.  When I stop haproxy on a node the VIP gets moved to
>> its brother which is exactly what I want.  crm_mon then outputs this:
>> ------------
>> ITEM 3 crm_mon output:
>> Node test-02.sl.local (8d5816b1-a3d0-4fb8-b741-a090c2afb8b1): standby (on-fail)
>> Online: [ test-01.sl.local ]
>>
>> haproxy_vip_1   (ocf::heartbeat:IPaddr):        Started test-01.sl.local
>> Clone Set: cl-haproxy
>>        Started: [ test-01.sl.local ]
>>        Stopped: [ haproxy:1 ]
>> haproxy_vip_2   (ocf::heartbeat:IPaddr):        Started test-01.sl.local
>>
>> Failed actions:
>>    haproxy:1_monitor_15000 (node=test-02.sl.local, call=5, rc=7,
>> status=complete): not running
>> --------------
>> Now when I start haproxy running again nothing happens (which is
>> fine), but i'm unable to find a command that gets test-02 out of this
>> standby (on-fail) mode, the only way I have found to do it if is I
>> restart heartbeat process.
>
> crm resource clean  cl-haproxy test-02.sl.local
>
> if the node is still in standby after that, check the call id of the
> failed action... if its different then the haproxy RA is probably
> broken.
>
>>
>> I tried crm node online test-02.sl.local
>>
>> but if I do /etc/init.d/heartbeat restart - this gives me the same
>> output of crm_mon as Item 2, and the cluster is back to normal.
>>
>> Thanks,
>>
>> Matt
>>
>> 2009/11/6 Andrew Beekhof <andrew[at]beekhof.net>:
>>> On Thu, Nov 5, 2009 at 9:51 PM, Matt <mattmoran76[at]gmail.com> wrote:
>>>> DIdn't seem to do anything.  The only way I can get it to come out of
>>>> this mode is restarting heartbeat on that node.
>>>>
>>>> Node test-01.sl.local (ea6257d7-d639-434f-8581-e5c7a831325a): standby (on-fail)
>>>>
>>>> Tried cleaning up both resources on test-01 but it just stays like this.
>>>
>>> help me out here... you've got to give me something to go on :-)
>>> logs? crm_mon output? crm configure show output?
>>> _______________________________________________
>>> 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
>>>
>> _______________________________________________
>> 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
>>
> _______________________________________________
> 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
>
_______________________________________________
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

Linux-HA users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.