launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #14676
[Merge] lp:~julian-edwards/maas/backport-r1280 into lp:maas/1.2
Julian Edwards has proposed merging lp:~julian-edwards/maas/backport-r1280 into lp:maas/1.2.
Commit message:
Don't start the BIND config include snippet from `maas get_named_conf` with a newline. (backport r1280 from trunk)
Requested reviews:
MAAS Maintainers (maas-maintainers)
Related bugs:
Bug #1066929 in MAAS: "duplicate entry added to named.conf.local on each package reconfigure"
https://bugs.launchpad.net/maas/+bug/1066929
For more details, see:
https://code.launchpad.net/~julian-edwards/maas/backport-r1280/+merge/137481
--
https://code.launchpad.net/~julian-edwards/maas/backport-r1280/+merge/137481
Your team MAAS Maintainers is requested to review the proposed merge of lp:~julian-edwards/maas/backport-r1280 into lp:maas/1.2.
=== modified file 'src/maasserver/management/commands/get_named_conf.py'
--- src/maasserver/management/commands/get_named_conf.py 2012-07-16 13:22:56 +0000
+++ src/maasserver/management/commands/get_named_conf.py 2012-12-03 05:59:26 +0000
@@ -23,8 +23,8 @@
from provisioningserver.dns.config import DNSConfig
-INCLUDE_SNIPPET_COMMENT = """
-# Append the following content to your local BIND configuration
+INCLUDE_SNIPPET_COMMENT = """\
+# Append the following content to your local BIND configuration
# file (usually /etc/bind/named.conf.local) in order to allow
# MAAS to manage its DNS zones.
"""
=== modified file 'src/provisioningserver/dns/config.py'
--- src/provisioningserver/dns/config.py 2012-10-17 05:21:12 +0000
+++ src/provisioningserver/dns/config.py 2012-12-03 05:59:26 +0000
@@ -234,7 +234,8 @@
}
def get_include_snippet(self):
- return '\ninclude "%s";\n' % self.target_path
+ assert '"' not in self.target_path, self.target_path
+ return 'include "%s";\n' % self.target_path
def shortened_reversed_ip(ip, byte_num):
=== modified file 'src/provisioningserver/dns/tests/test_config.py'
--- src/provisioningserver/dns/tests/test_config.py 2012-10-17 05:21:12 +0000
+++ src/provisioningserver/dns/tests/test_config.py 2012-12-03 05:59:26 +0000
@@ -221,7 +221,7 @@
self.assertThat(
snippet,
MatchesAll(
- StartsWith('\n'),
+ Not(StartsWith('\n')),
EndsWith('\n'),
Contains(target_dir),
Contains('include "%s"' % dnsconfig.target_path)))