[Linux-ha-dev] Re: [Linux-ha-cvs] Linux-HA CVS: crm by msoffe n
from
Andrew
lists at beekhof.homeip.net
Fri Jun 11 14:34:42 MDT 2004
On Jun 11, 2004, at 8:53 PM, Soffen, Matthew wrote:
> It also looks like this is a known FreeBSD issue as I have just found
> a bug
> from Kerberos that is patched in FreeBSD by converting the macro into a
> function call.
>
> I still don't understand why what I changed was wrong though. What I
> did
> should have been functionally the same.
>
> What I changed was:
>
> #if 0
> /*
> * Mark the stop as irrelevant
> *
> * Possibly one day failed actions wont terminate
> * the transition, but not yet
> */
> rsc->stop->discard = TRUE;
> #else
> /* need to add timeouts in the TE for actions such as
> this.
> * ie. the node may be cactus and unable to receive the
> * stop let alone reply with failed.
> */
> rsc->stop->failure_is_fatal = FALSE;
> #endif
>
> #if 0
> obsoleted by shutdown before stonith
>
> /* try stopping the resource before stonithing the node
> *
> * if the stop succeeds, the transitioner can then
> * decided if stonith is needed
> */
> order_new(rsc->stop, stonith_op, must,
> action_constraints);
> #endif
> /* stonith before start */
> order_new(stonith_op, rsc->start, must,
> action_constraints);
>
> );
>
> to essentially:
>
> rsc->stop->discard = FALSE;
>
> /* need to add timeouts in the TE for actions such as
> this.
> * ie. the node may be cactus and unable to receive the
> * stop let alone reply with failed .
> */
> rsc->stop->failure_is_fatal =
> rsc->stop->failure_is_discard;
>
> /* obsoleted by shutdown before stonith */
>
> /* try stopping the resource before stonithing the node
> *
> * if the stop succeeds, the transitioner can then
> * decided if stonith is needed
> */
>
> if (0) {
> order_new(rsc->stop, stonith_op, must,
> action_constraints);
> }
> /* stonith before start */
> order_new(stonith_op, rsc->start, must,
> action_constraints);
>
> );
>
> If this is totally wrong, can you see where I was heading with this ?
>
> I don't see any reason why this HAS to be done at compile time, if it
> can
> use a minor calculation to do it runtime. This would also allow us to
> potentially change it for testing purposes ( i.e. if debug is true
> then tell
> it to NOT discard).
The reason the original patch was wrong was that it discarded
information... ie. the correct implementation that will be enabled once
the rest of the system can support it. In fact the above hasnt really
even captured the same logic. Below is what I would have found
acceptable. Making it compile is one thing, doing it in a lossy
fashion is another.
Rest assured we wont leave you left behind, there will be a time for
Solarization of the CRM but please be patient. Oh, and if there is an
#if 0 somewhere... you can be guaranteed its not stable yet :)
Andrew
// replace #if 0 <---- just so its insanely obvious for me later
if(0) {
/*
* Mark the stop as irrelevant
*
* Possibly one day failed actions wont terminate
* the transition, but not yet
*/
rsc->stop->discard = TRUE;
} else {
/* need to add timeouts in the TE for actions such as
this.
* ie. the node may be cactus and unable to receive the
* stop let alone reply with failed.
*/
rsc->stop->failure_is_fatal = FALSE;
}
// replace #if 0
if(0) {
// obsoleted by shutdown before stonith
/* try stopping the resource before stonithing the node
*
* if the stop succeeds, the transitioner can then
* decided if stonith is needed
*/
order_new(rsc->stop, stonith_op, must,
action_constraints);
}
/* stonith before start */
order_new(stonith_op, rsc->start, must,
action_constraints);
);
>
> Matt
>
> -----Original Message-----
> From: Soffen, Matthew [mailto:msoffen at iso-ne.com]
> Sent: Friday, June 11, 2004 10:40 AM
> To: High-Availability Linux Development List
> Cc: linux-ha-dev at lists.community.tummy.com
> Subject: RE: [Linux-ha-dev] Re: [Linux-ha-cvs] Linux-HA CVS: crm by
> msoffe n from
>
>
> This is the exact Message ( It's a warning, not an error ):
>
> # gmake
> source='graph.c' object='ptest-graph.o' libtool=no \
> depfile='.deps/ptest-graph.Po' tmpdepfile='.deps/ptest-graph.TPo' \
> depmode=gcc /bin/sh ../../../depcomp \
> gcc -DHAVE_CONFIG_H -I. -I../../../crm/pengine -I../../linux-ha
> -I../../include -I../../include -I../../../include -I../../libltdl
> -I../../../libltdl -I../../linux-ha -I../../../linux-ha -I../..
> -I../../.. -I/usr/local/include -I/usr/local/include/glib12
> -I/usr/local/include/libxml2 -I/usr/local/include `xml2-config
> --cflags`
> -DHA_VARLIBDIR='"/usr/local/var/lib"' -g -O2 -Wall
> -Wmissing-prototypes
> -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith
> -Wwrite-strings
> -Wcast-qual -Wcast-align -Wbad-function-cast -Winline -Wformat=2
> -Wformat-security -Wformat-nonliteral -Wno-long-long -Werror -ggdb3 -c
> -o
> ptest-graph.o `test -f graph.c || echo '../../../crm/pengine/'`graph.c
> ../../../crm/pengine/graph.c:223: warning: preprocessing directive not
> recognized within macro arg
> ../../../crm/pengine/graph.c:223: warning: preprocessing directive not
> recognized within macro arg
> ../../../crm/pengine/graph.c:223: warning: preprocessing directive not
> recognized within macro arg
> ../../../crm/pengine/graph.c:223: warning: preprocessing directive not
> recognized within macro arg
> ../../../crm/pengine/graph.c:223: warning: preprocessing directive not
> recognized within macro arg
> gmake: *** [ptest-graph.o] Error 1
>
>
> -----Original Message-----
> From: Alan Robertson [mailto:alanr at unix.sh]
> Sent: Friday, June 11, 2004 10:10 AM
> To: High-Availability Linux Development List
> Cc: linux-ha-dev at lists.community.tummy.com
> Subject: Re: [Linux-ha-dev] Re: [Linux-ha-cvs] Linux-HA CVS: crm by
> msoffe n from
>
>
> Soffen, Matthew wrote:
>> The problem is that the #if construct does NOT work on FreeBSD or
>> Solaris
> (
>> Macro's not allowed within a macro ).
>
>
> That's certainly not standard C.
>
> You have to do two #defines, one in each branch of the #if...
>
> --
> Alan Robertson <alanr at unix.sh>
>
> "Openness is the foundation and preservative of friendship... Let me
> claim
> from you at all times your undisguised opinions." - William Wilberforce
>
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
More information about the Linux-HA-Dev
mailing list