From: Fabio M. Di Nitto Date: Thu, 26 Mar 2009 14:50:31 +0100 Subject: [Cluster-devel] cman init rework Message-ID: <1238075431.11093.15.camel@cerberus.int.fabbione.net> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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: