v3.0.x: rlm_rest and redundant load-balance

Geaaru geaaru at gmail.com
Fri Dec 13 19:38:39 CET 2019


But how you can do this inside redundant-load-balance block?
It seems out of scope to reset REST-HTTP-HEADER until all available
modules (inside the redundant-load-balance) are executed.I know that
single module doesn't know that is inside of redundant-load-balance
section but it seems wrong from my side do this because this means
something like this:
redundant-load-balance {
       rest1       update control {          &REST-HTTP-Header = "X-
Header: XXX"      }      rest2
}
that is wrong as syntax.
I will try to add an option for this, probably is the more easy way to
use it.
Daniele
On Fri, 2019-12-13 at 13:08 -0500, Alan DeKok wrote:
> > On Dec 13, 2019, at 12:05 PM, Geaaru <geaaru at gmail.com> wrote:
> > Hi,i'm trying to use rlm_rest module under redundant load-balance
> > sectionlike this:         accounting {		update control
> > {			&REST-HTTP-Header = "X-Header: XXXX"		
> > }				redundant-load-balance {			
> > 		rest1					rest2		
> > 		}         }But doesn't work as expected because if the
> > first node (rest1) failedthe second REST request is sent without
> > REST-HTTP-HEADER defined (inthis example without X-Header). If
> > rest1  is up&running HTTP requestcontains X-Header correctly.I
> > think that the problem is this:
> > https://github.com/FreeRADIUS/freeradius-server/blob/v3.0.x/src/modules/rlm_rest/rest.c#L2028
> > is there a reason because there attribute is removed instead of
> > simplyto use it?
> 
>   The idea is that the headers apply only to one rest module.  i.e.
> you may be calling two different rest modules, with different
> headers.
> > So, fr_cursor_current instead of fr_cursor_remove?Could it be
> > correct to leave to the user the clean of this attribute?
> 
>   Maybe.  For now, it's simple to just re-add the header.
>   The rlm_rest module could arguably have an option to remove (or
> not) the headers.
>   Alan DeKok.


More information about the Freeradius-Devel mailing list