Re: [Openais] [PATCH] RFC: Allow libconfdb to run standalone

2008-04-30 Thread Steven Dake
On Wed, 2008-04-30 at 14:14 +0100, Christine Caulfield wrote:
 Steven Dake wrote:
  On Mon, 2008-04-28 at 11:05 +0100, Christine Caulfield wrote:
  This is a patch that adds some standalone code to libconfdb, so it can
  examine and ultimately change, the configuration without aisexec running.
 
  A small number of things I'm unsure about..
 
  - it automatically falls back to standalone if it can't connect to
  aisexec. That might not be the right thing to do, opinions welcome.
 
 
 
 Revised patch attached
 
 
  standalone mode should only be used when the environment variable for
  the configuration engine is set.  If it isn't set, then it should return
  an error standard for aisexec not running.
  
  - any program accessing confdb needs to be linked -rdynamic so that
  several objdb/config symbols can be resolved. There might be ways around
  this though I'm not sure how nice they are!
  
  Yikes
 
 Looking at it, I can't see any reasonable way round this. The lcrso
 system requires that the registration code for the lcrso is accessible
 from the loading program.
 
 Without -rdynamic, a program using libconfdb will give the following
 error when stanadalone access is requested:
 
 /usr/libexec/lcrso/aisparser.lcrso: open failed:
 /usr/libexec/lcrso/aisparser.lcrso: undefined symbol: lcr_component_register
 
 Normal access via aisexec doesn't need it though.
 
ok this is fine.

 
  - Some config options I haven't got to work yet. In particular the new
  cman preconfig module calls logsys, and I'm undecided about the best way
  to tackle this. I think maybe the callers ought also to link with
  logsys, but a quite test seems to make this difficult for some reason.
 
 
  
  The configuration engine plugins shouldn't be dependent upon logsys or
  any other third party library.
 
 OK, so the cman ones need logsys ripping ouy and replacing with syslog
 ... there's progress ;-)
 
 

The CMAN configuration engine shouldn't use logsys or any type of printf
logging at all.  Instead it should return its error in the proper api.
The key is to separate the binaries so there is a cman_cfeng and a cman
lcrso files.

Doesn't this make sense?

 Chrissie
 ___
 Openais mailing list
 Openais@lists.linux-foundation.org
 https://lists.linux-foundation.org/mailman/listinfo/openais

___
Openais mailing list
Openais@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/openais


Re: [Openais] [PATCH] RFC: Allow libconfdb to run standalone

2008-04-28 Thread Steven Dake
On Mon, 2008-04-28 at 11:05 +0100, Christine Caulfield wrote:
 This is a patch that adds some standalone code to libconfdb, so it can
 examine and ultimately change, the configuration without aisexec running.
 
 A small number of things I'm unsure about..
 
 - it automatically falls back to standalone if it can't connect to
 aisexec. That might not be the right thing to do, opinions welcome.
 

standalone mode should only be used when the environment variable for
the configuration engine is set.  If it isn't set, then it should return
an error standard for aisexec not running.

 - any program accessing confdb needs to be linked -rdynamic so that
 several objdb/config symbols can be resolved. There might be ways around
 this though I'm not sure how nice they are!

Yikes

 
 - Some config options I haven't got to work yet. In particular the new
 cman preconfig module calls logsys, and I'm undecided about the best way
 to tackle this. I think maybe the callers ought also to link with
 logsys, but a quite test seems to make this difficult for some reason.
 
 

The configuration engine plugins shouldn't be dependent upon logsys or
any other third party library.

The idea is that you can specify the name of the configuration engine in
an environment variable and it will automatically use it.

 ___
 Openais mailing list
 Openais@lists.linux-foundation.org
 https://lists.linux-foundation.org/mailman/listinfo/openais

___
Openais mailing list
Openais@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/openais