On Mon, Jun 28, 2010 at 12:17:03PM -0700, Bernard Li wrote:
> On Sat, Jun 26, 2010 at 4:56 AM, Carlo Marcelo Arenas Belon
> <care...@sajinet.com.pe> wrote:
> 
> > this would trigger gmond to segfault unless it was linked against
> > libconfuse 2.7 or it also has a default gmond.conf file created.
> 
> Actually, gmond would segfault with or without this patch

Right, forgot the problem was introduced and released with 3.1.7 when
pushing by default the configuration for modpython (unless built with
--disable-python)

> this is because the default configuration has the line:
> 
> include ("$sysconfdir/conf.d/*.conf")
> 
> which causes libconfuse to segfault.

not really; it is because the include is referencing that directory
AND there are files on that directory that then get imported into
and inserted into the configuration making libconfuse segfault.

if the directory would not exist or be empty (as it was before) then
gmond wouldn't crash.

> I was thinking that it does not make sense to include this in the
> "default" configuration file, which is used when no configuration file
> is found.  The reason is if no configuration file is found, you would
> not expect to have other configuration files lying around to be
> included.

make install is pushing configuration files and therefore there are
other files lying around even if no configuration was created.

> One way to fix this, is to only include this line when we are trying
> to output this to standard out via `gmond -t`.  This way gmond can
> still function without a configuration file, and the default
> configuration outputting still works as expected and users won't need
> libconfuse 2.7 to get gmond working the way it's supposed to be --
> what do you think?

interesting, but more of a hack around the problem than a solution.
it also has the sideffect of changing the way `gmond -t` works and
making the internal configuration invisible as there is no way anymore
to "print it", and therefore should need also most likely to be
documented clearly to avoid surprises.

agree though that at least remove the "segfault by default" and therefore
is worth considering, even if probably a similar solution could be accomplished
but not pushing by default configurations (which as I said your patch was
encouraging instead)

> > installing the example modules by default might not be a good idea, as
> > they are just generating bogus metrics anyway.
> 
> Agreed, but they are "installed", but not turned on (note the
> pyconf.off extension).

but they are example modules (AKA meant for reading and learning from, not
running in a production setup) and would rather see pushed by a packager into
/usr/share/doc/ganglia/examples or something similar than in the place where
all other real modules are deployed.

> > also, as you pointed out since these modules are linux specific and only
> > needed on some setups they were intentionally not included in the default
> > install as they are generally pulled as needed by the packager/sysadmins
> > that are interested on them anyway.
> 
> How about a new target like `make install_gmond_modules`?

probably more of a `make install_extra_linux_modules`, which then would also
pull the needed configurations and ensure that gmond can include and enable
them all without crashing.

> The reason why I decided to do this is because users who build from
> source may not know about these modules, or know where they are
> supposed to go.  So I thought it would be nice to make it easier for
> them to discover this.

this seems like something that would be better to correct through
documentation.

don't forget also packagers (and sysadmins) are already pulling
through their packages whatever they find useful and so this change
will conflict downstream with their setups, while not providing the
information that would allow otherwise be used by interested sysadmins
to make their own educated decisions.

Carlo

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Ganglia-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to