Can confirm that it has fixed my problem. static-rr is working as
expected after patching.

On 14 December 2017 at 19:53, Cyril Bonté <[email protected]> wrote:
> Hi Adrian,
>
> Le 14/12/2017 à 00:08, Adrian Williams a écrit :
>>
>> Several backend balancing methods seem to be broken with the 1.8
>> releases. All traffic is directed to one backend even when multiple
>> are listed. This happens on both 1.8 and 1.8.1. Changing the balance
>> to roundrobin distributes requests as expected.
>>
>> Balancing modes affected: source, URL, static-rr
>
>
> I can confirm the issue, it seems there was a typo when HA_ATOMIC_* macros
> were introduced. This small patch should fix the issue :
> diff --git a/src/lb_map.c b/src/lb_map.c
> index ecab4de13..a1e1d3492 100644
> --- a/src/lb_map.c
> +++ b/src/lb_map.c
> @@ -122,7 +122,7 @@ void recalc_server_map(struct proxy *px)
>                         }
>                 }
>                 px->lbprm.map.srv[o] = best;
> -               HA_ATOMIC_ADD(&best->wscore, tot);
> +               HA_ATOMIC_SUB(&best->wscore, tot);
>         }
>  }
>
> Do you have the possibility to test it ?
>
> --
> Cyril Bonté

Reply via email to