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

Mailing List Archive: Linux-HA: Users

Adding DHCPD and NAMED as resources

 

 

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


bleduc at iders

Sep 8, 2010, 12:18 PM

Post #1 of 4 (592 views)
Permalink
Adding DHCPD and NAMED as resources

Am trying to add NAMED and DHCPD services as a resource on
heartbeat-3.0.1-1.el5 cluster with no luck, I was wondering if anyone would
know of an easy to do this. Any help would be great.


Thanks
 
Bradley Leduc
Information Technologist
Iders Incorporated
27047 Oakwood Road
Oakbank, MB R0E 1J2
Tel: (204) 444-5200 ext 271
Cel: (204) 228-5738
Fax: (204) 444-5900
 
****************************************************************************
** 
Iders Incorporated Confidential:
 
Note: This message is intended solely for the use of the designated
recipient(s) and their appointed delegates, and may contain confidential
information. Any unauthorized disclosure, copying or distribution of its
contents is strictly prohibited. If you have received this message in error,
please destroy it and advise the sender immediately by phone, Email or
facsimilie.



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


woods at ucar

Sep 8, 2010, 2:35 PM

Post #2 of 4 (575 views)
Permalink
Re: Adding DHCPD and NAMED as resources [In reply to]

On Wed, 2010-09-08 at 14:18 -0500, Bradley Leduc wrote:
> Am trying to add NAMED and DHCPD services as a resource on
> heartbeat-3.0.1-1.el5 cluster with no luck, I was wondering if anyone would
> know of an easy to do this. Any help would be great.

Are you running pacemaker or just a heartbeat v1-style config? I've done
it both ways. For v1 all I did was add "dhcpd" to haresources. For
pacemaker, I use the ocf:heartbeat:anything resource since I couldn't
find one specific to named or dhcpd anywhere. So I have config lines
like this:

primitive dhcp ocf:heartbeat:anything \
params binfile="/usr/sbin/dhcpd" cmdline_options="-f" \
op monitor interval="10" timeout="50" depth="0" \
op start interval="0" timeout="90s" \
op stop interval="0" timeout="100s" \
meta target-role="Started"

named works similarly.

For v1, you may need to create a resource.d script that properly
returns 0 if you try to stop a daemon that is already stopped; the
standard init.d startup scripts don't always do this.

--Greg


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


daniel.grilo at pdmfc

Sep 9, 2010, 8:35 AM

Post #3 of 4 (570 views)
Permalink
Re: Adding DHCPD and NAMED as resources [In reply to]

Another way to do this is if you choose LSB instead of OCF category
primitives.
That way you just select the init script from your init.d and thats it.

Probably you will need to change config path but this depends on your
cluster architecture.

Like greg said, there are some init.d scripts that do not return 0, so
heartbeat will try to re-launch services over and over again :-)

Daniel

--
Daniel Grilo
Partner of Grupo PDM
Av. Conde Valbom 30, 3o
1050-068 Lisboa (Portugal)
web: http://www.pdmfc.com
Tel: +351 21 357 20 29 // mobile: +351 91 388 94 39 (ext: 716)
Fax: +351 21 357 20 31


Confidencialidade

Esta mensagem, bem como os documentos que a acompanham, podem conter
informações confidenciais ou privilegiadas. Se receber esta mensagem por
erro, ou não for o destinatário, deverá apagá-la, assim como, os
ficheiros anexos ou cópias. Qualquer utilização parcial, comentário,
cópia, distribuição ou qualquer acção baseada nesta informação
é estritamente proibida. Se, por erro, recebeu esta informação,
queira informar-nos.
Obrigado pela sua colaboração.

The information in this message is confidential and privileged. It is
intended solely for the addressee. If you are not the intended
recipient, any disclosure, copying, or distribution of the message,
or any action or omission taken by you in reliance on it is
prohibited. Please contact immediately the sender if you have
received this message by error.
Thank you.

-------- Random Quote -------
Artistic ventures highlighted. Rob a museum.


On 09/08/2010 10:35 PM, Greg Woods wrote:
> On Wed, 2010-09-08 at 14:18 -0500, Bradley Leduc wrote:
>> Am trying to add NAMED and DHCPD services as a resource on
>> heartbeat-3.0.1-1.el5 cluster with no luck, I was wondering if anyone would
>> know of an easy to do this. Any help would be great.
> Are you running pacemaker or just a heartbeat v1-style config? I've done
> it both ways. For v1 all I did was add "dhcpd" to haresources. For
> pacemaker, I use the ocf:heartbeat:anything resource since I couldn't
> find one specific to named or dhcpd anywhere. So I have config lines
> like this:
>
> primitive dhcp ocf:heartbeat:anything \
> params binfile="/usr/sbin/dhcpd" cmdline_options="-f" \
> op monitor interval="10" timeout="50" depth="0" \
> op start interval="0" timeout="90s" \
> op stop interval="0" timeout="100s" \
> meta target-role="Started"
>
> named works similarly.
>
> For v1, you may need to create a resource.d script that properly
> returns 0 if you try to stop a daemon that is already stopped; the
> standard init.d startup scripts don't always do this.
>
> --Greg
>
>
> _______________________________________________
> Linux-HA mailing list
> Linux-HA [at] lists
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
Attachments: daniel_grilo.vcf (0.29 KB)


woods at ucar

Sep 9, 2010, 9:01 AM

Post #4 of 4 (570 views)
Permalink
Re: Adding DHCPD and NAMED as resources [In reply to]

On Thu, 2010-09-09 at 16:35 +0100, Daniel Machado Grilo wrote:
> Another way to do this is if you choose LSB instead of OCF category
> primitives.
> That way you just select the init script from your init.d and thats it.

You do need to ensure that your init script is LSB compliant. This
includes but is not limited to returning success when a stop is
attempted when it is already stopped. Some init scripts I have seen do
not do this right. Which means this may or may not work correctly.

As an example, on CentOS 5.5 on a system that is running neither service
right now:

[root [at] vmserv woods]# ps ax | fgrep named
10329 pts/7 S+ 0:00 fgrep named
[root [at] vmserv woods]# ps ax | fgrep dhcpd
15451 pts/7 S+ 0:00 fgrep dhcpd
[root [at] vmserv woods]# service named stop
Stopping named: [ OK ]
[root [at] vmserv woods]# echo $?
0
[root [at] vmserv woods]# service dhcpd stop
[root [at] vmserv woods]# echo $?
7
[root [at] vmserv woods]#

The named script does the right thing but the dhcpd script does not.

--Greg


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