[Openais] [PATCH] add a command line tool to access the objdb (take 2)

angus salkeld angus.salkeld at alliedtelesis.co.nz
Fri Aug 1 19:20:52 PDT 2008


I agree that we shouldn't have this in two places.

I don't really want to bring in linux-cluster into my embedded environment to
use just this part of it.
My vote would be to move the xpathlite functions from
config/libs/libccsconfdb/libccs.c into objdb->object_find_next() 
(licensing permitted).  
This would give the object database a much
more powerful interface for all to use (as far as I can see this code
is only used to access corosync's objdb any way).
This would make these calls more efficient as well as the searching
will be done where the data is and we won't have lots of unneccessary
IPC messages.

-Angus

>>> "Fabio M. Di Nitto" <fabbione at fabbione.net> 08/02/08 12:05 AM >>>
On Fri, 1 Aug 2008, angus salkeld wrote:

> Hi
>
> One restriction of this tool is it's inability to identify
> objects that are named the same.
>
> Say we have:
> logging.logger.ident=AMF
> logging.logger.debug=on
> ....
> logging.logger.ident=CONFDB
> logging.logger.debug=off
> ...
>
> Now I want to turn CONFDB's debug on, I can't specify this.
>
> corosync-objctl -w logging.logger.debug=on
> # will probably try and set the AMF logger's field.
>
>
> So I could look at an xpath like API instead.
>
> corosync-objctl -w /logging/logger[ident=CONFDB]/debug=on
> or
> corosync-objctl -w /logging/logger[2]/debug=on
> or
> corosync-objctl -w /logging/logger[debug=off]/debug=on
> or
> corosync-objctl -w /logging/logger[last()]/debug=on
>
> What do you think?

An xpath like API probably belongs to libccs from 
http://git.fedorahosted.org/git/cluster.git that is already an XML/xpath 
interface to objdb via libconfdb.

Setting objects is almost the only feature missing there. Duplicating the 
same work within ais is a bit overkilling IMHO.

Fabio

--
I'm going to make him an offer he can't refuse.



More information about the Openais mailing list