Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

add non-zero weight for returned SRV records #515

Merged
merged 3 commits into from
Jan 26, 2018

Conversation

lamdor
Copy link
Contributor

@lamdor lamdor commented Jan 26, 2018

If this is zero, services like haproxy see that as a backend that's in maintenance. I couldn't see any problem with making it non-zero.

@mesosphere-ci
Copy link

Can one of the admins verify this patch?

@jdef
Copy link
Contributor

jdef commented Jan 26, 2018

ok to test

@jdef
Copy link
Contributor

jdef commented Jan 26, 2018

thanks @rubbish can you provide a link to the relevant haproxy docs?

@lamdor
Copy link
Contributor Author

lamdor commented Jan 26, 2018

@jdef I couldn't find it the haproxy docs (https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#5.3.1), this is something I found in my own testing.

But looking at the haproxy source, http://git.haproxy.org/?p=haproxy-1.8.git;a=blob;f=src/dns.c;h=a957710edb2f92e31069844a15338cc8834e8402;hb=HEAD#l527 it has:

Make sure weight is at least 1, so that the server will be used.

@jdef
Copy link
Contributor

jdef commented Jan 26, 2018 via email

@lamdor
Copy link
Contributor Author

lamdor commented Jan 26, 2018

@jdef Sounds good. Added in 2f04f61

Copy link
Contributor

@jdef jdef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nits, otherwise LGTM

`externalon` is a boolean field that controls whether Mesos-DNS serves requests outside of the Mesos domain. The default value is `true`.
`externalon` is a boolean field that controls whether Mesos-DNS serves requests outside of the Mesos domain. The default value is `true`.

`srvRecordDefaultWeight` is an int field field that defines what the default weight given to SRV records. The default value is `1`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: s/what//

IPSources: []string{"netinfo", "mesos", "host"},
EnumerationOn: true,
MesosAuthentication: httpcli.AuthNone,
ZkDetectionTimeout: 30,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: run this through go fmt please

Copy link
Contributor

@drewkerrigan drewkerrigan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after @jdef's comments are addressed

@lamdor
Copy link
Contributor Author

lamdor commented Jan 26, 2018

should be gtg now

Copy link
Contributor

@jdef jdef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@jdef
Copy link
Contributor

jdef commented Jan 26, 2018

retest this please

@jdef jdef merged commit 9507279 into d2iq-archive:master Jan 26, 2018
@adamdecaf adamdecaf deleted the srv-non-zero-weight branch May 11, 2018 14:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants