All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cluster-devel] cman init rework
@ 2009-03-26 13:50 Fabio M. Di Nitto
  2009-03-30 21:42 ` David Teigland
  0 siblings, 1 reply; 5+ messages in thread
From: Fabio M. Di Nitto @ 2009-03-26 13:50 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hi everybody,

I spent a bit of time cleaning cman init script to be a lot easier to
read (IMHO), more maintainable and ready to be expanded to fix some
outstanding issues.

major highlights:

- clean up all over
- grouping of functions
- made ready for extensions (specially at startup time)
- remove tons of duplicate stuff around
- try to standardize a bit the way of writing the shell script
- run in quiet/terse/full output mode

The final script is tons of times smaller than the whole patchset.

So I published a fabbione_cmaninit branch for people to look at history
of changes.

In attachment there is a copy of the new one.

Two notes (I know somebody is going to ask):

1) On startup (eg):

start_foo()
{
        start_daemon foo
}

all those wrappers look the same. It's preparation to extend them.

In our current startup sequence, we do start a daemon, we make sure it
starts, but we never check if it's actually working properly.

As time goes, and I also need feedback from different daemons
maintainer, those snippets will change to look like:

start_foo()
{
        start_daemon foo || return 1
	check_if_daemon_foo_is_working
}

similar to what we do with cman that we wait for quorum and we check
cman_is_running via cman_status.

Those checks will make our init script a lot more robust than it is now.

2) On shutdown (eg):

I did slow down the shutdown time by adding a sleep 1 after each kill
invokation. This will give a bit of time for each daemon to exit.
Note that the timer is configurable (see for example stop_qdiskd).

Please give it a shot and let me know.

I plan to land this one in master and stable3 sometime next week.

It's not a blocker for 3.0.0 final.

Fabio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cman.in
Type: application/x-shellscript
Size: 16199 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20090326/6c0ac25d/attachment.bin>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-03-31 17:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-26 13:50 [Cluster-devel] cman init rework Fabio M. Di Nitto
2009-03-30 21:42 ` David Teigland
2009-03-31  5:23   ` Fabio M. Di Nitto
2009-03-31 17:55     ` David Teigland
2009-03-31  7:21   ` Fabio M. Di Nitto

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.