Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaking change in DNS Windows name resolution in last release due to change in [Resolver.PreferGo] #827

Open
JDA88 opened this issue Dec 15, 2022 · 0 comments

Comments

@JDA88
Copy link

JDA88 commented Dec 15, 2022

Some context first:

Most of our target are stored with their short name hostname01 instead of their full DNS name hostname01.site.domain
The main reason is that the target are retrieved from our CMDB via scripts and that in our environment the conversion from short name to FQDN is not fully predictable and depend on the site ; It is the “suffix list” in the LAN interface that usually take care of this.

Host operating system: output of uname -a

Windows server

snmp_exporter version: output of snmp_exporter -version

0.21.0

What did you do that produced an error?

Using short DNS name in the target

What did you expect to see?

Same behaviour as 0.20.0

What did you see instead?

Failed to resolve the target

Same issues as in prometheus #11480

Root cause: a change from go1.19:

Resolver.PreferGo is now implemented on Windows and Plan 9. It previously only worked on Unix platforms. Combined with Dialer.Resolver and Resolver.Dial, it's now possible to write portable programs and be in control of all DNS name lookups when dialing.

The net package now has initial support for the netgo build tag on Windows. When used, the package uses the Go DNS client (as used by Resolver.PreferGo) instead of asking Windows for DNS results. The upstream DNS server it discovers from Windows may not yet be correct with complex system network configurations, however.

PS: Due to the nature of the exporter I think it's not a major issue, but just wanted you to know as it's an undocumented change.

@JDA88 JDA88 changed the title Breaking change in DNS Windows name resolution in last release dur to change in [Resolver.PreferGo] Breaking change in DNS Windows name resolution in last release due to change in [Resolver.PreferGo] Dec 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant