Merge lp:~rvb/maas/bug-1066938-rndc2 into lp:~maas-committers/maas/trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Raphaël Badin | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 1278 | ||||
Proposed branch: | lp:~rvb/maas/bug-1066938-rndc2 | ||||
Merge into: | lp:~maas-committers/maas/trunk | ||||
Diff against target: |
100 lines (+34/-2) 4 files modified
etc/celeryconfig_common.py (+3/-0) etc/democeleryconfig_common.py (+5/-0) src/provisioningserver/dns/config.py (+15/-2) src/provisioningserver/dns/tests/test_config.py (+11/-0) |
||||
To merge this branch: | bzr merge lp:~rvb/maas/bug-1066938-rndc2 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gavin Panella (community) | Approve | ||
Review via email: mp+129841@code.launchpad.net |
Commit message
This branch adds the inclusion of the default 'controls' statement so that the init scripts can control the bind server using the default RNDC key from localhost.
= Notes =
It turns out that if not controls statement is provided, "inet 127.0.0.1 port 953 allow { localhost; };" is included silently and this is used by the init scripts to control the bind server. Since MAAS adds a 'controls' statement to control the bind server, we also need to explicitly include the default 'controls' statement.
I've created a package locally and tested this fix:
Without the default 'controls' statement:
$ sudo /etc/init.d/bind9 restart
* Stopping domain name service... bind9 rndc: connect failed: 127.0.0.1#953: connection refused
waiting for pid 14057 to die [ OK ]
* Starting domain name service... bind9 [ OK ]
With the default 'controls' statement:
sudo /etc/init.d/bind9 restart
* Stopping domain name service... bind9 waiting for pid 13819 to die [ OK ]
* Starting domain name service... bind9 [ OK ]
Description of the change
Include the default 'controls' statement so that the init scripts can control the bind server using the default RNDC key from localhost.
Looks good.
[1]
> * Stopping domain name service... bind9 rndc: connect failed:
> 127.0.0.1#953: connection refused waiting for pid 14057 to die
> [ OK ]
Do you know why it prints OK when it has failed?
[2]
+# Include the default RNDC controls (default RNDC key on port 953). CONTROLS = True
+DNS_DEFAULT_
Why is this in a Celery config file?
[3]
+DEFAULT_CONTROLS = """
+controls {
+ inet 127.0.0.1 port 953 allow { localhost; };
+};
+"""
Include a comment here, about what placed it, and why? Also, remove
leading new-line?