Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upDNS discovery should not trim final dot #3196
Comments
This comment has been minimized.
This comment has been minimized.
|
The code has been there since the inception of the DNS SD [1] but I agree that it should be removed. Maybe @juliusv has some opinion? [1] https://github.com/prometheus/prometheus/pull/297/files#diff-de6c481fa836cf8897a7b6d1ae60e5d5R74 |
This comment has been minimized.
This comment has been minimized.
|
I don't remember what motivated that, but it certainly seems bogus and IMO should just be fixed. |
bboreham
referenced this issue
Sep 7, 2018
Merged
Stop removing the final dot from rooted DNS names #4586
gouthamve
closed this
in
#4586
Sep 13, 2018
grobie
reopened this
Oct 24, 2018
grobie
added
the
not-as-easy-as-it-looks
label
Oct 24, 2018
This comment has been minimized.
This comment has been minimized.
|
This is not as easy as it looks. The returned target name is used in many contexts, not only in the context of DNS lookups. In the context of HTTP as Host header or in the context of TLS as server name, the final dot is not only uncommon but usually unsupported. I expect a solution to the problem to require a more complex solution, e.g. by using different names for DNS lookups and HTTP requests, or by making the DNS lookup at an earlier stage. Open for ideas and discussion @bboreham. Possible workarounds:
More details can be found in this PR: #4766 |
This comment has been minimized.
This comment has been minimized.
|
Can we start by agreeing on the nature of the problem, which I think is something like: “Prometheus alters the SD results it gets from a DNS SRV lookup by removing any final dot, transforming fully-qualified names into relative names. Removing this artefact proved to inconvenience some users, so we choose to retain it” If we agree on this, I think my suggestion would be to add another Prometheus SD type which uses the unaltered DNS response. |
This comment has been minimized.
This comment has been minimized.
|
@bboreham Fully agreed on the problem description. We probably wouldn't need a completely new SD type, but just add an option to the DNS SD? |
bboreham commentedSep 20, 2017
•
edited
I wish to question this line. It is commented:
but why do we care how it looks? A rooted name has a different meaning from a non-rooted name.
More practically, in a typical Kubernetes installation it causes 4-5 pointless DNS lookups as the search path is traversed.