[Pacemaker] Can Master/Slave resource transit from Master to Stopped directly ?

Takatoshi MATSUO matsuo.tak at gmail.com
Wed Jun 6 05:45:46 UTC 2012


Hi Michael Vallaly

2012/6/6 Michael Vallaly <pacemaker at nolatency.com>:

>
> Takatoshi MATSUO,
>
> Have you made any further progress on the OCF RA script for Postgresql
> 9.1 streaming replication?

No, I haven't.

> I would like to setup a HA cluster here
> explicitly for Postgresql 9.1, but was having a few problems setting up
> the examples on your github wiki page.
>
> Are you currently able to use you OCF script reliably in a Pacemaker
> cluster or are you blocked/waiting for Pacemaker 1.1.8 to support the
> Multi-State resource Master -> Stopped state support?

I think we can use it reliably.
It dosen't need supporting Master->Stopped.

You may see an unexpected failed-actions(monitor)
after demoting pgsql without this support.
But I think it dosen't really matter.


> Thanks for your work and time on the RA OCF script.
>
> Feel free to contact me off list as well if anyone else has solved
> this problem with Pacemaker differently or this isn't exactly the right
> forum.

The RA belongs to Linux-HA projects,
so I think it's better to discuss or ask it
in linux-ha or linux-ha-dev mailing lists.

Thanks,
Takatoshi MATSUO

> -Mike
>
> On Fri, 9 Mar 2012 10:42:56 +0900
> Takatoshi MATSUO <matsuo.tak at gmail.com> wrote:
>
>> Hi
>>
>> 2012/3/8 Andrew Beekhof <andrew at beekhof.net>:
>> > On Thu, Mar 8, 2012 at 7:56 AM, Lars Ellenberg
>> > <lars.ellenberg at linbit.com> wrote:
>> >> On Tue, Mar 06, 2012 at 08:18:28PM +0900, Takatoshi MATSUO wrote:
>> >>> Hi Dejan
>> >>>
>> >>> 2012/3/6 Dejan Muhamedagic <dejanmm at fastmail.fm>:
>> >>> > Hi,
>> >>> >
>> >>> > On Tue, Mar 06, 2012 at 01:15:45PM +0900, Takatoshi MATSUO wrote:
>> >>> >> Hi
>> >>> >>
>> >>> >> I want Pacemaker to transit from Master to Stopped directly on demote
>> >>> >> without failcount
>> >>> >> for managing PostgreSQL streaming replication.
>> >>> >> Can Pacemaker do this ?
>> >>> >
>> >>> > What the RA should do on demote is, well, demote an instance to
>> >>> > slave. Why would you want to stop it?
>> >>>
>> >>> Because PostgreSQL cannot transit from Master to Slave.
>> >>>
>> >>> > Of course, nothing's stopping you to that and I guess that pacemaker would be able to
>> >>> > deal with it eventually. But note that it'll expect the resource
>> >>> > to be in the Started state after demote.
>> >>>
>> >>> It causes failing of monitor in spite of success of demote.
>> >>>
>> >>> >
>> >>> >> I returned "$OCF_NOT_RUNNING" on demote as a trial,
>> >>> >> but it incremented a failcount.
>> >>> >
>> >>> > "$OCF_NOT_RUNNING" should be used only by the monitor operation.
>> >>> > It'll count as error with other operations.
>> >>>
>> >>> get it.
>> >>
>> >> Actually, Andrew told me on IRC about plans to support this:
>> >> <beekhof> oh, and start ops will be able to tell us a resource is master and demote that its stopped
>> >> <beekhof> if thats something you feel inclined to take advantage
>> >>
>> >> So, a "start" could then return $OCF_RUNNING_MASTER to indicate that it
>> >> went straight into Master mode, and a "demote" would be able to indicate
>> >> it went straight into Stopped state by returning $OCF_NOT_RUNNING.
>> >>
>> >> No idea when that will be available or in which release.
>> >
>> > Probably 1.1.8
>>
>> It's a good news.
>>
>> > I'm trying to clean up some outstanding bugs for 1.1.7 at the moment.
>> >
>> > Could someone file a bug for this though?  That will make sure it
>> > doesn't get lost :-)
>>
>> I filed it.
>> https://developerbugs.linuxfoundation.org/show_bug.cgi?id=2644
>>
>> Regards,
>> Takatoshi MATSUO
>>
>> _______________________________________________
>> 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://bugs.clusterlabs.org
>
>
> --
> Michael Vallaly <mvallaly at nolatency.com>




More information about the Pacemaker mailing list