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

Disable DNS on reboot in TPP #240

Open
bloodearnest opened this issue Sep 9, 2024 · 0 comments
Open

Disable DNS on reboot in TPP #240

bloodearnest opened this issue Sep 9, 2024 · 0 comments

Comments

@bloodearnest
Copy link
Member

A reboot will reset the upstream DNS to the default on reboot.

I have not been able to figure out how to make this setting persist reboot. Disabling DNS is off the beaten path, and there's some weird systemd/resolved/cloud-init network configuration stuff going on that I couldn't figure out.

On TPP, running resolvectl dns eth0 "" removes the default upstream DNS resolution, leaving the host with only the static IPs in /etc/hosts, which is what we want.

However, in the DO test backend, and in the local lxd VM, this does not replace the default DNS, just adds to it.

It may be something to do with systemd version, or possibly differences in the user-data or vendor-data passed to cloud-init that the various VMs were provisioned with.

Either way, I can't figure out how to get it to survive reboot. I suspect the answer lies in modifying the cloud-init user-data, perhaps. But I've run out of time, and need to park this.

bloodearnest added a commit that referenced this issue Sep 9, 2024
Couldn't figure out how to make cloud-init reliably stop managing
/etc/hosts, so instead modify the cloud-init template and let it do it.
The install script tests this has worked, or exits

Tried to figure out how to reliably disable the default upstream DNS.
`resolvectl dns eth0 ""` works in TPP, but does not work in test backend
or in the local lxd test VMs.  Ran out of time/ideas to figure out why,
so added a per-backend post-install hook to disable it in TPP, more
details in #240

The result of this is that our TPP static DNS config should now not be
wiped by a reboot.  We'll still need to re-run just install to disable
upstread DNS again, however.
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