Discussion:
[CI] Adding new NSC service
Aneesh Kumar K.V
2002-01-13 08:39:05 UTC
Permalink
Hi,

Is it possible to write a new NSC service as a kernel module ? Is
there any documentation regarding the same. Again after going through
the documentation of enhancing CI I found that nothing is mentioned
regarding making a call to service initialization routine ( e.g.
routines like ics_reopen_svc_init) . This routine is actually getting
called from rvp_init which again get called during cluster
initialization( nsc_init.c ) . But what about the initialization
routine of the new service getting added. The only thing mentioned in
the CI documentation is the routine for registering the nsc service
with an ics channel. IS it not needed to call the service initialization
routine created but icsgen and placed in icssvr_svc_tables.gen.c ?

-aneesh
Frank Mayhar
2002-01-13 14:20:02 UTC
Permalink
Post by Aneesh Kumar K.V
Is it possible to write a new NSC service as a kernel module ? Is
there any documentation regarding the same. Again after going through
the documentation of enhancing CI I found that nothing is mentioned
regarding making a call to service initialization routine ( e.g.
routines like ics_reopen_svc_init) . This routine is actually getting
called from rvp_init which again get called during cluster
initialization( nsc_init.c ) . But what about the initialization
routine of the new service getting added. The only thing mentioned in
the CI documentation is the routine for registering the nsc service
with an ics channel. IS it not needed to call the service initialization
routine created but icsgen and placed in icssvr_svc_tables.gen.c ?
I don't have the source in front of me and I'm working from more than one-
year-old memories, but IIRC you do have to call all of the various
initialization routines, as well as making sure (if you've added a new
ICS service) that CLMS knows about the service. You'll also want to
set up your nodeup/nodedown hooks with CLMS.

So, yes, of course it is possible, but you have to get all your ducks in a
row.
--
Frank Mayhar ***@exit.com http://www.exit.com/
Exit Consulting http://www.gpsclock.com/
Brian J. Watson
2002-01-13 15:21:02 UTC
Permalink
Post by Aneesh Kumar K.V
Hi,
Is it possible to write a new NSC service as a kernel module ? Is
there any documentation regarding the same. Again after going through
the documentation of enhancing CI I found that nothing is mentioned
regarding making a call to service initialization routine ( e.g.
routines like ics_reopen_svc_init) . This routine is actually getting
called from rvp_init which again get called during cluster
initialization( nsc_init.c ) . But what about the initialization
routine of the new service getting added. The only thing mentioned in
the CI documentation is the routine for registering the nsc service
with an ics channel. IS it not needed to call the service initialization
routine created but icsgen and placed in icssvr_svc_tables.gen.c ?
-aneesh
As of the next CI and SSI releases, you sort of can. Kai changed the
registration interface so that you can dynamically register a service
without mucking about in CI files. Well, quasi-dynamically at least.

IIRC, all services will have to be registered in the same exact order on
all nodes, or things break. The reason is that they'll be assigned
different ICS channel and CLMS service numbers. Eventually, this
restriction should be relaxed, but it'll take a little thought to do it
properly.

Until then, CI/SSI services should be implemented using the base macros
for modules (as of the next release), but they should only be compiled
statically into the kernel. Kai's updated documentation should explain
this a bit better.

-Brian
Brian J. Watson
2002-01-14 16:37:08 UTC
Permalink
Post by Brian J. Watson
IIRC, all services will have to be registered in the same exact order on
all nodes, or things break. The reason is that they'll be assigned
different ICS channel and CLMS service numbers.
Let me clarify: If services are registered in a different order on
different nodes, then they'll be assigned different ICS channel and CLMS
service numbers on different nodes. Obviously, a service should have the
same channel and service numbers on all nodes.

Again, this restriction should eventually be relaxed.
--
Brian Watson | "Now I don't know, but I been told it's
Linux Kernel Developer | hard to run with the weight of gold,
Open SSI Clustering Project | Other hand I heard it said, it's
Compaq Computer Corp | just as hard with the weight of lead."
Los Angeles, CA | -Robert Hunter, 1970

mailto:***@compaq.com
http://opensource.compaq.com/
Kai-Min Sung
2002-01-14 19:08:03 UTC
Permalink
Hi Aneesh,
Current work is being done to allow components of CI be written as
kernel modules. However, there are synchronization issues that need to be
dealt with in order to allow dynamic addition/removal of CI components in a
running cluster. In the current release of CI, you need to manually call
the ICS service initialization routine (generated by icsgen). So you would
have to add a hook somewhere in the cluster_main_init_preroot() function
(similar to the ics_reopen_svc_init example you found). What this service
initialization routine does is register the table of cluster service
messages/RPCs with respect to ICS. Sorry, I didn't mention in the docs
that this service initialization routine needs to be hooked in yourself,
similar to how you need to hook in the clms key service init routine.
However, in the next release of CI, you won't have to worry about hooking
in the initialization routines into the CI source. You'll just pass a
pointer to the initialization routines as part of the register_*() calls
and it will automatically be called back for you during bootup.

-Kai
Post by Aneesh Kumar K.V
Hi,
Is it possible to write a new NSC service as a kernel module ? Is
there any documentation regarding the same. Again after going through
the documentation of enhancing CI I found that nothing is mentioned
regarding making a call to service initialization routine ( e.g.
routines like ics_reopen_svc_init) . This routine is actually getting
called from rvp_init which again get called during cluster
initialization( nsc_init.c ) . But what about the initialization
routine of the new service getting added. The only thing mentioned in
the CI documentation is the routine for registering the nsc service
with an ics channel. IS it not needed to call the service initialization
routine created but icsgen and placed in icssvr_svc_tables.gen.c ?
-aneesh
_______________________________________________
ci-linux-devel mailing list
https://lists.sourceforge.net/lists/listinfo/ci-linux-devel
Loading...