>>> On 11/25/2008 at 10:14 AM, in message <[EMAIL PROTECTED]>,
Ofer Inbar <[EMAIL PROTECTED]> wrote:
> Brad Nicholes <[EMAIL PROTECTED]> wrote:
>> It needs a temp directory to get around some issues with libconfuse.
>> Libconfuse doesn't actually support wildcard paths or files.  A
>> libconfuse include statement must have a full path to the file that
>> it is going include.  So gmond makes up for this problem by creating
>> a temp file, resolving all of the file paths and names and then
>> writing them as separate includes in a temp file.  Then it tells
>> libconfuse to include the temp file directly.  Without the ability
>> to resolve the wildcard paths and write them to a temp file, the
>> wildcarding feature of gmond wouldn't work.  To solve the problem
>> that you are describing, we would have to actually add wildcard
>> capability to libconfuse.
> 
> Might this be cleaner workaround that would work for gmond as well?
> 
>  - override libconfuse's include function as you're already doing
>  - resolve file paths and names as you're already doing
>  - instead of writing that to a temp file and telling libconfuse to
>    include that file, just tell libconfuse to include each individual
>    file (the same filenames you're now writing to the temp file)
> 

At one point I had tried to do exactly what is being suggested here.  See 
revision

http://ganglia.svn.sourceforge.net/viewvc/ganglia?view=rev&revision=813

The problem that I ran into was that libconfuse thought that each call to 
cfg_include() meant that the include was nested deeper rather than at the same 
level.  The result was that if the wildcard produced more than 10 included 
files (which it easily does even in our default configuration), libconfuse 
choked because it thought it had hit the maximum nesting level even through we 
were still at a nesting level of one.

Brad


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Ganglia-general mailing list
Ganglia-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-general

Reply via email to