New question, since everything else on this matter appears to be outdated and/or conflicting. Hold your close votes, please :)
On stock installs of Ubuntu 12 and 14 Server, the going advice seems to be that the way you make DNS changes is to edit the interfaces file and add the dns- options there. Only problem is, on servers, where uptime is a concern, it appears the only way to force those changes to be be applied is to bounce the affected network interface with
I've got a large number of servers to make a set of DNS changes on, and I need to update their resolver configurations, en masse, without toggling the network interfaces in this fashion. I also need to make sure the changes stick after a reboot.
The problem is that all of these servers were built with the dns- options in the
interfaces file, meaning that if I change
tail files, I'll end up with a bunch of duplicate lines on reboot.
The process needs to be something like:
- Completely eliminate the resolver configuration (it's all over the place right now)
- Set the options to new, known-good values
- Save those options so they are used by applications immediately, and so they'll be in place after a reboot.
So, a recap:
What won't work
- Editing the lines in
interfaces(requires an outage to recycle the interface)
- Editing resolv.conf directly (won't take effect, won't be saved)
- Editing the resolvconf
tailfiles (won't take effect, will have duplicate lines on reboot)
The actual question
Is there a way to effect a change like this, without interrupting service? Ideally, I could force resolvconf to go through its update process without toggling the interface.