-
Notifications
You must be signed in to change notification settings - Fork 16
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
Remove trust-ad
from options
line in /etc/resolv.conf
#440
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Prometheus stopped working for us, with panics that look like this: panic: runtime error: slice bounds out of range [:9] with length 8 goroutine 425 [running]: github.com/miekg/dns.ClientConfigFromReader(0x1b914a0, 0xc051786b38, 0x0, 0xc000000000, 0xc051786b38) github.com/miekg/dns/clientconfig.go:94 +0x8d1 github.com/miekg/dns.ClientConfigFromFile(0x1900ba4, 0x10, 0x0, 0x0, 0x0) github.com/miekg/dns/clientconfig.go:29 +0xde github.com/prometheus/prometheus/discovery/dns.lookupWithSearchPath(0xc050c8ccf0, 0x2e, 0xc0518d0001, 0x1b8f4c0, 0xc0515a1e00, 0xc051873758, 0xc00041e678, 0x7b30d0) github.com/prometheus/prometheus/discovery/dns/dns.go:245 +0x48 github.com/prometheus/prometheus/discovery/dns.(*Discovery).refreshOne(0xc0513c91d0, 0x1bb6140, 0xc0000d3a80, 0xc050c8ccf0, 0x2e, 0xc0519304e0, 0x26ed320, 0x164a5e0) github.com/prometheus/prometheus/discovery/dns/dns.go:173 +0x77 github.com/prometheus/prometheus/discovery/dns.(*Discovery).refresh.func1(0xc0513c91d0, 0x1bb6140, 0xc0000d3a80, 0xc0519304e0, 0xc0516c9250, 0xc050c8ccf0, 0x2e) github.com/prometheus/prometheus/discovery/dns/dns.go:154 +0x81 created by github.com/prometheus/prometheus/discovery/dns.(*Discovery).refresh github.com/prometheus/prometheus/discovery/dns/dns.go:153 +0x175 This looked like it was barfing on the `options` line in /etc/resolv.conf, on a string of length 8. In June, a change was made to systemd-resolved to change the options line from `options edns0` to `options edns0 trust-ad`. It looks like this change is causing the panic in the miekd/dns library. This change removes `trust-ad` from the `options` line because a) we don't care about DNSSEC, and b) we think it's breaking things. Note that systemd-resolved automatically determines whether it should manage /etc/resolv.conf or not based on whether it is a symlink and whether it includes 127.0.0.53 as a nameserver. So we think that replacing the symlink will Do The Right Thing. We tested by manually changing /etc/resolv.conf on a machine and rebooting it to see if it still worked, and it did. See https://jlk.fjfi.cvut.cz/arch/manpages/man/systemd-resolved.8#/ETC/RESOLV.CONF > Note that the selected mode of operation for this file is detected > fully automatically, depending on whether /etc/resolv.conf is a > symlink to /run/systemd/resolve/resolv.conf or lists 127.0.0.53 as > DNS server. Co-authored-by: chrisfarms <chris.farmiloe@digital.cabinet-office.gov.uk> Co-authored-by: Robert Scott <robert.scott@digital.cabinet-office.gov.uk>
szd55gds
approved these changes
Nov 16, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
risicle
approved these changes
Nov 16, 2020
cbaines
added a commit
to alphagov/tech-ops
that referenced
this pull request
Nov 18, 2020
This uses the same approach as taken for the Observe Prometheus [1]. The issue has been fixed in the upstream library [2] and the fix was released in version 1.0.5, but the current Ubuntu package is built with 1.0.4. 1: alphagov/prometheus-aws-configuration-beta#440 2: miekg/dns#642
risicle
added a commit
to alphagov/verify-infrastructure
that referenced
this pull request
May 4, 2021
to prevent prometheus from choking in a similar manner to alphagov/prometheus-aws-configuration-beta#440
risicle
added a commit
to alphagov/verify-infrastructure
that referenced
this pull request
May 4, 2021
to prevent prometheus from choking in a similar manner to alphagov/prometheus-aws-configuration-beta#440
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Prometheus stopped working for us, with panics that look like this:
This looked like it was barfing on the
options
line in/etc/resolv.conf, on a string of length 8.
In June, a change was made to systemd-resolved to change the options
line from
options edns0
tooptions edns0 trust-ad
. It looks likethis change is causing the panic in the miekd/dns library.
This change removes
trust-ad
from theoptions
line because a) wedon't care about DNSSEC, and b) we think it's breaking things.
Note that systemd-resolved automatically determines whether it should
manage /etc/resolv.conf or not based on whether it is a symlink and
whether it includes 127.0.0.53 as a nameserver. So we think that
replacing the symlink will Do The Right Thing. We tested by manually
changing /etc/resolv.conf on a machine and rebooting it to see if it
still worked, and it did.
See https://jlk.fjfi.cvut.cz/arch/manpages/man/systemd-resolved.8#/ETC/RESOLV.CONF
Co-authored-by: chrisfarms chris.farmiloe@digital.cabinet-office.gov.uk
Co-authored-by: Robert Scott robert.scott@digital.cabinet-office.gov.uk