[chef] Re: Re: postgres master/slave replication and failover to hot standby


Chronological Thread 
  • From: Edward Sargisson < >
  • To:
  • Subject: [chef] Re: Re: postgres master/slave replication and failover to hot standby
  • Date: Thu, 26 Jan 2012 09:38:38 -0800

I haven't examined the other, more special purpose tools, but this is a classic scenario for Zookeeper.
i.e. the master holds the lock on a well known node and the potential masters in waiting queue up for that lock.
If the connection drops then one of those potential masters gets it and can then configure as the master with confidence that it shouldn't be un-mastered.

On Thu, Jan 26, 2012 at 9:32 AM, Adam Jacob < "> > wrote:
If you are just looking for traditional HA with PostgreSQL, you might consider not using a clustered filesystem, and instead just doing block level replication and letting Heartbeat manage PostgreSQL as a resource. While clustered filesystems have come a long way, my opinion is that it's still a stretch to recommend them for data-intensive applications (like database masters can be.) If availability is your concern, think about DRBD+Heartbeat.

Adam
On Jan 26, 2012, at 12:38 AM, Bryan Berry wrote:

very exciting!

I very well may go w/ pacemaker for both a GFS2 cluster and postgres. In that case, I may be able to help you finish that cookbook.

Anyone has any recommendations on ocfs2 vs GFS2 vs other? I would love to hear them

On Mon, Jan 23, 2012 at 8:57 PM, Matt Ray < " target="_blank"> > wrote:
If you're interested in a corosync/pacemaker cookbook I started (but
have yet to finish), here you go:
https://github.com/mattray/barclamp_ha_service/tree/pacemaker_service/chef/cookbooks/pacemaker

It installs pacemaker and configures the master/server, it just
doesn't actually manage the services yet. I wanted to get fancy and
let Chef think it was still managing services even when Pacemaker was
managing them, but I got a little blocked and other stuff took
precedence. Even though it's in a Crowbar barclamp, I was testing it
with just Chef and hadn't touched the other Crowbar stuff (so just
grab that cookbook). There's also an existing drbd cookbook that works
on the community site.

Thanks,
Matt Ray
Senior Technical Evangelist | Opscode Inc.
" target="_blank"> | (512) 731-2218
Twitter, IRC, GitHub: mattray



On Mon, Jan 23, 2012 at 7:46 PM, Adam Jacob < " target="_blank"> > wrote:
> Think about using traditional HA tools, like Heartbeat/Corosync and
> Pacemaker to do the actual promotion. No need to re-invent the wheel.
>
> Adam
>
> ---
> Opscode, Inc.
> Adam Jacob, Chief Customer Officer
> T: (206) 619-7151 E: " target="_blank">
>
> On Jan 22, 2012, at 11:30 PM, Bryan Berry wrote:
>
> I am starting to work on master/slave streaming replication for postgres,
> based on the database cookbook
> https://github.com/opscode/cookbooks/tree/master/database
>
> Please note that I am a total n00b to postgres.
>
> I have to figure out to manage failover from master to slave. I imagine that
> I can do it w/ some kind of script to check whether master is available or
> not, then promote a slave. However, then I have make sure that a promoted
> slave is not demoted on the next chef run.
>
> If anyone has experience w/ these issues, I would much appreciate your
> advice.
>
> If anyone is working on a similar cookbook or has already written something
> that fulfills my requirements, please let know!
>
> Cheers
>
> BryanWB
>
>
>
>
>






Archive powered by MHonArc 2.6.16.

§