I happen to have a configuration where I would like to stop a particular
resource before i start a different resource on the same machine.
So i create an rsc_order tag in my configuration file. Where resource
X-stop needs to happen before resource Y-start. So I create the
following line:
<rsc_order id="O_x_before_y" from="X" action="stop" to="Y"
to_action="start" type="before" />
Which, to me, seems to be about right...but the actions ACTUALLY being
taken are the opposite of what I think, so i collect some debug and find
that pengine does indeed think they are backwards. So i dig into the
code, which happens to be a fairly recent version of the CVS repo and
find the following observations, that I was hoping someone could
confirm...I have looked at it so many times, and am still confused.
The function that essentially parsed the rsc_order xml line,
unpack_rsc_order(), calls 'from' left-hand (LH), and 'to' right-hand
(RH). There is both a resource and action for the RH and LH sides.
Ultimately, that function calls custom_action_order(), which in the
comment says LHS before RHS, which seems to be a common thread
throughout the rest of the code (stage7(), etc.)...that LH always comes
before RH, eventually there is a link list that gets created in that manner.
SO, the behavior of the ordering code is to link LH before RH...always,
but the XML parsing function assumes that 'after' is the normal ordering
of the actions. Only if you specify 'before' does the LH and RH sides
get swapped. Which means that the XML parsing function,
unpack_rsc_order(), matches what the DTD says, but the code doesn't
match what the DTD says.
Am I right?
Jeff Oliver
Disclaimer: The information contained in this transmission, including any
attachments, may contain confidential information of Panasonic Avionics
Corporation. This transmission is intended only for the use of the
addressee(s) listed above. Unauthorized review, dissemination or other use
of the information contained in this transmission is strictly prohibited.
If you have received this transmission in error or have reason to believe
you are not authorized to receive it, please notify the sender by return
email and promptly delete the transmission.
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/