Florian, I made significant changes to the mysql RA but I feel that it will be very hard to make it work only with promote/demote functions.
The problem is that when some machine becomes promoted all other slave
machines should be demoted. But since they are already marked as slaves, they
are not demoted.
What I did in my current development version is to call mysql_demote in the
notify phase so during a promotion every machine that is not the promoted
will call mysql_demote. However there is a catch with this... the variables
differ between promote and demote actions. During promote action usually there
is no $OCF_RESKEY_CRM_meta_notify_master_uname and so I have to use
$OCF_RESKEY_CRM_meta_notify_promote_uname.
This brings a lot of logic back to the notify section.
I don't think that it will be a good idea to make the master to push its log
position and log name to the slaves since this will mean that the master
should have SUPER privs to all all machines.
I'm stuck with this. My RA which I use in production is almost entirely
implemented in the notify function but I really think that this is not the way
a public RA should be implemented.
So if you have any suggestions I'll be happy to hear them.
My latest version can be found here:
http://hydra.azilian.net/gitweb/?p=linux-ha/.git;a=summary
Best regards,
Marian
On Wednesday 17 February 2010 12:27:24 Marian Marinov wrote:
> Hopefully I'll commit a fully functional and working version + the
> enhancement bug this friday.
>
> Regards,
> Marian
>
> On Monday 15 February 2010 14:16:34 Florian Haas wrote:
> > Hello,
> >
> > I'll have a look at this in the coming days. Thanks.
> >
> > Cheers,
> > Florian
> >
> > On 2010-02-09 19:50, Marian Marinov wrote:
> > > Hello again,
> > > I haven't finished full port of my script but most of the work is
> > > already done:
> > >
> > > http://hydra.azilian.net/gitweb/?p=linux-ha/.git;a=blob_plain;f=mysql-
> > > replica;hb=HEAD
> > >
> > > I still have some tests to finish and I have one problem with which I
> > > would like some help.
> > >
> > > I implemented the replication awareness within the notify section of
> > > the RA where I have all the information about the state of the cluster.
> > >
> > > However this information is missing in different states of the RA. This
> > > is what makes the development a little bit slow :)
> > >
> > > So my problem is how to find the master_host IP? I need the IP since
> > > with replication I want to skip the name resolving. Currently I do that
> > > by adding the hostname to /etc/hosts and get it every time I do a
> > > demote.
> > >
> > > Will there be a better way ?
> > >
> > > I'll continue development and I hope to finish it by the end of the
> > > week.
> > >
> > > Best regards,
> > > Marian
>
--
Best regards,
Marian Marinov
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
