[Openais] [PATCH] Use objdb

Steven Dake sdake at redhat.com
Wed Apr 5 14:56:49 PDT 2006


The patch looks good but there is no aisparse.c file.  Use svn add to
add it to your local repo and then svn diff and send the patch again

thanks
-steve

On Wed, 2006-04-05 at 16:36 +0100, Patrick Caulfield wrote:
> 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 = 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 = env_override_name;
> > 	} else
> > 		parser_name = "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 don't
> think that will make much difference as it not used 'till later^H^H^H^H^H at 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.
> 
> 




More information about the Openais mailing list