Exactly ...

Am 13.01.2012 um 16:02 schrieb Peter Hessler:

> I would really like the feature to be available, but I agree that the
> current implentation causes problems.
>
> The correct behaviour is +1/-1, of course.
>
>
> On 2012 Jan 13 (Fri) at 15:51:54 +0100 (+0100), Pierre-Yves Ritschard
wrote:
> :This would make sense to me
> :
> :On Sat, Jan 14, 2012 at 3:33 PM, Camiel Dobbelaar <[email protected]> wrote:
> :>
> :>
> :> On Wed, 11 Jan 2012, Henning Brauer wrote:
> :>
> :>> * Camiel Dobbelaar <[email protected]> [2012-01-11 19:35]:
> :>> > Maybe we should take the global demote option out then, I don't think
> :>> > there is a way that relayd can tell that the demote counter was
raised
> :>> > by a previous relayd.  (besides picking some magic value)
> :>> >
> :>> > Here's the manpage description from relayd.conf:
> :>> >
> :>> > >      demote group
> :>> > >              Enable the global carp(4) demotion option, resetting
the
> :carp
> :>> > >              demotion counter for the specified interface group to
zero
> :on
> :>> > >              startup and to 128 on shutdown of the daemon.  For
more
> :>> > >              information on interface groups, see the group keyword
in
> :>> > >              ifconfig(8).
> :>>
> :>> ugh. that is pretty damn wrong.
> :>
> :>
> :> How about removing it then?
> :>
> :>
> :> Index: parse.y
> :> ===================================================================
> :> RCS file: /cvs/src/usr.sbin/relayd/parse.y,v
> :> retrieving revision 1.159
> :> diff -u -p -u -r1.159 parse.y
> :> --- parse.y     21 Sep 2011 18:45:40 -0000      1.159
> :> +++ parse.y     13 Jan 2012 14:31:05 -0000
> :> @@ -365,24 +365,6 @@ main               : INTERVAL NUMBER       {
> :>                        }
> :>                        conf->sc_prefork_relay = $2;
> :>                }
> :> -               | DEMOTE STRING         {
> :> -                       if (loadcfg)
> :> -                               break;
> :> -                       conf->sc_flags |= F_DEMOTE;
> :> -                       if (strlcpy(conf->sc_demote_group, $2,
> :> -                           sizeof(conf->sc_demote_group))
> :> -                           >= sizeof(conf->sc_demote_group)) {
> :> -                               yyerror("yyparse: demote group name too
> :long");
> :> -                               free($2);
> :> -                               YYERROR;
> :> -                       }
> :> -                       free($2);
> :> -                       if (carp_demote_init(conf->sc_demote_group, 1)
==
> :-1) {
> :> -                               yyerror("yyparse: error initializing
group
> :%s",
> :> -                                   conf->sc_demote_group);
> :> -                               YYERROR;
> :> -                       }
> :> -               }
> :>                | SEND TRAP             {
> :>                        if (loadcfg)
> :>                                break;
> :> Index: relayd.c
> :> ===================================================================
> :> RCS file: /cvs/src/usr.sbin/relayd/relayd.c,v
> :> retrieving revision 1.104
> :> diff -u -p -u -r1.104 relayd.c
> :> --- relayd.c    4 Sep 2011 20:26:58 -0000       1.104
> :> +++ relayd.c    13 Jan 2012 14:31:05 -0000
> :> @@ -361,8 +361,6 @@ parent_shutdown(struct relayd *env)
> :>        proc_kill(env->sc_ps);
> :>        control_cleanup(&env->sc_ps->ps_csock);
> :>        carp_demote_shutdown();
> :> -       if (env->sc_flags & F_DEMOTE)
> :> -               carp_demote_reset(env->sc_demote_group, 128);
> :>
> :>        free(env->sc_ps);
> :>        free(env);
> :> Index: relayd.conf.5
> :> ===================================================================
> :> RCS file: /cvs/src/usr.sbin/relayd/relayd.conf.5,v
> :> retrieving revision 1.124
> :> diff -u -p -u -r1.124 relayd.conf.5
> :> --- relayd.conf.5       24 Jun 2011 14:42:36 -0000      1.124
> :> +++ relayd.conf.5       13 Jan 2012 14:31:05 -0000
> :> @@ -115,17 +115,6 @@ table \*(Ltwebhosts\*(Gt {
> :>  .Sh GLOBAL CONFIGURATION
> :>  Here are the settings that can be set globally:
> :>  .Bl -tag -width Ds
> :> -.It Ic demote Ar group
> :> -Enable the global
> :> -.Xr carp 4
> :> -demotion option, resetting the carp demotion counter for the
> :> -specified interface group to zero on startup and to 128 on shutdown of
> :> -the daemon.
> :> -For more information on interface groups,
> :> -see the
> :> -.Ic group
> :> -keyword in
> :> -.Xr ifconfig 8 .
> :>  .It Ic interval Ar number
> :>  Set the interval in seconds at which the hosts will be checked.
> :>  The default interval is 10 seconds.
> :
>
> --
> If everybody minded their own business, the world would go
> around a deal faster.
>               -- The Duchess, "Through the Looking Glass"

Reply via email to