[Linux-cluster] [RFC][PATCH] Add ability to freeze e service.

Simone Gotti simone.gotti at email.it
Mon Apr 23 09:15:22 UTC 2007


Hi,

like discussed with lon on IRC I'm trying to add to rgmanager the
ability to freeze a service. I worked on it in these days and did an
example patch. Here is how I think what a "freeze" can be and, of
course, it can be implemented in many other ways so it's only an
example.

== What freeze means? ==

All actions on the service are blocked (start, stop, status) so you can
work by hand on the various resources. When you unfreeze the service
everything returns as before (so if you manually stopped a resource then
the status will fail and the rg recovery is done).

== When does a service can be freezed? ==

You can freeze only if the service status is DISABLED, STOPPED, or
STARTED. It doesn't have sense to freeze a service that is in a
transictional state.

== How is it implemented? ==

*) As I don't want to lose the previous state and I don't think it's a
service state, "freezed" is implemented like a service flag.
As a  "service flag" didn't existed before, this patch adds it to
rg_state_t, so it will be transmitted around the cluster.

*) Two options are added to clusvcasm (-F to freeze, -U to unfreeze),
obviously these options names can be changed (perhaps they can be only a
long option like --freeze, --unfreeze?).
So you can freeze with:
	#clusvcadm -F $SERVICE
and unfreeze with:
	#clusvcadm -U $SERVICE

*) clustat reports these new flags in 2 ways: on normal mode the flags
are between () and in long mode e new line "Flags:" is added. The
functions added in rg_strings.c aren't well tested but should work with
multiple flags.

*) !!!! In the patch I haven't changed the function
handle_start_remote_req because looking at the code I cannot find when
it can be called. Maybe I'm missing something... :D


Thanks!

Bye!

-- 
Simone Gotti

 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Lo sai che hai un tesoro in soffitta? Quello che non serve più a te, può servire agli altri.
* Vendi GRATIS ciò che vuoi con AdBoom.it
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6418&d=23-4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rgmanager-cvsHEAD-add_service_freezing-try01.patch
Type: text/x-patch
Size: 13527 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/linux-cluster/attachments/20070423/1a9359ca/attachment.bin>


More information about the Linux-cluster mailing list