Fix and workaround DNS issues - #998
Open
jonathan-conder wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds DNS reliability fixes for Workshop’s bridge network and mitigates LXD PID-reuse failures.
Changes:
- Restarts aborted DNS configuration.
- Disables DNSSEC and DNS-over-TLS for
.wprouting.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
snap/local/lib/snap.workshop.configure-dns.service |
Adds restart behavior for aborted configuration. |
internal/dns/resolved.go |
Configures per-link DNS security policies. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
My original rationale for using the configure hook was that post-refresh doesn't support revert. Now Workshop doesn't support revert anyway, so we might as well use the install and post-refresh hooks. This means we can more easily distinguish whether files need to be installed or modified. I've taken a simple approach of always reinstalling things, with the exception of configure-dns which users can choose to disable if they want. This solves the problem of being able to update these files and propagating the change to existing users.
See canonical/lxd#18871. LXD kills old dnsmasq PIDs at around the same time as: 1. starting a new dnsmasq process, and 2. running workshopd configure-dns This makes it quite likely that the workshopd PID is the same as the old dnsmasq PID. LXD kills it regardless of what process it actually is. This caused some flakiness in tests/main/autostart, which restarts the spread VM several times. The LXD team already found and fixed the bug before I ran into it, but the fix hasn't been released yet; retrying configure-dns should fix the flakiness in the meantime (although all bets are off when any process can be killed at boot time).
jonathan-conder
force-pushed
the
fix/configure-dns
branch
from
August 21, 2026 07:18
ee2531c to
df05bce
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.
Suppressed comments (1)
internal/dns/resolved_test.go:59
- This only forces DNSSEC away from the expected final state. DNS-over-TLS normally already defaults to
no, so the assertion below would still pass if the newSetLinkDNSOverTLScall were accidentally removed. Setdnsovertlstoyeshere as well before callingConfigureDNSso both overrides are actually exercised.
out, err := exec.Command("resolvectl", "dnssec", s.iface, "yes").Output()
c.Assert(err, check.IsNil, check.Commentf("%s", out))
Came across this when playing with Workshop on my personal machine. Both options need to be disabled for name resolution to work. The setting is scoped to workshopbr0 so won't affect standard name resolution.
jonathan-conder
force-pushed
the
fix/configure-dns
branch
from
August 21, 2026 07:29
df05bce to
6de21f7
Compare
This file contains hidden or 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
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.
Description
Adds a (possibly temporary) workaround for canonical/lxd#18871. This should make the tests less flaky but the issue could still cause any number of strange problems.
Fixes
*.wpname resolution for users who require DNSSEC or DNS-over-TLS for general name resolution.Self-review quick check
Docs
Procedure:
Content:
tutorial/andhow-to/sections).docs/.coverage.yamlupdated, coverage tags added (.. artefact).Or: