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

Mailing List Archive: Linux-HA: Users

ClusterIP

 

 

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


ghenry at suretecsystems

Jun 13, 2005, 5:07 AM

Post #1 of 16 (2258 views)
Permalink
ClusterIP

Dear list,

I have just read:

http://geminis.dyndns.org/wordpress/index.php/2005/06/12/loadbalancer-less-clusters-on-linux/

What is the lists view on it?

Thanks.

--
Kind Regards,

Gavin Henry.
Managing Director.

T +44 (0) 1224 279484
M +44 (0) 7930 323266
F +44 (0) 1224 742001
E ghenry [at] suretecsystems

Open Source. Open Solutions(tm).

http://www.suretecsystems.com/



--
Kind Regards,

Gavin Henry.
Managing Director.

T +44 (0) 1224 279484
M +44 (0) 7930 323266
F +44 (0) 1224 742001
E ghenry [at] suretecsystems

Open Source. Open Solutions(tm).

http://www.suretecsystems.com/


_______________________________________________
Linux-HA mailing list
Linux-HA [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha


jdm at operamail

Jun 13, 2005, 6:20 AM

Post #2 of 16 (2195 views)
Permalink
Re: ClusterIP [In reply to]

Gavin Henry wrote:

>Dear list,
>
>I have just read:
>
>http://geminis.dyndns.org/wordpress/index.php/2005/06/12/loadbalancer-less-clusters-on-linux/
>
>What is the lists view on it?
>
>


If I understand correctly, all servers in the cluster will receive all
incoming packets. Additionally, if a server goes down, the connections
aren't automatically routed to a machine that is up.

I fail to see the advantage over ldirectord. If you don't want separate
loadbalancer machines, just run the ldirector(s) on the first two nodes
of your cluster.



--
When we jumped into Sicily, the units became separated, and I couldn't find anyone. Eventually I stumbled across two colonels, a major, three captains, two lieutenants, and one rifleman, and we secured the bridge. Never in the history of war have so few been led by so many.
-- General James Gavin
--

Public GPG key at blackhole.pca.dfn.de

GCS/IT d- s:+ a- C(+++)$ UL++++$ P+++(++++)$ L++(+++)$ !E- W+(+++)$
N+(++) o K w$ !O !M V PS(++)@ PE-(++)@ Y+ PGP++(+++) t(+) 5 X R tv--
b++(++++) DI++(++++) D++ G e++>+++++ h(+) r y+**
Attachments: signature.asc (0.18 KB)


lmb at suse

Feb 7, 2008, 10:34 AM

Post #3 of 16 (1908 views)
Permalink
Re: ClusterIP [In reply to]

On 2008-02-07T19:11:26, Thomas Glanzmann <thomas [at] glanzmann> wrote:

> Hello,
> I would like to do a Cluster-IP Setup with SLES 10. A few things are
> unclear for me. With ClusterIP you have one IP address that is shared on
> two or more nodes. It useally uses a multicast mac address. Both nodes
> see all traffic. But when one node goes down how does the other node see
> that it has to handle all the traffic right now and not only a part of
> it?

You have to configure it as a clone with notifications enabled, then
Pacemaker/CRM will send the appropriate operations to the RA to inform
it.

The only downside really is that all nodes see all the traffic; this is
not as efficient as a dedicated load balancer for a large number of
nodes, but for 2-4, it's fine.

(I've never really analysed where the break-even is.)


Regards,
Lars

--
Teamlead Kernel, SuSE Labs, Research and Development
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
"Experience is the name everyone gives to their mistakes." -- Oscar Wilde

_______________________________________________
Linux-HA mailing list
Linux-HA [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


misch at multinet

Feb 7, 2008, 10:39 AM

Post #4 of 16 (1908 views)
Permalink
Re: ClusterIP [In reply to]

Am Donnerstag 07 Februar 2008 19:11 schrieb Thomas Glanzmann:
> Hello,
> I would like to do a Cluster-IP Setup with SLES 10. A few things are
> unclear for me. With ClusterIP you have one IP address that is shared on
> two or more nodes. It useally uses a multicast mac address. Both nodes
> see all traffic. But when one node goes down how does the other node see
> that it has to handle all the traffic right now and not only a part of
> it?
>
> Thomas

hi,

responsilibity by ClusterIP is expressed in terms os hash values.
Hash values are deducted from the # of the clone in the custer. So if one
agent is the first clone it will get hash 1, ...

if one node dies this agent is started on an other node, which means that the
it also gets the responsibility for the second hash. for more info see my
articles in German Linuxmagazin last year. links to the articles are on
www.multinet.de -> artikel und veröffentlichungen.
see also www.linux-ha.org/ClusterIP

beware that more than one ressource can run one one node!

You are welcome for more questions.

Michael.
_______________________________________________
Linux-HA mailing list
Linux-HA [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


thomas at glanzmann

Feb 7, 2008, 12:39 PM

Post #5 of 16 (1914 views)
Permalink
Re: ClusterIP [In reply to]

Hello,
thank you a lot for the feedback! Now I understand how the failover
works. Has someone a ready to use cib.xml that I can use for testing. I
am going to try my luck right now and come back in an hour or so with my
findings. It would be nice if someone could comment on them.

Thomas
_______________________________________________
Linux-HA mailing list
Linux-HA [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


thomas at glanzmann

Feb 7, 2008, 1:43 PM

Post #6 of 16 (1901 views)
Permalink
Re: ClusterIP [In reply to]

Hello again,
here comes by cib.xml for a clusterip. But the ressource stickiness is not
working for me. When I shoutdown ha-2, the two clone instances stay on ha-1.
Any ideas? Before sending this e-mail I used the following command to
set some location constraints:

crm_resource -M -r ip0:0 -H ha-1

of course you can't do that when ip0:0 is already on ha-1 because
crm_resource goes smart ass on me:

(ha-1) [~] crm_resource -M -r ip0:0 -H ha-1
Error performing operation: ip0:0 is already active on ha-1

However it seems that location constraints or preferences are totally
fine with cloned ressources. So it doesn't seem that I do need the
ressource_stickiness. It doesn't work for me anyway. And that answers my
other question, I guess. And the ressources come back on the right host
after I simulate a power failure. Nice feature. I like it very much.

(ha-1) [~] crm_mon -1 -r

============
Last updated: Thu Feb 7 22:25:12 2008
Current DC: ha-1 (330da1b6-5f99-480a-b071-a144a98e1248)
2 Nodes configured.
1 Resources configured.
============

Node: ha-2 (095256ab-361c-4b1e-9a8b-8bed74c4a7fb): online
Node: ha-1 (330da1b6-5f99-480a-b071-a144a98e1248): online

Full list of resources:

Clone Set: clusterip-clone
ip0:0 (heartbeat::ocf:IPaddr2): Started ha-1
ip0:1 (heartbeat::ocf:IPaddr2): Started ha-1

<configuration>
<crm_config>
<cluster_property_set id="cib-bootstrap-options">
<attributes>
<nvpair name="ressource_stickiness" value="0" id="ressource-stickiness"/>
</attributes>
</cluster_property_set>
</crm_config>

<resources>
<clone id="clusterip-clone">
<meta_attributes id="clusterip-clone-ma">
<attributes>
<nvpair id="clusterip-clone-1" name="globally_unique" value="false"/>
<nvpair id="clusterip-clone-2" name="clone_max" value="2"/>
<nvpair id="clusterip-clone-3" name="clone_node_max" value="2"/>
</attributes>
</meta_attributes>

<primitive class="ocf" provider="heartbeat" type="IPaddr2" id="ip0">
<instance_attributes id="ia-ip0">
<attributes>
<nvpair id="ia-ip0-1" name="ip" value="157.163.248.193"/>
<nvpair id="ia-ip0-2" name="cidr_netmask" value="25"/>
<nvpair id="ia-ip0-3" name="nic" value="eth0"/>
<nvpair id="ia-ip0-4" name="mac" value="01:02:03:04:05:06"/>
<nvpair id="ia-ip0-5" name="clusterip_hash" value="sourceip-sourceport"/>
</attributes>
</instance_attributes>
<operations>
<op id="ip0-monitor0" name="monitor" interval="60s" timeout="120s" start_delay="1m"/>
</operations>
</primitive>
</clone>
</resources>
</configuration>

Thomas
_______________________________________________
Linux-HA mailing list
Linux-HA [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


lmb at suse

Feb 7, 2008, 3:52 PM

Post #7 of 16 (1902 views)
Permalink
Re: ClusterIP [In reply to]

On 2008-02-07T22:43:50, Thomas Glanzmann <thomas [at] glanzmann> wrote:

> Hello again,
> here comes by cib.xml for a clusterip. But the ressource stickiness is not
> working for me. When I shoutdown ha-2, the two clone instances stay on ha-1.
> Any ideas? Before sending this e-mail I used the following command to
> set some location constraints:
>
> crm_resource -M -r ip0:0 -H ha-1

Uhm, what do you think should happen when you shutdown ha-2 - of course
they stat on ha-1 in that case?

> However it seems that location constraints or preferences are totally
> fine with cloned ressources. So it doesn't seem that I do need the
> ressource_stickiness. It doesn't work for me anyway. And that answers my
> other question, I guess.

I don't know what you're saying here ;-)

> (ha-1) [~] crm_mon -1 -r
>
> ============
> Last updated: Thu Feb 7 22:25:12 2008
> Current DC: ha-1 (330da1b6-5f99-480a-b071-a144a98e1248)
> 2 Nodes configured.
> 1 Resources configured.
> ============
>
> Node: ha-2 (095256ab-361c-4b1e-9a8b-8bed74c4a7fb): online
> Node: ha-1 (330da1b6-5f99-480a-b071-a144a98e1248): online
>
> Full list of resources:
>
> Clone Set: clusterip-clone
> ip0:0 (heartbeat::ocf:IPaddr2): Started ha-1
> ip0:1 (heartbeat::ocf:IPaddr2): Started ha-1
>
> <configuration>
> <crm_config>
> <cluster_property_set id="cib-bootstrap-options">
> <attributes>
> <nvpair name="ressource_stickiness" value="0" id="ressource-stickiness"/>
> </attributes>

With resource stickiness, this should be spread across two nodes?

> </cluster_property_set>
> </crm_config>
>
> <resources>
> <clone id="clusterip-clone">
> <meta_attributes id="clusterip-clone-ma">
> <attributes>
> <nvpair id="clusterip-clone-1" name="globally_unique" value="false"/>

This setting is wrong. globally_unique must be true for the cluster ip.
Your configuration doesn't really work ;-)

> <nvpair id="clusterip-clone-2" name="clone_max" value="2"/>

You can drop this line, it defaults to the number of nodes anyway -
unless, of course, you want to make it larger so you can do more fine
grained load control later.

> <nvpair id="clusterip-clone-3" name="clone_node_max" value="2"/>
> </attributes>
> </meta_attributes>
>
> <primitive class="ocf" provider="heartbeat" type="IPaddr2" id="ip0">
> <instance_attributes id="ia-ip0">
> <attributes>
> <nvpair id="ia-ip0-1" name="ip" value="157.163.248.193"/>
> <nvpair id="ia-ip0-2" name="cidr_netmask" value="25"/>
> <nvpair id="ia-ip0-3" name="nic" value="eth0"/>
> <nvpair id="ia-ip0-4" name="mac" value="01:02:03:04:05:06"/>

That's not a valid multicast MAC.

Regards,
Lars

--
Teamlead Kernel, SuSE Labs, Research and Development
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
"Experience is the name everyone gives to their mistakes." -- Oscar Wilde

_______________________________________________
Linux-HA mailing list
Linux-HA [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


thomas at glanzmann

Feb 7, 2008, 10:31 PM

Post #8 of 16 (1909 views)
Permalink
Re: ClusterIP [In reply to]

Hallo Lars

> Uhm, what do you think should happen when you shutdown ha-2 - of
> course they stat on ha-1 in that case?

I meant that I shut it down temporarily and if it comes back again the
clones stay both on one node instead of going back again.

> I don't know what you're saying here ;-)

I said. That ressource_stickiness=0 does not work for me so I used a
location constraint to put ip:0 on ha-1 and ip:1 on ha-2 to get the
behaviour. But as I write this e-mail I realize that I misspelled
resource_stickiness.

> > <nvpair name="ressource_stickiness" value="0" id="ressource-stickiness"/>

> With resource stickiness, this should be spread across two nodes?

Sure thing, if I manage to write it correctly. :-)

> This setting is wrong. globally_unique must be true for the cluster
> ip. Your configuration doesn't really work ;-)

Okay. That is the right moment to ask what globally_unique is about
anyway? I never got it. I just copy and pasted it.

> > <nvpair id="clusterip-clone-2" name="clone_max" value="2"/>

> You can drop this line, it defaults to the number of nodes anyway -
> unless, of course, you want to make it larger so you can do more fine
> grained load control later.

Thanks. I will do that.

> > <nvpair id="ia-ip0-4" name="mac" value="01:02:03:04:05:06"/>

> That's not a valid multicast MAC.

I see. I thought every mac address that starts with the first bit set to
one is a multicast MAC address. However I used an autogenerated, too.
And I got it working. But only on the same network. It seems that I have
to set a static entry on the default router to really get it working.

Thomas
_______________________________________________
Linux-HA mailing list
Linux-HA [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


misch at multinet

Feb 7, 2008, 11:59 PM

Post #9 of 16 (1894 views)
Permalink
Re: ClusterIP [In reply to]

Am Donnerstag, 7. Februar 2008 21:39 schrieb Thomas Glanzmann:
> Hello,
> thank you a lot for the feedback! Now I understand how the failover
> works. Has someone a ready to use cib.xml that I can use for testing. I
> am going to try my luck right now and come back in an hour or so with my
> findings. It would be nice if someone could comment on them.
>
> Thomas

<clone id="clone_ClusterIP">
<meta_attributes id="clone_ClusterIP_meta_attrs">
<attributes>
<nvpair id="clone_ClusterIP_metaattr_target_role" name="target_role"
value="stopped"/>
<nvpair id="clone_ClusterIP_metaattr_clone_max" name="clone_max"
value="2"/>
<nvpair id="clone_ClusterIP_metaattr_clone_node_max" name="clone_node_max"
value="2"/>
<nvpair id="clone_ClusterIP_metaattr_resource_stickiness"
name="resource_stickiness" value="0"/>
</attributes>
</meta_attributes>
<primitive id="resource_ClusterIP" class="ocf" type="IPaddr2"
provider="heartbeat">
<instance_attributes id="resource_ClusterIP_instance_attrs">
<attributes>
<nvpair id="0227c4ba-5799-45df-a3d6-34709e77a0aa" name="ip"
value="1.2.3.4"/>
<nvpair id="b74f32a9-0326-413f-8f51-f6239752ce15" name="clusterip_hash"
value="sourceip-sourceport"/>
</attributes>
</instance_attributes>
</primitive>
</clone>

- Have clone_max set to the number of nodes in your cluster
- Have clone_node_max set to the same number. In clusters with more than two
nodes, perhaps 2 is enough for backup for one failed node.
- Set resource_stickiness to "0" to allow ressources beeing equally
distributed.


--
Dr. Michael Schwartzkopff
MultiNET Services GmbH
Addresse: Bretonischer Ring 7; 85630 Grasbrunn; Germany
Tel: +49 - 89 - 45 69 11 0
Fax: +49 - 89 - 45 69 11 21
mob: +49 - 174 - 343 28 75

mail: misch [at] multinet
web: www.multinet.de

Sitz der Gesellschaft: 85630 Grasbrunn
Registergericht: Amtsgericht München HRB 114375
Geschäftsführer: Günter Jurgeneit, Hubert Martens

---

PGP Fingerprint: F919 3919 FF12 ED5A 2801 DEA6 AA77 57A4 EDD8 979B
Skype: misch42
_______________________________________________
Linux-HA mailing list
Linux-HA [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


misch at multinet

Sep 5, 2009, 2:38 AM

Post #10 of 16 (1776 views)
Permalink
Re: ClusterIP [In reply to]

Am Samstag, 5. September 2009 05:30:09 schrieb Michael Hale:
> Hi I'm attempting to build a redundant load balanced router using
> heartbeat and clusterip. I've read the documentation and the code ad
> got as far as I could but I'm unable to get auto failover working when
> I unplug the network cable from vm-ubuntu-1. I would expect that while
> pinging my shared ip 172.16.209.200 I and then unplugging the network
> cable I should notice a small pause while heartbeat figures out that
> vm-ubuntu-2 should now respond to all requests, but instead the ping
> hangs and heartbeat does nothing. Any ideas?
>
> Here is my ha.cf:
>
> logfacility daemon
> node vm-ubuntu-1
> node vm-ubuntu-2
> keepalive 1
> deadtime 3
> bcast eth0
> ping 172.16.209.2
> crm yes
> autojoin any
>
> And here is my resources.xml (loaded via cibadmin -R --obj_type
> resources --xml-file resources.xml):
>
> <resources>
> <clone id="router">
> <meta_attributes id="router_attributes">
> <attributes>
> <nvpair id="router_globally_unique" name="globally_unique"
> value="true"/>
> <nvpair id="router_target_role" name="target_role"
> value="started"/> <nvpair id="router_resource_stickiness"
> name="resource-stickiness" value="1"/>
> </attributes>
> </meta_attributes>
>
> <primitive id="clusterip" class="ocf" type="IPaddr2"
> provider="heartbeat"> <operations>
> <op id="clusterip_monitor" name="monitor" interval="3s"/>
> </operations>
> <instance_attributes id="clusterip_attributes">
> <attributes>
> <nvpair id="clusterip_ip" name="ip" value="172.16.209.200"/>
> <nvpair id="clusterip_hash_mode" name="clusterip_hash"
> value="sourceip-sourceport"/>
> <nvpair id="cluster_nic" name="nic" value="eth0"/>
> <nvpair id="cluster_mac" name="mac" value="01:00:5e:10:D1:C8"/>
> </attributes>
> </instance_attributes>
> </primitive>
> </clone>
> </resources>

You do not have any mechanism for the cluster to recornize the failure of
network. No action is taken on the loss on the ping node.

For the actual version of the cluster softwarte see:
http://www.clusterlabs.org

For examples of using pingnodes see:
http://www.clusterlabs.org/mediawiki/images/f/fb/Configuration_Explained.pdf

Greetings,

Michael Schwartzkopff


_______________________________________________
Linux-HA mailing list
Linux-HA [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


mikehale at gmail

Sep 7, 2009, 8:35 AM

Post #11 of 16 (1759 views)
Permalink
Re: ClusterIP [In reply to]

> You do not have any mechanism for the cluster to recornize the failure of
> network. No action is taken on the loss on the ping node.
>
> For the actual version of the cluster softwarte see:
> http://www.clusterlabs.org
>
> For examples of using pingnodes see:
> http://www.clusterlabs.org/mediawiki/images/f/fb/Configuration_Explained.pdf

Thanks for the pointers. After reading the docs I have come the
conclusion that I need to "Tell Pacemaker to monitor connectivity" and
"Tell Pacemaker how to interpret the connectivity data"

It looks like I need to add a ping primitive to my clone resource:

<resources>
<clone id="router">
<meta_attributes id="router_attributes">
<attributes>
<nvpair id="router_globally_unique" name="globally_unique"
value="true"/>
<nvpair id="router_target_role" name="target_role" value="started"/>
<!-- <nvpair id="router_resource_stickiness"
name="resource-stickiness" value="1"/> -->
</attributes>
</meta_attributes>

<primitive id="ping-gateway" provider="pacemaker" class="ocf" type="ping">
<operations>
<op id="ping-monitor-60s" interval="60s" name="monitor"/>
</operations>
<instance_attributes id="ping-attrs">
<nvpair id="pingd-dampen" name="dampen" value="5s"/>
<nvpair id="pingd-multiplier" name="multiplier" value="1000"/>
<nvpair id="pingd-hosts" name="host_list" value="172.16.209.2"/>
</instance_attributes>
</primitive>

<primitive id="clusterip" class="ocf" type="IPaddr2" provider="heartbeat">
<operations>
<op id="clusterip_monitor" name="monitor" interval="3s"/>
</operations>
<instance_attributes id="clusterip_attributes">
<attributes>
<nvpair id="clusterip_ip" name="ip" value="172.16.209.200"/>
<nvpair id="clusterip_hash_mode" name="clusterip_hash"
value="sourceip-sourceport"/>
<nvpair id="cluster_nic" name="nic" value="eth0"/>
<nvpair id="cluster_mac" name="mac" value="01:00:5e:10:D1:C8"/>
</attributes>
</instance_attributes>
</primitive>
</clone>
</resources>

and a constraint:

<constraints>
<rsc_location id="router-no-connectivity" rsc="router">
<rule id="ping-exclude-rule" score="-INFINITY" >
<expression id="ping-exclude" attribute="ping-gateway"
operation="not_defined"/>
</rule>
</rsc_location>
</constraints>

I updated my cluster with the above configuration, but it doesn't seem
to change anything. I'm sure I've just not getting something about the
configuration. Here is the output of crm_mon after restarting
heartbeat on both machines:

============
Last updated: Sun Sep 6 14:23:02 2009
Current DC: vm-ubuntu-2 (75031981-ed3c-40e9-b527-ccabe5a7e91d)
2 Nodes configured.
1 Resources configured.
============

Node: vm-ubuntu-1 (9b229d79-fceb-4cc7-b131-fd690e97a990): online
Node: vm-ubuntu-2 (75031981-ed3c-40e9-b527-ccabe5a7e91d): online

Full list of resources:

Clone Set: router
clusterip:0 (ocf::heartbeat:IPaddr2): Stopped
clusterip:1 (ocf::heartbeat:IPaddr2): Stopped

Failcount summary:
* Node vm-ubuntu-2:
* Node vm-ubuntu-1:
_______________________________________________
Linux-HA mailing list
Linux-HA [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


misch at multinet

Sep 7, 2009, 11:24 AM

Post #12 of 16 (1749 views)
Permalink
Re: ClusterIP [In reply to]

Am Montag, 7. September 2009 17:35:36 schrieb Michael Hale:
> > You do not have any mechanism for the cluster to recornize the failure of
> > network. No action is taken on the loss on the ping node.
> >
> > For the actual version of the cluster softwarte see:
> > http://www.clusterlabs.org
> >
> > For examples of using pingnodes see:
> > http://www.clusterlabs.org/mediawiki/images/f/fb/Configuration_Explained.
> >pdf
>
> Thanks for the pointers. After reading the docs I have come the
> conclusion that I need to "Tell Pacemaker to monitor connectivity" and
> "Tell Pacemaker how to interpret the connectivity data"
>
> It looks like I need to add a ping primitive to my clone resource:
>
> <resources>
> <clone id="router">
> <meta_attributes id="router_attributes">
> <attributes>
> <nvpair id="router_globally_unique" name="globally_unique"
> value="true"/>
> <nvpair id="router_target_role" name="target_role"
> value="started"/> <!-- <nvpair id="router_resource_stickiness"
> name="resource-stickiness" value="1"/> -->
> </attributes>
> </meta_attributes>
>
> <primitive id="ping-gateway" provider="pacemaker" class="ocf"
> type="ping"> <operations>

Ressource is called "pingd".

--
Dr. Michael Schwartzkopff
MultiNET Services GmbH
Addresse: Bretonischer Ring 7; 85630 Grasbrunn; Germany
Tel: +49 - 89 - 45 69 11 0
Fax: +49 - 89 - 45 69 11 21
mob: +49 - 174 - 343 28 75

mail: misch [at] multinet
web: www.multinet.de

Sitz der Gesellschaft: 85630 Grasbrunn
Registergericht: Amtsgericht München HRB 114375
Geschäftsführer: Günter Jurgeneit, Hubert Martens

---

PGP Fingerprint: F919 3919 FF12 ED5A 2801 DEA6 AA77 57A4 EDD8 979B
Skype: misch42
_______________________________________________
Linux-HA mailing list
Linux-HA [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


andrew at beekhof

Sep 7, 2009, 11:15 PM

Post #13 of 16 (1740 views)
Permalink
Re: ClusterIP [In reply to]

On Mon, Sep 7, 2009 at 8:24 PM, Michael Schwartzkopff<misch [at] multinet> wrote:
> Am Montag, 7. September 2009 17:35:36 schrieb Michael Hale:
>> > You do not have any mechanism for the cluster to recornize the failure of
>> > network. No action is taken on the loss on the ping node.
>> >
>> > For the actual version of the cluster softwarte see:
>> > http://www.clusterlabs.org
>> >
>> > For examples of using pingnodes see:
>> > http://www.clusterlabs.org/mediawiki/images/f/fb/Configuration_Explained.
>> >pdf
>>
>> Thanks for the pointers. After reading the docs I have come the
>> conclusion that I need to "Tell Pacemaker to monitor connectivity" and
>> "Tell Pacemaker how to interpret the connectivity data"
>>
>> It looks like I need to add a ping primitive to my clone resource:
>>
>> <resources>
>>   <clone id="router">
>>     <meta_attributes id="router_attributes">
>>       <attributes>
>>         <nvpair id="router_globally_unique" name="globally_unique"
>> value="true"/>
>>         <nvpair id="router_target_role" name="target_role"
>> value="started"/> <!-- <nvpair id="router_resource_stickiness"
>> name="resource-stickiness" value="1"/> -->
>>       </attributes>
>>     </meta_attributes>
>>
>>     <primitive id="ping-gateway" provider="pacemaker" class="ocf"
>> type="ping"> <operations>
>
> Ressource is called "pingd".

Not so in newer versions.
ping is a new, simpler, RA that is more reliable because it uses the
system "ping" program to obtain results.
_______________________________________________
Linux-HA mailing list
Linux-HA [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


andrew at beekhof

Sep 7, 2009, 11:18 PM

Post #14 of 16 (1755 views)
Permalink
Re: ClusterIP [In reply to]

On Mon, Sep 7, 2009 at 5:35 PM, Michael Hale<mikehale [at] gmail> wrote:

> <constraints>
>    <rsc_location id="router-no-connectivity" rsc="router">
>      <rule id="ping-exclude-rule" score="-INFINITY" >
>        <expression id="ping-exclude" attribute="ping-gateway"
> operation="not_defined"/>

You need the _attribute_ name here, not the resource name.
By default, the resource creates an attribute called "pingd", so change
attribute="ping-gateway"
to
attribute="pingd"
and you should find it works
_______________________________________________
Linux-HA mailing list
Linux-HA [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


mikehale at gmail

Sep 8, 2009, 8:22 PM

Post #15 of 16 (1731 views)
Permalink
Re: ClusterIP [In reply to]

Thanks for the pings ;)

I got a bit farther with my configuration, but I'm stuck again and was
hopping someone could help me out.

The ip address is still not being transitioned to the active host. I
ran crm_verify. And here is what I got. I don't understand why the
pings are failing or what the router-no-connectivity warning is about.

# crm_verify -LV
crm_verify[19672]: 2009/09/08_23:21:14 ERROR: unpack_rsc_op: Hard
error - ping:0_monitor_0 failed with rc=5: Preventing connected from
re-starting on vm-ubuntu-1
crm_verify[19672]: 2009/09/08_23:21:14 ERROR: unpack_rsc_op: Hard
error - ping:0_monitor_0 failed with rc=5: Preventing connected from
re-starting on vm-ubuntu-2
crm_verify[19672]: 2009/09/08_23:21:14 WARN: unpack_rsc_location: No
resource (con=router-no-connectivity, rsc=clusterip)
crm_verify[19672]: 2009/09/08_23:21:14 WARN: native_color: Resource
ping:0 cannot run anywhere
crm_verify[19672]: 2009/09/08_23:21:14 WARN: native_color: Resource
ping:1 cannot run anywhere
crm_verify[19672]: 2009/09/08_23:21:14 WARN: native_color: Resource
clusterip:0 cannot run anywhere
Warnings found during check: config may not be valid

Here is my current config. I'm now running pacemaker-heartbeat 1.0.5
from the latest launchpad build.

<cib validate-with="pacemaker-1.0" crm_feature_set="3.0.1"
have-quorum="1" dc-uuid="9b229d79-fceb-4cc7-b131-fd690e97a990"
admin_epoch="0" epoch="41" num_updates="10">
<configuration>
<crm_config>
<cluster_property_set id="cib-bootstrap-options">
<nvpair id="cib-bootstrap-options-dc-version"
name="dc-version"
value="1.0.5-3840e6b5a305ccb803d29b468556739e75532d56"/>
<nvpair id="cib-bootstrap-options-cluster-infrastructure"
name="cluster-infrastructure" value="Heartbeat"/>
<nvpair id="cib-bootstrap-options-stonith-enabled"
name="stonith-enabled" value="false"/>
<nvpair id="cib-bootstrap-options-symmetric-cluster"
name="symmetric-cluster" value="true"/>
</cluster_property_set>
</crm_config>
<nodes>
<node id="9b229d79-fceb-4cc7-b131-fd690e97a990"
uname="vm-ubuntu-1" type="normal"/>
<node id="75031981-ed3c-40e9-b527-ccabe5a7e91d"
uname="vm-ubuntu-2" type="normal"/>
</nodes>
<resources>
<clone id="connected">
<meta_attributes id="connected_attributes">
<nvpair id="connected_globally_unique"
name="globally_unique" value="true"/>
<nvpair id="connected_target_role" name="target_role"
value="started"/>
</meta_attributes>
<primitive id="ping" provider="pacemaker" class="ocf" type="ping">
<instance_attributes id="ping-attrs">
<nvpair id="pingd-name" name="name" value="gateway-ping"/>
<nvpair id="pingd-dampen" name="dampen" value="5s"/>
<nvpair id="pingd-multiplier" name="multiplier" value="1000"/>
<nvpair id="pingd-hosts" name="host_list" value="172.16.209.2"/>
</instance_attributes>
<operations>
<op id="ping-monitor" interval="3s" name="monitor"/>
</operations>
</primitive>
</clone>
<clone id="router">
<meta_attributes id="router_attributes">
<nvpair id="router_globally_unique" name="globally_unique"
value="true"/>
<nvpair id="router_target_role" name="target_role" value="started"/>
<!-- <nvpair id="router_notify" name="notify" value="true"/> -->
</meta_attributes>
<primitive id="clusterip" class="ocf" type="IPaddr2"
provider="heartbeat">
<!-- Make sure the cluster ip address is active -->
<operations>
<op id="clusterip_monitor" name="monitor" interval="3s"/>
</operations>
<instance_attributes id="clusterip_attributes">
<nvpair id="clusterip_allow_migrate" name="allow-migrate"
value="true"/>
<nvpair id="clusterip_ip" name="ip" value="172.16.209.200"/>
<nvpair id="clusterip_cidr_netmask" name="cidr_netmask" value="24"/>
<nvpair id="clusterip_hash_mode" name="clusterip_hash"
value="sourceip-sourceport"/>
<nvpair id="cluster_nic" name="nic" value="eth0"/>
<nvpair id="cluster_mac" name="mac" value="01:00:5e:10:D1:C8"/>
</instance_attributes>
</primitive>
</clone>
</resources>
<constraints>
<rsc_location id="router-no-connectivity" rsc="clusterip">
<rule id="ping-exclude-rule" score="-INFINITY">
<expression id="ping-exclude" attribute="gateway-ping"
operation="not_defined"/>
</rule>
<rule id="ping-include-rule" score="INFINITY">
<expression id="ping-include" attribute="gateway-ping"
operation="defined"/>
</rule>
</rsc_location>
</constraints>
</configuration>
...


On Tue, Sep 8, 2009 at 2:18 AM, Andrew Beekhof<andrew [at] beekhof> wrote:
> On Mon, Sep 7, 2009 at 5:35 PM, Michael Hale<mikehale [at] gmail> wrote:
>
>> <constraints>
>>    <rsc_location id="router-no-connectivity" rsc="router">
>>      <rule id="ping-exclude-rule" score="-INFINITY" >
>>        <expression id="ping-exclude" attribute="ping-gateway"
>> operation="not_defined"/>
>
> You need the _attribute_ name here, not the resource name.
> By default, the resource creates an attribute called "pingd", so change
>   attribute="ping-gateway"
> to
>   attribute="pingd"
> and you should find it works
> _______________________________________________
> Linux-HA mailing list
> Linux-HA [at] lists
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>
_______________________________________________
Linux-HA mailing list
Linux-HA [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems


andrew at beekhof

Sep 15, 2009, 11:07 AM

Post #16 of 16 (1618 views)
Permalink
Re: ClusterIP [In reply to]

On Wed, Sep 9, 2009 at 5:22 AM, Michael Hale <mikehale [at] gmail> wrote:
> Thanks for the pings ;)
>
> I got a bit farther with my configuration, but I'm stuck again and was
> hopping someone could help me out.
>
> The ip address is still not being transitioned to the active host. I
> ran crm_verify. And here is what I got. I don't understand why the
> pings are failing or what the router-no-connectivity warning is about.

You need to attach the logs that include the output from the failed operations.

>
> # crm_verify -LV
> crm_verify[19672]: 2009/09/08_23:21:14 ERROR: unpack_rsc_op: Hard
> error - ping:0_monitor_0 failed with rc=5: Preventing connected from
> re-starting on vm-ubuntu-1
> crm_verify[19672]: 2009/09/08_23:21:14 ERROR: unpack_rsc_op: Hard
> error - ping:0_monitor_0 failed with rc=5: Preventing connected from
> re-starting on vm-ubuntu-2
> crm_verify[19672]: 2009/09/08_23:21:14 WARN: unpack_rsc_location: No
> resource (con=router-no-connectivity, rsc=clusterip)
> crm_verify[19672]: 2009/09/08_23:21:14 WARN: native_color: Resource
> ping:0 cannot run anywhere
> crm_verify[19672]: 2009/09/08_23:21:14 WARN: native_color: Resource
> ping:1 cannot run anywhere
> crm_verify[19672]: 2009/09/08_23:21:14 WARN: native_color: Resource
> clusterip:0 cannot run anywhere
> Warnings found during check: config may not be valid
>
> Here is my current config. I'm now running pacemaker-heartbeat 1.0.5
> from the latest launchpad build.
>
> <cib validate-with="pacemaker-1.0" crm_feature_set="3.0.1"
> have-quorum="1" dc-uuid="9b229d79-fceb-4cc7-b131-fd690e97a990"
> admin_epoch="0" epoch="41" num_updates="10">
>  <configuration>
>    <crm_config>
>      <cluster_property_set id="cib-bootstrap-options">
>        <nvpair id="cib-bootstrap-options-dc-version"
> name="dc-version"
> value="1.0.5-3840e6b5a305ccb803d29b468556739e75532d56"/>
>        <nvpair id="cib-bootstrap-options-cluster-infrastructure"
> name="cluster-infrastructure" value="Heartbeat"/>
>        <nvpair id="cib-bootstrap-options-stonith-enabled"
> name="stonith-enabled" value="false"/>
>        <nvpair id="cib-bootstrap-options-symmetric-cluster"
> name="symmetric-cluster" value="true"/>
>      </cluster_property_set>
>    </crm_config>
>    <nodes>
>      <node id="9b229d79-fceb-4cc7-b131-fd690e97a990"
> uname="vm-ubuntu-1" type="normal"/>
>      <node id="75031981-ed3c-40e9-b527-ccabe5a7e91d"
> uname="vm-ubuntu-2" type="normal"/>
>    </nodes>
>    <resources>
>      <clone id="connected">
>        <meta_attributes id="connected_attributes">
>          <nvpair id="connected_globally_unique"
> name="globally_unique" value="true"/>
>          <nvpair id="connected_target_role" name="target_role"
> value="started"/>
>        </meta_attributes>
>        <primitive id="ping" provider="pacemaker" class="ocf" type="ping">
>          <instance_attributes id="ping-attrs">
>            <nvpair id="pingd-name" name="name" value="gateway-ping"/>
>            <nvpair id="pingd-dampen" name="dampen" value="5s"/>
>            <nvpair id="pingd-multiplier" name="multiplier" value="1000"/>
>            <nvpair id="pingd-hosts" name="host_list" value="172.16.209.2"/>
>          </instance_attributes>
>          <operations>
>            <op id="ping-monitor" interval="3s" name="monitor"/>
>          </operations>
>        </primitive>
>      </clone>
>      <clone id="router">
>        <meta_attributes id="router_attributes">
>          <nvpair id="router_globally_unique" name="globally_unique"
> value="true"/>
>          <nvpair id="router_target_role" name="target_role" value="started"/>
>          <!-- <nvpair id="router_notify" name="notify" value="true"/> -->
>        </meta_attributes>
>        <primitive id="clusterip" class="ocf" type="IPaddr2"
> provider="heartbeat">
>          <!-- Make sure the cluster ip address is active -->
>          <operations>
>            <op id="clusterip_monitor" name="monitor" interval="3s"/>
>          </operations>
>          <instance_attributes id="clusterip_attributes">
>            <nvpair id="clusterip_allow_migrate" name="allow-migrate"
> value="true"/>
>            <nvpair id="clusterip_ip" name="ip" value="172.16.209.200"/>
>            <nvpair id="clusterip_cidr_netmask" name="cidr_netmask" value="24"/>
>            <nvpair id="clusterip_hash_mode" name="clusterip_hash"
> value="sourceip-sourceport"/>
>            <nvpair id="cluster_nic" name="nic" value="eth0"/>
>            <nvpair id="cluster_mac" name="mac" value="01:00:5e:10:D1:C8"/>
>          </instance_attributes>
>        </primitive>
>      </clone>
>    </resources>
>    <constraints>
>      <rsc_location id="router-no-connectivity" rsc="clusterip">
>        <rule id="ping-exclude-rule" score="-INFINITY">
>          <expression id="ping-exclude" attribute="gateway-ping"
> operation="not_defined"/>
>        </rule>
>        <rule id="ping-include-rule" score="INFINITY">
>          <expression id="ping-include" attribute="gateway-ping"
> operation="defined"/>
>        </rule>
>      </rsc_location>
>    </constraints>
>  </configuration>
>  ...
>
>
> On Tue, Sep 8, 2009 at 2:18 AM, Andrew Beekhof<andrew [at] beekhof> wrote:
>> On Mon, Sep 7, 2009 at 5:35 PM, Michael Hale<mikehale [at] gmail> wrote:
>>
>>> <constraints>
>>>    <rsc_location id="router-no-connectivity" rsc="router">
>>>      <rule id="ping-exclude-rule" score="-INFINITY" >
>>>        <expression id="ping-exclude" attribute="ping-gateway"
>>> operation="not_defined"/>
>>
>> You need the _attribute_ name here, not the resource name.
>> By default, the resource creates an attribute called "pingd", so change
>>   attribute="ping-gateway"
>> to
>>   attribute="pingd"
>> and you should find it works
>> _______________________________________________
>> Linux-HA mailing list
>> Linux-HA [at] lists
>> http://lists.linux-ha.org/mailman/listinfo/linux-ha
>> See also: http://linux-ha.org/ReportingProblems
>>
> _______________________________________________
> Linux-HA mailing list
> Linux-HA [at] lists
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>
_______________________________________________
Linux-HA mailing list
Linux-HA [at] lists
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 Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.