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

Simone Gotti simone.gotti at email.it
Wed Apr 25 18:52:08 UTC 2007


On Mon, 2007-04-23 at 16:02 -0400, Lon Hohberger wrote:
> On Mon, Apr 23, 2007 at 11:15:22AM +0200, Simone Gotti wrote:
> > 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.
> 
> Hi,
> 
> couple of comments -
> 
Hi Lon,

> (1) s/freezed/frozen/ig  :)
Uh... :( I hope I fixed them all now without adding other language errors.

> (2) svc_status_inquiry shouldn't call rg_lock(); you should use
> get_rg_state_local() instead of rg_lock/get_rg_state/rg_unlock
done. I didn't knew what do if its return value was != 0 so I logged end exited. Is it right?

> Note that svc_status_inquiry isn't even used yet, so the behavior
> might change at a later date ;)
Ok.

> (3.a) Warning: The addition of rs_flags to rg_state_t will break
> compatibility with existing software (which is fine in -HEAD).  It
> would be easier to cope with this change (that is- make upgrades from
> old->new work) if you added the rs_flags field after the
> rs_transition field. 
> 
> (3.b) If you don't want to do that, then you need to add another 32-bits
> worth of data (could be just a "pad" field) before rs_transition because
> the kernel on ia64 machines will complain if they read a 64-bit int and
> it's not aligned on a 64-bit boundary.
I implemented 3.a. So it should be easily backportable. I wasn't aware of the ia64 alignment problems so thanks for the explanation.

> Aside from that, it looks like you got it right for what you wanted it
> to do.  I can fix (1) (language stuff) if you fix (2) and (3).
I tried also to fix (1) (I hope).
In the meantime I fixed (like you reported on IRC) the missing changes
to clustat.c:xml_rg_state and enhanced a little the default clustat
output adding a "Flags" column.
I added a parameter "separator" to rg_flags_str so it can be defined.
For example in the default clustat I'm using a comma separated list
while in the xml output I'm using a space as separator (dunno if this is
right to do with xml).

Thanks!
Bye!

> -- Lon
> 
-- 
Simone Gotti

 
 
 --
 Email.it, the professional e-mail, gratis per te: http://www.email.it/f
 
 Sponsor:
 Vuoi diventare un vero esperto sul Controllo di Gestione? Scopri come nella tua azienda puoi migliorare gli utili e ridurre le spese
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=6197&d=25-4
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rgmanager-cvsHEAD-add_service_freezing-try02.patch
Type: text/x-patch
Size: 14859 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/linux-cluster/attachments/20070425/9c6992b0/attachment.bin>


More information about the Linux-cluster mailing list