Re: [ClusterLabs] dovecot RA

2016-06-08 Thread Ken Gaillot
On 06/08/2016 09:11 AM, Ken Gaillot wrote:
> On 06/08/2016 03:26 AM, Jan Pokorný wrote:
>> On 07/06/16 14:48 -0500, Dimitri Maziuk wrote:
>>> next question: I'm on centos 7 and there's no more /etc/init.d/>> anything>. With lennartware spreading, is there a coherent plan to deal
>>> with former LSB agents?
>>
>> Pacemaker can drive systemd-managed services for quite some time.
> 
> This is as easy as changing lsb:dovecot to systemd:dovecot.
> 
> Or, if you specify it as service:dovecot, Pacemaker will check whether
> LSB, systemd or upstart is used on the local system, and call the
> appropriate one.
> 
> As with LSB, don't enable systemd-managed services to start at boot, if
> you want the cluster to manage them.
> 
> One issue that sometimes comes up: some scripts (some logrotate conf
> files or cron jobs, for example) will call "systemctl reload
> ". If the service is managed by the cluster, systemd
> doesn't think it's running, so the reload will fail. You have to replace
> such lines with a native reload mechanism for the service.

Whoops -- I was thinking of when an OCF agent is used. If you use
systemd: or service:, systemd does know the service is running, so
systemctl reload/status will work just fine.

>> Provided that the project/daemon you care about carries the unit
>> file, you can use that unless there are distinguished roles for the
>> provided service within the cluster (like primary+replicas), there's
>> a need to run multiple varying instances of the same service,
>> or other cluster-specific features are desired.
>>
>> For dovecot, I can see:
>> # rpm -ql dovecot | grep \.service
>> /usr/lib/systemd/system/dovecot.service 
>>
>>> Specifically, should I roll my own RA for dovecot or is there one in the
>>> works somewhere?
>>
>> If you miss something with the generic approach per above, and there's
>> no fitting open-sourced RA around then it's probably your last resort.
>>
>> For instance, there was once an agent written in C (highly unusual),
>> but seems abandoned a long time ago:
>> https://github.com/perrit/dovecot-ocf-resource-agent

___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] dovecot RA

2016-06-08 Thread Ken Gaillot
On 06/08/2016 10:11 AM, Dmitri Maziuk wrote:
> On 2016-06-08 09:11, Ken Gaillot wrote:
>> On 06/08/2016 03:26 AM, Jan Pokorný wrote:
> 
>>> Pacemaker can drive systemd-managed services for quite some time.
>>
>> This is as easy as changing lsb:dovecot to systemd:dovecot.
> 
> Great! Any chance that could be mentioned on
> http://www.linux-ha.org/wiki/Resource_agents -- hint, hint ;)
> 
> Thanks guys,
> Dima

There's a big box at the top of every page on that wiki :)

"Looking for current and maintained information and documentation on
(Linux ) Open Source High Availability HA Clustering? You probably
should be reading the Pacemaker site clusterlabs.org. This site
conserves Heartbeat specific stuff."

The current documentation is:

http://clusterlabs.org/doc/en-US/Pacemaker/1.1-pcs/html-single/Pacemaker_Explained/index.html#s-resource-supported

___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] dovecot RA

2016-06-08 Thread Dmitri Maziuk

On 2016-06-08 09:11, Ken Gaillot wrote:

On 06/08/2016 03:26 AM, Jan Pokorný wrote:



Pacemaker can drive systemd-managed services for quite some time.


This is as easy as changing lsb:dovecot to systemd:dovecot.


Great! Any chance that could be mentioned on 
http://www.linux-ha.org/wiki/Resource_agents -- hint, hint ;)


Thanks guys,
Dima


___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] dovecot RA

2016-06-08 Thread Ken Gaillot
On 06/08/2016 03:26 AM, Jan Pokorný wrote:
> On 07/06/16 14:48 -0500, Dimitri Maziuk wrote:
>> next question: I'm on centos 7 and there's no more /etc/init.d/> anything>. With lennartware spreading, is there a coherent plan to deal
>> with former LSB agents?
> 
> Pacemaker can drive systemd-managed services for quite some time.

This is as easy as changing lsb:dovecot to systemd:dovecot.

Or, if you specify it as service:dovecot, Pacemaker will check whether
LSB, systemd or upstart is used on the local system, and call the
appropriate one.

As with LSB, don't enable systemd-managed services to start at boot, if
you want the cluster to manage them.

One issue that sometimes comes up: some scripts (some logrotate conf
files or cron jobs, for example) will call "systemctl reload
". If the service is managed by the cluster, systemd
doesn't think it's running, so the reload will fail. You have to replace
such lines with a native reload mechanism for the service.

> Provided that the project/daemon you care about carries the unit
> file, you can use that unless there are distinguished roles for the
> provided service within the cluster (like primary+replicas), there's
> a need to run multiple varying instances of the same service,
> or other cluster-specific features are desired.
> 
> For dovecot, I can see:
> # rpm -ql dovecot | grep \.service
> /usr/lib/systemd/system/dovecot.service 
> 
>> Specifically, should I roll my own RA for dovecot or is there one in the
>> works somewhere?
> 
> If you miss something with the generic approach per above, and there's
> no fitting open-sourced RA around then it's probably your last resort.
> 
> For instance, there was once an agent written in C (highly unusual),
> but seems abandoned a long time ago:
> https://github.com/perrit/dovecot-ocf-resource-agent

___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org


Re: [ClusterLabs] dovecot RA

2016-06-08 Thread Jan Pokorný
On 07/06/16 14:48 -0500, Dimitri Maziuk wrote:
> next question: I'm on centos 7 and there's no more /etc/init.d/ anything>. With lennartware spreading, is there a coherent plan to deal
> with former LSB agents?

Pacemaker can drive systemd-managed services for quite some time.

Provided that the project/daemon you care about carries the unit
file, you can use that unless there are distinguished roles for the
provided service within the cluster (like primary+replicas), there's
a need to run multiple varying instances of the same service,
or other cluster-specific features are desired.

For dovecot, I can see:
# rpm -ql dovecot | grep \.service
/usr/lib/systemd/system/dovecot.service 

> Specifically, should I roll my own RA for dovecot or is there one in the
> works somewhere?

If you miss something with the generic approach per above, and there's
no fitting open-sourced RA around then it's probably your last resort.

For instance, there was once an agent written in C (highly unusual),
but seems abandoned a long time ago:
https://github.com/perrit/dovecot-ocf-resource-agent

-- 
Jan (Poki)


pgpQc0V6UzOwG.pgp
Description: PGP signature
___
Users mailing list: Users@clusterlabs.org
http://clusterlabs.org/mailman/listinfo/users

Project Home: http://www.clusterlabs.org
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
Bugs: http://bugs.clusterlabs.org