[Pacemaker] Multistate Resources is not promoted automatically

Dejan Muhamedagic dejanmm at fastmail.fm
Thu Nov 11 10:26:51 UTC 2010


Hi,

On Thu, Nov 11, 2010 at 11:11:14AM +0100, Andrew Beekhof wrote:
> On Thu, Nov 11, 2010 at 9:59 AM, Simon Jansen
> <simon.jansen1 at googlemail.com> wrote:
> > Hi everybody,
> >
> > I wrote a multistate resource agent to manage the Rsyslog service in a
> > master/slave setup.
> > In the master role the service is started with a predefined
> > rsyslog_master.conf. In the slave role with a predefined rsyslog_slave.conf
> > configuration file.
> > The start operation of the agent starts the service in slave mode. The RA
> > passes all tests of the ocf-tester tool.
> > When I use the RA to configure a multistate resource in the cluster, the
> > cluster starts the resource on both nodes as slave. The problem is that the
> > resource isn't promoted automatically.
> 
> Does the ocf:heartbeat:Rsyslog script call crm_master?
> It needs to to tell pacemaker which instance to promote.
> 
> Two questions though...
> 1) Why use master/slave for rsyslog?
> 2) Is this an upstream RA? If not, you shouldn't be using the
> ocf:heartbeat namespace.

Right. We could consider adding this to the resource-agents, but
it would be much better if the RA gets distributed with rsyslog.

Thanks,

Dejan

> > When I do a
> > crm(live)# resource promote msRsyslog
> > on the subshell the resource is promoted correctly it and starts as master
> > on one node.
> >
> > This is the definition of the resource:
> > primitive resRsyslog ocf:heartbeat:Rsyslog \
> >     params master_config="/etc/rsyslog_master.conf"
> > slave_config="/etc/rsyslog.conf" \
> >     op monitor interval="10" role="Master" timeout="30" start-delay="1" \
> >     op monitor interval="12" timeout="31" \
> >     op start interval="0" timeout="120" \
> >     op stop interval="0" timeout="120"
> > ms msRsyslog resRsyslog
> >
> > Further I attached the resource agent.
> >
> >
> >
> > --
> >
> > Regards,
> >
> > Simon Jansen
> >
> >
> > ---------------------------
> > Simon Jansen
> > 64291 Darmstadt
> >
> > _______________________________________________
> > Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> > http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> >
> > Project Home: http://www.clusterlabs.org
> > Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> > Bugs:
> > http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
> >
> >
> 
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> 
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker




More information about the Pacemaker mailing list