Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux-HA: Dev

Re: [Linux-ha-cvs] Linux-HA CVS: crm by msoffe n from

 

 

Linux-HA dev RSS feed   Index | Next | Previous | View Threaded


msoffen at iso-ne

Jun 8, 2004, 6:54 AM

Post #1 of 9 (1151 views)
Permalink
Re: [Linux-ha-cvs] Linux-HA CVS: crm by msoffe n from

The problem is that the #if construct does NOT work on FreeBSD or Solaris (
Macro's not allowed within a macro ).

Matt

-----Original Message-----
From: Andrew [mailto:lists [at] beekhof]
Sent: Monday, June 07, 2004 5:37 PM
To: linux-ha-dev [at] lists
Subject: [Linux-ha-dev] Re: [Linux-ha-cvs] Linux-HA CVS: crm by msoffen
from


Matt,

you do a great job fixing up variable definitions for Solaris, but
please leave things like this alone

thanks,
Andrew


On Jun 7, 2004, at 11:28 PM, linux-ha-cvs [at] lists
wrote:

>
> -#if 1
> /*
> * Mark the stop as irrelevant
> *
> @@ -400,9 +407,9 @@
> * the transition, but not yet
> */
> rsc->stop->discard = TRUE;
> -#else
> - rsc->stop->optional = TRUE;
> -#endif

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/


msoffen at iso-ne

Jun 8, 2004, 6:55 AM

Post #2 of 9 (1132 views)
Permalink
Re: [Linux-ha-cvs] Linux-HA CVS: crm by msoffe n from [In reply to]

The problem is that the #if construct does NOT work on FreeBSD or Solaris (
Macro's not allowed within a macro ).

Matt

-----Original Message-----
From: Andrew [mailto:lists [at] beekhof]
Sent: Monday, June 07, 2004 5:37 PM
To: linux-ha-dev [at] lists
Subject: [Linux-ha-dev] Re: [Linux-ha-cvs] Linux-HA CVS: crm by msoffen
from


Matt,

you do a great job fixing up variable definitions for Solaris, but
please leave things like this alone

thanks,
Andrew


On Jun 7, 2004, at 11:28 PM, linux-ha-cvs [at] lists
wrote:

>
> -#if 1
> /*
> * Mark the stop as irrelevant
> *
> @@ -400,9 +407,9 @@
> * the transition, but not yet
> */
> rsc->stop->discard = TRUE;
> -#else
> - rsc->stop->optional = TRUE;
> -#endif

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/


lists at beekhof

Jun 8, 2004, 6:58 AM

Post #3 of 9 (1134 views)
Permalink
Re: [Linux-ha-cvs] Linux-HA CVS: crm by msoffe n from [In reply to]

noted. i'll use if(0) in future. they'll be gone by the time the CRM
is ready for use anyway.

On Jun 8, 2004, at 2:55 PM, Soffen, Matthew wrote:

> The problem is that the #if construct does NOT work on FreeBSD or
> Solaris (
> Macro's not allowed within a macro ).
>
> Matt
>
> -----Original Message-----
> From: Andrew [mailto:lists [at] beekhof]
> Sent: Monday, June 07, 2004 5:37 PM
> To: linux-ha-dev [at] lists
> Subject: [Linux-ha-dev] Re: [Linux-ha-cvs] Linux-HA CVS: crm by msoffen
> from
>
>
> Matt,
>
> you do a great job fixing up variable definitions for Solaris, but
> please leave things like this alone
>
> thanks,
> Andrew
>
>
> On Jun 7, 2004, at 11:28 PM, linux-ha-cvs [at] lists
> wrote:
>
>>
>> -#if 1
>> /*
>> * Mark the stop as irrelevant
>> *
>> @@ -400,9 +407,9 @@
>> * the transition, but not yet
>> */
>> rsc->stop->discard = TRUE;
>> -#else
>> - rsc->stop->optional = TRUE;
>> -#endif
>
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev [at] lists
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev [at] lists
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/


alanr at unix

Jun 11, 2004, 8:18 AM

Post #4 of 9 (1127 views)
Permalink
Re: [Linux-ha-cvs] Linux-HA CVS: crm by msoffe n from [In reply to]

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>

"Openness is the foundation and preservative of friendship... Let me claim
from you at all times your undisguised opinions." - William Wilberforce


alanr at unix

Jun 11, 2004, 8:19 AM

Post #5 of 9 (1115 views)
Permalink
Re: [Linux-ha-cvs] Linux-HA CVS: crm by msoffe n from [In reply to]

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>

"Openness is the foundation and preservative of friendship... Let me claim
from you at all times your undisguised opinions." - William Wilberforce


msoffen at iso-ne

Jun 11, 2004, 8:39 AM

Post #6 of 9 (1131 views)
Permalink
Re: [Linux-ha-cvs] Linux-HA CVS: crm by msoffe n from [In reply to]

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]
Sent: Friday, June 11, 2004 10:10 AM
To: High-Availability Linux Development List
Cc: linux-ha-dev [at] lists
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>

"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
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/


msoffen at iso-ne

Jun 11, 2004, 8:40 AM

Post #7 of 9 (1104 views)
Permalink
Re: [Linux-ha-cvs] Linux-HA CVS: crm by msoffe n from [In reply to]

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]
Sent: Friday, June 11, 2004 10:10 AM
To: High-Availability Linux Development List
Cc: linux-ha-dev [at] lists
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>

"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
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/


msoffen at iso-ne

Jun 11, 2004, 12:53 PM

Post #8 of 9 (1137 views)
Permalink
Re: [Linux-ha-cvs] Linux-HA CVS: crm by msoffe n from [In reply to]

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).

Matt

-----Original Message-----
From: Soffen, Matthew [mailto:msoffen [at] iso-ne]
Sent: Friday, June 11, 2004 10:40 AM
To: High-Availability Linux Development List
Cc: linux-ha-dev [at] lists
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]
Sent: Friday, June 11, 2004 10:10 AM
To: High-Availability Linux Development List
Cc: linux-ha-dev [at] lists
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>

"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
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev [at] lists
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/


lists at beekhof

Jun 11, 2004, 2:34 PM

Post #9 of 9 (1121 views)
Permalink
Re: [Linux-ha-cvs] Linux-HA CVS: crm by msoffe n from [In reply to]

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]
> Sent: Friday, June 11, 2004 10:40 AM
> To: High-Availability Linux Development List
> Cc: linux-ha-dev [at] lists
> 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]
> Sent: Friday, June 11, 2004 10:10 AM
> To: High-Availability Linux Development List
> Cc: linux-ha-dev [at] lists
> 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>
>
> "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
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev [at] lists
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev [at] lists
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/

Linux-HA dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.