[Openais] [PATCH] Use objdb

Patrick Caulfield pcaulfie at redhat.com
Wed Apr 5 08:36:16 PDT 2006


Steven Dake wrote:
> Patrick,
> =

> Sorry I was thinking one thing and you were thinking another and we had
> a lack of communication (my fault).
> =

> There is a big problem with this patch.
> =

> aisparser shouldn't be a "service handler" it should be more like a
> loadable interface (that may be the entire or part of a component).
> This is the same thing that objdb is.
> =

> In the current main.c code, the object database is loaded early on:
>     /*
>      * Load the object database interface
>      */
>     res =3D lcr_ifact_reference (
>         &objdb_handle,
>         "objdb",
>         0,
>         (void **)&objdb,
>         0);
> =

> =

> We want to do the same thing with aisparser.  It would look something
> like this early on
> =

> 	if (env_override) {
> 		parser_name =3D env_override_name;
> 	} else
> 		parser_name =3D "aisparser";
> 	}
> =

> 	lcr_ifact_reference (
> 		&parser_handle,
> 		parser_name",
> 		...
> =

> Within the cman component, it would still be possible to easily specify
> a parser interface along with a cman service handler interface.
> =

> This also allows services_link to occur outside of the bootstrapping of
> the service handlers therefore allowing for the previous policy we
> discussed wrt default services.  The whole "do it again" thing is just
> ugly...
> =

> Sorry for not being more specific previously..
> =

> Other then that problem the patch looks good.
> =

> I'm not sure what the parser interface should look like.  I guess it
> should be similar in nature to the previous interface so that we can get
> back some kind of errors from it to display to the user in main.c.
> =


OK, take 3 attached.

Also in this version: I've moved the services list from  services { } to
aisexec { } and added user: and group: keys into there too so the user and
group can be specified in the config file (the default still applies).

This has meant moving aisexec_uid_determine after the config parts but I do=
n't
think that will make much difference as it not used 'till later^H^H^H^H^H a=
t all !

The config interface is pretty primitive but I couldn't think of any ways to
complicated it ... just the one call that populates the objdb or returns an
error string.


-- =


patrick
-------------- next part --------------
A non-text attachment was scrubbed...
Name: objconfig.patch
Type: text/x-patch
Size: 50247 bytes
Desc: not available
Url : http://lists.linux-foundation.org/pipermail/openais/attachments/20060=
405/15f8efc9/objconfig-0001.bin


More information about the Openais mailing list