[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Linux-cluster] [PATCH 0/4] fence

On Thu, Feb 17, 2005 at 07:35:34PM +0100, Bastian Blank wrote:
> Patches:
> 1. Use bools instead of crude defines.

Interesting, but I think I still prefer using int's and defines.  I like
the option of doing other things (-1/0/1) even if we're only doing T/F
now.  Also, there's no /usr/include/stdbool.h on my machine.

> 2. Remove GNU-isms.

You'll have to pardon my ignorance about GNU-isms; could you explain the
shortcoming of the current method, or point me to a discussion?  The
existing code looks nicer to me, but I'm happy to learn something new.

For reference, existing:

#define die(fmt, args...) \
do \
{ \
	fprintf(stderr, "%s: ", prog_name); \
	fprintf(stderr, fmt "\n", ##args); \
	syslog(LOG_ERR, fmt, ##args); \
	exit(EXIT_FAILURE); \
} \
while (0)

patch does:

static inline void die(const char *fmt, ...)
	va_list ap;
	fputs(prog_name, stderr);
	fputs(": ", stderr);
	va_start(ap, fmt);
	vfprintf(stderr, fmt, ap);
	fputs("\n", stderr);
	vsyslog(LOG_ERR, fmt, ap);

> 3. Add option to fence_tool to not wait for quorum.


> 4. Wait for the join complete event in fenced.

I'd really like to keep all the "usability-oriented" stuff in fence_tool
and out of fenced.  It would probably be better if the poll-end of the new
pipe was in fence_tool.

Or, I just thought of another method.  fence_tool's -w handling could
could read fenced's unix socket and wait until it sees "finish:".  See
fence_tool.c:do_monitor().  do_monitor("finish:") would return when it
sees a line matching "finish:".

We could also use this method to allow "fence_tool leave -w".

Dave Teigland  <teigland redhat com>

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]