MAAS adds custom named.conf.options entry at install, but doesn't remove it at uninstall, breaks bind9
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Triaged
|
Medium
|
Christian Grabowski | ||
3.4 |
Triaged
|
Undecided
|
Unassigned | ||
3.5 |
Triaged
|
Undecided
|
Unassigned |
Bug Description
When installing maas-rack-
This allows bind to provide name resolution to the nodes managed by the MAAS rack controller.
When removing maas, it does not remove that line from the file, which breaks the ability to start or restart bind9.
This has the side effect of also breaking virsh and LXD that may be installed on the same host, using virbr0.
Here's a working example of this issue:
```
$ sudo grep -v ^\/ /etc/bind/
options { directory "/var/cache/bind";
listen-on-v6 { none; };
listen-on { !192.168.120.0/22; };
include "/etc/bind/
```
Can't start or restart bind9
```
$ sudo systemctl restart bind9
Job for named.service failed because the control process exited with error code.
See "systemctl status named.service" and "journalctl -xeu named.service" for details.
```
Create the directory and touch the empty file
```
$ sudo mkdir -p /etc/bind/maas/; sudo touch /etc/bind/
```
Works!
```
$ sudo systemctl restart bind9; echo $?
0
```
I knocked together a quick proof-of-concept that adds the option `--remove` to `provisioningse
/usr/lib/
This now looks like:
/usr/lib/
```
# cat /tmp/foo
options { };
```
```
# /usr/lib/
# cat /tmp/foo
//
// This file is managed by MAAS. Although MAAS attempts to preserve changes
// made here, it is possible to create conflicts that MAAS can not resolve.
//
// DNS settings available in MAAS (for example, forwarders and
// dnssec-validation) should be managed only in MAAS.
//
// The previous configuration file was backed up at:
// /tmp/foo.
//
options { include "/tmp/maas/
```
```
# /usr/lib/
# cat /tmp/foo
//
// This file is managed by MAAS. Although MAAS attempts to preserve changes
// made here, it is possible to create conflicts that MAAS can not resolve.
//
// DNS settings available in MAAS (for example, forwarders and
// dnssec-validation) should be managed only in MAAS.
//
// The previous configuration file was backed up at:
// /tmp/foo.
//
options { };
```
The diff of `edit_named_
This is only a quick-and-dirty (working) example, it may need rework. It should probably be part of maas-dns, and added to its own postrm script so it cleanly remove the line it added when maas is removed.
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → Medium |
assignee: | nobody → Christian Grabowski (cgrabowski) |
milestone: | none → 3.6.0 |
Changed in maas: | |
milestone: | 3.6.0 → 3.6.x |