[Pacemaker] Primitive stuck after resource agent failure?

Jody McIntyre jodym at trustcentric.com
Fri Feb 18 12:28:31 EST 2011


On Fri, Feb 18, 2011 at 11:41 AM, Dejan Muhamedagic <dejanmm at fastmail.fm>wrote:

> > I am attempting to write my own resource agent to support postgres WAL
> log
> > shipping.
>
> Did you consider improving the existing resource agent? We do
> accept contributions. But we also dislike duplicating effort and
> resource agents functionality.
>

I considered this, but unfortunately it would take a lot of effort.  The
existing "pgsql" resource agent is designed to start and stop postgres,
whereas in this mode I want to switch an already running postgres into
master mode.  Even worse, once postgres is in master mode, there is no
automated way to switch it back to standby mode (and writing one would
require considerable effort.)

My plan is to start postgres on both servers using normal init scripts.  If
the primary server fails, pacemaker (on the secondary server) will STONITH
the primary server, take over its IP, and switch postgres on that node to
master mode.  Failback would be done manually.

So I need a resource agent that acts as a dummy on the primary server (to
keep pacemaker happy) but that switches postgres to master mode on the
secondary server.

If this sounds like something others would be interested in I'd be happy to
contribute it.


> Did you try "crm resource cleanup"?
>

That's exactly what I needed.  Sorry I couldn't find it in the docs.

Cheers,
Jody
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20110218/a3e59716/attachment-0002.html>


More information about the Pacemaker mailing list