No subject
Tue Oct 23 06:10:09 UTC 2012
Github page it looks like this RA was written to work in a Active/Passive s=
enario that is really suited for 2 nodes. We are hoping to be able to have=
N+1 nodes, so that if the master fails the secondary node will still have =
synchronous partners to replicate with ensuring the data is written in mult=
iple locations.
If I have misinterpreted the use case of this resource, please let me know.=
Also any additional hints or corrects would be much appreciated.
v/r
STEVE
On Mar 25, 2013, at 7:01 PM, Andreas Kurz <andreas at hastexo.com<mailto:andre=
as at hastexo.com>> wrote:
Hi Steve,
On 2013-03-25 18:44, Steven Bambling wrote:
All,
I'm trying to work on a OCF resource agent that uses postgresql
streaming replication. I'm running into a few issues that I hope might
be answered or at least some pointers given to steer me in the right
direction.
Why are you not using the existing pgsql RA? It is capable of doing
synchronous and asynchronous replication and it is known to work fine.
Best regards,
Andreas
--
Need help with Pacemaker?
http://www.hastexo.com/now
1. A quick way of obtaining a list of "Online" nodes in the cluster
that a resource will be able to migrate to. I've accomplished it with
some grep and see but its not pretty or fast.
# time pcs status | grep Online | sed -e "s/.*\[\(.*\)\]/\1/" | sed 's/ //'
p1.example.net <http://p1.example.net> p2.example.net
<http://p2.example.net>
real0m2.797s
user0m0.084s
sys0m0.024s
Once I get a list of active/online nodes in the cluster my thinking was
to use PSQL to get the current xlog location and lag or each of the
remaining nodes and compare them. If the node has a greater log
position and/or less lag it will be given a greater master preference.
2. How to force a monitor/probe before a promote is run on ALL nodes to
make sure that the master preference is up to date before
migrating/failing over the resource.
- I was thinking that maybe during the promote call it could get the log
location and lag from each of the nodes via an psql call ( like above)
and then force the resource to a specific node. Is there a way to do
this and does it sound like a sane idea ?
The start of my RA is located here suggestions and comments 100%
welcome https://github.com/smbambling/pgsqlsr/blob/master/pgsqlsr
v/r
STEVE
_______________________________________________
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
_______________________________________________
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
--_000_7CE146047402A34B9E7F0756705B48398CF45D84CHAXCH01corpari_
Content-Type: text/html; charset="us-ascii"
Content-ID: <EE9977E3F0B4AC41BC9302C3E9A46C63 at corp.arin.net>
Content-Transfer-Encoding: quoted-printable
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
</head>
<body style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-lin=
e-break: after-white-space; ">
I'm guessing that you are referring to this RA <a href=3D"https://gith=
ub.com/ClusterLabs/resource-agents/blob/master/heartbeat/pgsql">https://git=
hub.com/ClusterLabs/resource-agents/blob/master/heartbeat/pgsql</a> wi=
th additions by T. Matsuo.
<div><br>
</div>
<div>From reading the "wiki" ( hopefully I have misinterpreted th=
is :) ) on his Github page it looks like this RA was written to work in a A=
ctive/Passive senario that is really suited for 2 nodes. We are hopin=
g to be able to have N+1 nodes, so that if the
master fails the secondary node will still have synchronous partners to re=
plicate with ensuring the data is written in multiple locations. </di=
v>
<div><br>
</div>
<div>If I have misinterpreted the use case of this resource, please let me =
know. Also any additional hints or corrects would be much appreciated=
.</div>
<div><br>
</div>
<div>v/r</div>
<div><br>
</div>
<div>STEVE</div>
<div><br>
</div>
<div><br>
</div>
<div>
<div><br>
</div>
<div>On Mar 25, 2013, at 7:01 PM, Andreas Kurz <<a href=3D"mailto:andrea=
s at hastexo.com">andreas at hastexo.com</a>> wrote:
<div><br class=3D"Apple-interchange-newline">
<blockquote type=3D"cite">Hi Steve,<br>
<br>
On 2013-03-25 18:44, Steven Bambling wrote:<br>
<blockquote type=3D"cite">All,<br>
<br>
I'm trying to work on a OCF resource agent that uses postgresql<br>
streaming replication. I'm running into a few issues that I hope migh=
t<br>
be answered or at least some pointers given to steer me in the right<br>
direction.<br>
</blockquote>
<br>
Why are you not using the existing pgsql RA? It is capable of doing<br>
synchronous and asynchronous replication and it is known to work fine.<br>
<br>
Best regards,<br>
Andreas<br>
<br>
-- <br>
Need help with Pacemaker?<br>
<a href=3D"http://www.hastexo.com/now">http://www.hastexo.com/now</a><br>
<br>
<br>
<blockquote type=3D"cite"><br>
1. A quick way of obtaining a list of "Online" nodes in the=
cluster<br>
that a resource will be able to migrate to. I've accomplished it with=
<br>
some grep and see but its not pretty or fast.<br>
<br>
# time pcs status | grep Online | sed -e "s/.*\[\(.*\)\]/\1/" | s=
ed 's/ //'<br>
p1.example.net <http://p1.example.net> p2.example.net<br>
<http://p2.example.net><br>
<br>
real0m2.797s<br>
user0m0.084s<br>
sys0m0.024s<br>
<br>
Once I get a list of active/online nodes in the cluster my thinking was<br>
to use PSQL to get the current xlog location and lag or each of the<br>
remaining nodes and compare them. If the node has a greater log<br>
position and/or less lag it will be given a greater master preference. &nbs=
p;<br>
<br>
2. How to force a monitor/probe before a promote is run on ALL nodes =
to<br>
make sure that the master preference is up to date before<br>
migrating/failing over the resource.<br>
- I was thinking that maybe during the promote call it could get the log<br=
>
location and lag from each of the nodes via an psql call ( like above)<br>
and then force the resource to a specific node. Is there a way to do<=
br>
this and does it sound like a sane idea ?<br>
<br>
<br>
The start of my RA is located here suggestions and comments 100%<br>
welcome https://github.com/smbambling/pgsqlsr/blob/master/pgsqlsr<br>
<br>
v/r<br>
<br>
STEVE<br>
<br>
<br>
_______________________________________________<br>
Pacemaker mailing list: Pacemaker at oss.clusterlabs.org<br>
http://oss.clusterlabs.org/mailman/listinfo/pacemaker<br>
<br>
Project Home: http://www.clusterlabs.org<br>
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf<br=
>
Bugs: http://bugs.clusterlabs.org<br>
<br>
</blockquote>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Pacemaker mailing list: Pacemaker at oss.clusterlabs.org<br>
http://oss.clusterlabs.org/mailman/listinfo/pacemaker<br>
<br>
Project Home: http://www.clusterlabs.org<br>
Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf<br=
>
Bugs: http://bugs.clusterlabs.org<br>
</blockquote>
</div>
<br>
</div>
</div>
</body>
</html>
--_000_7CE146047402A34B9E7F0756705B48398CF45D84CHAXCH01corpari_--
More information about the Pacemaker
mailing list