On Tue, Aug 12, 2008 at 02:05:41PM +0100, [EMAIL PROTECTED] wrote:
> > > I've been giving this some more thought.  There are a 
> > couple of issues 
> > > that come to mind:
> > > 
> > > - The default configuration might not always be appropriate - would 
> > > people welcome a patch that disables this behaviour (through a 
> > > configure option, such as --without-default-configuration)
> > 
> > no.  if you don't want to use the default configuration all 
> > you have to do is deploy your own.
> 
> That isn't always a safe assumption.  Some people might prefer to have
> the process fail, so that a process monitoring system tells them that
> gmond is not running.

fair, how do you handle the use of the default configuration from gmetric?

> I've prepared a patch for this, it must be explicitly selected at
> configure time otherwise it has no effect on existing behaviour.

your patch got mangled by your MUA or MTA with line breaks inserted which
prevents it to be applied.

you might want to send it as an attachment (better if mime encoded as
text/plain) or check if you can avoid the line wrapping to break your patches
in the future.

> Index: configure.in
> ===================================================================
> --- configure.in        (revision 1635)
> +++ configure.in        (working copy)
> @@ -251,6 +256,10 @@
>     fi
>  fi
>  
> +if test "$enable_default_config" = no ; then
> +  CFLAGS="$CFLAGS -DDISABLE_DEFAULT_CONFIG"
> +fi

you should use instead "text x"$var" = xno;", is there a way to avoid using a
compile time define here and preprocessor magic, why not use config.h at
least?

>  if test "$enable_python" = yes ; then
>    echo
>    echo Checking for python
> Index: gmond/gmond.c
> ===================================================================
> --- gmond/gmond.c       (revision 1635)
> +++ gmond/gmond.c       (working copy)
> @@ -205,8 +205,16 @@
>  {
>    cfg_t *tmp;
>  
> +#ifndef DISABLE_DEFAULT_CONFIG
> +  /* fallback to defaults if no filename given explicitly */
> +  int fallback = !args_info.conf_given;
> +#else
> +  /* fallback to defaults prohibited in every case */
> +  int fallback = -1;
> +#endif

the same could be done by just defining (if disable_default_config is an
int that contains the value selected for how to handle the default_config)

  int fallback = !disable_default_config && !args_info.conf_given;

> -  config_file = (cfg_t*)Ganglia_gmond_config_create(
> args_info.conf_arg, !args_info.conf_given );
> +  config_file = (cfg_t*)Ganglia_gmond_config_create(
> args_info.conf_arg, fallback );

why not remove the second parameter for that call and make the change of logic
in lib/libgmond.c instead?

Carlo

-------------------------------------------------------------------------
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-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to