Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   CentOS (http://www.linux-archive.org/centos/)
-   -   openldap mmr + heartbeat hot standby (http://www.linux-archive.org/centos/670043-openldap-mmr-heartbeat-hot-standby.html)

Wessel van der Aart 05-23-2012 12:59 PM

openldap mmr + heartbeat hot standby
 
Hi List,

I've setup 2 openldap servers in n-way multimaster replication mode in a
test environment, both run centos 6.2,
this works well but now i'm trying to make these 2 servers failover
using heartbeat.
i've got no experience with heartbeat (or setting up clusters in
general) however from what i understand heartbeat starts/stops the
service if the server has the virtual IP assigned or not.
this would be fine for httpd , but since replication doesn't work when
slapd is stopped i was wondering if anyone knows if there is a way to
setup heartbeat with a hot standby? so that the service keeps running
but the ip does gets reassigned when one goes down.

Thanks, Wessel


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

05-23-2012 01:39 PM

openldap mmr + heartbeat hot standby
 
Wessel van der Aart wrote:
> Hi List,
>
> I've setup 2 openldap servers in n-way multimaster replication mode in a
> test environment, both run centos 6.2,
> this works well but now i'm trying to make these 2 servers failover
> using heartbeat.
> i've got no experience with heartbeat (or setting up clusters in
> general) however from what i understand heartbeat starts/stops the
> service if the server has the virtual IP assigned or not.
> this would be fine for httpd , but since replication doesn't work when
> slapd is stopped i was wondering if anyone knows if there is a way to
> setup heartbeat with a hot standby? so that the service keeps running
> but the ip does gets reassigned when one goes down.

A slight clarification: what happens on a failover cluster is that you've
got heartbeat running, and each machine looks to see if the other's still
alive. At this point, one is live, and the other's standby. If/when the
standby notices it cannot see - even a ping - the other address, or it can
be configured to look for a service, such as doing a default search (for
apache, that might be a wget ImAlive.html) - it tells the system to assert
the IP, and turns up all services for which it's been configured.

I haven't done it, but I'd say you could easily configure heartbeat to
check, and if the IP's visible, but the service times out, to tell the
live one to turn down services, and to take over primaryhood.

Hope that's clearer.

mark

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Wessel van der Aart 05-24-2012 10:38 AM

openldap mmr + heartbeat hot standby
 
On 05/23/2012 03:39 PM, m.roth@5-cent.us wrote:
> Wessel van der Aart wrote:
>> Hi List,
>>
>> I've setup 2 openldap servers in n-way multimaster replication mode in a
>> test environment, both run centos 6.2,
>> this works well but now i'm trying to make these 2 servers failover
>> using heartbeat.
>> i've got no experience with heartbeat (or setting up clusters in
>> general) however from what i understand heartbeat starts/stops the
>> service if the server has the virtual IP assigned or not.
>> this would be fine for httpd , but since replication doesn't work when
>> slapd is stopped i was wondering if anyone knows if there is a way to
>> setup heartbeat with a hot standby? so that the service keeps running
>> but the ip does gets reassigned when one goes down.
> A slight clarification: what happens on a failover cluster is that you've
> got heartbeat running, and each machine looks to see if the other's still
> alive. At this point, one is live, and the other's standby. If/when the
> standby notices it cannot see - even a ping - the other address, or it can
> be configured to look for a service, such as doing a default search (for
> apache, that might be a wget ImAlive.html) - it tells the system to assert
> the IP, and turns up all services for which it's been configured.
>
> I haven't done it, but I'd say you could easily configure heartbeat to
> check, and if the IP's visible, but the service times out, to tell the
> live one to turn down services, and to take over primaryhood.
>
> Hope that's clearer.
>
> mark
>
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos

Thanks Mark, that does make it more clear,
i've made a setup and heartbeat does that by default,
when heartbeat shuts down it's stops slapd as well and assignes the ip
to machine2 and starts slapd there ,
what i want is that it already has slapd running on the failover but
still checks that service for availability. that way i won't have an
outdated database on the failover ldap server.
would you know if there is a way of making heartbeat not sending the
stop command to a particular resource or do i need write a script to
(not) do this? i wouldn't mind a script but if that function is already
there i'd rather use that one.

Thanks, Wessel
















_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Benjamin Hackl 05-25-2012 08:22 AM

openldap mmr + heartbeat hot standby
 
Dear Wessel,

I'd do the following.

give both servers a static non changing IP:

ldapA.yourdomain.tld, e.g. 10.0.0.1 on eth0
ldapB.yourdomain.tld, e.g. 10.0.0.2 on eth0

These two IPs will always be the same. You can access ldapA or ldapB
anytime via it's designated name.

For failover, use an alias:

ldap.yourdomain.tld, e.g. 10.0.0.3 on eth0:0 on the active node

Don't tell heartbeat of openldap and everything should be good.


Brgds


--
Freundliche Gruesse/Best Regards
Benjamin Hackl
IT/Administration

Media FOCUS Research Ges.m.b.H.
Maculangasse 8, 1220 Wien Austria
Tel: +43 1 258 97 01-295
b.hackl@focusmr.com
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Tait Clarridge 05-28-2012 07:01 PM

openldap mmr + heartbeat hot standby
 
>
> Thanks Mark, that does make it more clear,
> i've made a setup and heartbeat does that by default,
> when heartbeat shuts down it's stops slapd as well and assignes the ip
> to machine2 and starts slapd there ,
> what i want is that it already has slapd running on the failover but
> still checks that service for availability. that way i won't have an
> outdated database on the failover ldap server.
> would you know if there is a way of making heartbeat not sending the
> stop command to a particular resource or do i need write a script to
> (not) do this? i wouldn't mind a script but if that function is already
> there i'd rather use that one.
>
> Thanks, Wessel


Wessel,

Just pass heartbeat an IP, not a service.
If you use IPaddr2 it will also send a gratuitous ARP that will cut down
the failover time.

eg.

primarynode.mycompany.com IPaddr2::10.10.10.50/24/eth0

All the services will stay running, if you want to do service checks to
watch slapd to see if it breaks you can use the "mon" project to kickoff
a heartbeat failover.

-Tait

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Wessel van der Aart 05-29-2012 08:47 AM

openldap mmr + heartbeat hot standby
 
Hi Benjamin, Tait,

Thanks for the advice,
setting up heartbeat to look for an IP was easy, monitoring looks a bit
more complex so i'll have to dive into that.
at least now i know the right direction to look for,

Thanks,
Wessel

On 05/28/2012 09:01 PM, Tait Clarridge wrote:
>> Thanks Mark, that does make it more clear,
>> i've made a setup and heartbeat does that by default,
>> when heartbeat shuts down it's stops slapd as well and assignes the ip
>> to machine2 and starts slapd there ,
>> what i want is that it already has slapd running on the failover but
>> still checks that service for availability. that way i won't have an
>> outdated database on the failover ldap server.
>> would you know if there is a way of making heartbeat not sending the
>> stop command to a particular resource or do i need write a script to
>> (not) do this? i wouldn't mind a script but if that function is already
>> there i'd rather use that one.
>>
>> Thanks, Wessel
>
> Wessel,
>
> Just pass heartbeat an IP, not a service.
> If you use IPaddr2 it will also send a gratuitous ARP that will cut down
> the failover time.
>
> eg.
>
> primarynode.mycompany.com IPaddr2::10.10.10.50/24/eth0
>
> All the services will stay running, if you want to do service checks to
> watch slapd to see if it breaks you can use the "mon" project to kickoff
> a heartbeat failover.
>
> -Tait
>
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


All times are GMT. The time now is 02:26 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.