Hello,
On 10/17/19 1:47 AM, Baptiste wrote:
Hi Daniel,
Thanks for the patch, but I don't think it's accurate.
What this part of the code aims to do is to "map" a DNS weight into an
HAProxy weight.
There is a ratio of 256 between both: DNS being in range "0-65535" and
HAProxy in range "0-255".
What your code does, is that it ignores any DNS weight above 256 and
force them to 1...
The only "bug" I can see here now is that a server's weight can never
be 0. But nobody reported this as an issue yet.
I'll check what question is asked into #48 and answer it.
Ah ha! Thanks for the explanation and my apologies for the noise. This
makes sense now.
I have put together another patch that I will send later for the
"resolve-opts ignore-weight" within that same issue report but wanted to
get this one out first.
Thanks for taking the time to review this Baptiste.
-- Daniel