[Linux-ha-dev] Ordering of OCF Start, Stop and Monitor actions
Lars Marowsky-Bree
lmb at suse.de
Tue Mar 27 15:14:40 MDT 2007
On 2007-03-22T13:24:02, Doug Knight <dknight at wsi.com> wrote:
Hi,
I've been out a bit myself but now want to answer this.
> Hi Alan,
> I took a look at the drbd OCF script's notify function, and the online
> documentation. I believe there is one circumstance where I need to make
> use of the pre/post notify.
The reason why drbd calls update_prefs (ie, crm_master) in the
post(-start) notification, and not within start itself, is that by that
time, start will have been completed on all (one or both) nodes.
That means that by that time, it's safe to figure out which side is
preferable for becoming master.
> The last step in my development/testing has
> to do with several steps I take to prepare the server that was primary
> and is now becoming standby. First, the primary gets demoted, right?
Yes.
> Then the secondary gets promoted. The problem I have is that part of the
> process of preparing the new standby requires that the new active server
> process is up and accessible. If the demote has to complete before the
> promote can begin, I cannot do the rsync in the demote, because the
> promote hasn't started and placed the new primary in an accessible
> state.
That seems to be true for your scenario, yes.
> So, if I understand the notify function, then I need a "post" process
> section that looks for the master going "active" and accessible, so I
> can do the rsync and start up the new standby, right?
That you could do. The instances will get a post-promote notification,
which could do what you want.
> Can you expand a little on the notify processing? The web page just
> lists the variables involved, and the drbd OCF script only makes use
> of a few of them, and I need a more detailed explanation of how and
> when they are used.
Well, you get a pre-notification before start/stop/promote/demote happen
anywhere and a post-notification after they have completed everywhere.
That's basically the gist of it.
Does that make it clearer, or do you have a specific question?
Sincerely,
Lars
--
Teamlead Kernel, SuSE Labs, Research and Development
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
"Experience is the name everyone gives to their mistakes." -- Oscar Wilde
More information about the Linux-HA-Dev
mailing list