macOS DNS resolving change in Go 1.20

29 views
Skip to first unread message

Matthias Rampke

unread,
Feb 3, 2023, 5:01:44 PM2/3/23
to Prometheus Developers
Will this affect how DNS SD behaves on macOS?

https://danp.net/posts/macos-dns-change-in-go-1-20/

Julien Pivotto

unread,
Feb 3, 2023, 5:59:23 PM2/3/23
to Matthias Rampke, Prometheus Developers
On 03 Feb 23:01, Matthias Rampke wrote:
> Will this affect how DNS SD behaves on macOS?
>
> https://danp.net/posts/macos-dns-change-in-go-1-20/

It will not affect DNS SD at all, as it uses a dedicated DNS library.

It could affect static SD but it will not affect Prometheus as we build
it with netgo for all architectures but Windows, ignoring the native
resolver.

Windows has quite a different story because in go1.19 they switched to
netgo by default, but it broke our users who were unable to resolve
using the host file of Windows. Therefore we have special handling in
promu.yml for windows.

My guess is that some mac users might want to also use the native
resolver, but I have not seen such a request yet.


--
Julien Pivotto
@roidelapluie

Daniel Swarbrick

unread,
Feb 8, 2023, 8:56:53 AM2/8/23
to Prometheus Developers
On Saturday, February 4, 2023 at 11:59:23 AM UTC+13 Julien Pivotto wrote:
Windows has quite a different story because in go1.19 they switched to
netgo by default, but it broke our users who were unable to resolve
using the host file of Windows. Therefore we have special handling in
promu.yml for windows.

I just want to chime in on this with some experience from an environment which used DNAME records, which are a relatively uncommon CNAME-like equivalent for aliasing an entire domain.

The netgo resolver does not support DNAME responses, whereas the native libc resolver does (at least on Linux / glibc). Said environment mainly used Debian packaged builds of Prometheus, which do _not_ use netgo, so it was only something that I stumbled upon by chance when testing an upstream release which used netgo.
Reply all
Reply to author
Forward
0 new messages