Merge lp:~andreserl/maas/fix_lp1413388_1.8 into lp:~maas-maintainers/maas/packaging-1.8

Proposed by Andres Rodriguez on 2015-07-07
Status: Merged
Approved by: Andres Rodriguez on 2015-07-09
Approved revision: 411
Merged at revision: 410
Proposed branch: lp:~andreserl/maas/fix_lp1413388_1.8
Merge into: lp:~maas-maintainers/maas/packaging-1.8
Diff against target: 87 lines (+23/-22)
3 files modified
debian/changelog (+11/-3)
debian/maas-dns.postinst (+2/-19)
debian/maas-region-controller.postinst (+10/-0)
To merge this branch: bzr merge lp:~andreserl/maas/fix_lp1413388_1.8
Reviewer Review Type Date Requested Status
Mike Pontillo (community) 2015-07-07 Approve on 2015-07-07
Review via email: mp+263992@code.launchpad.net

Commit message

LP: #1413388 Handle upgrades to migrate named.conf.settings

To post a comment you must log in.
lp:~andreserl/maas/fix_lp1413388_1.8 updated on 2015-07-07
411. By Andres Rodriguez on 2015-07-07

Address Mike's comments

Mike Pontillo (mpontillo) wrote :

LGTM!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2015-07-01 08:07:14 +0000
3+++ debian/changelog 2015-07-07 21:45:27 +0000
4@@ -1,12 +1,20 @@
5-maas (1.8.0+bzr4001-0ubuntu1) trusty; urgency=medium
6-
7- * New upstream release, 1.8.0.
8+maas (1.8.0+bzr4016-0ubuntu1) UNRELEASED; urgency=medium
9
10 [ Raphaƫl Badin ]
11 * Enable proxy_wstunnel module.
12 * Drop dependency on python-iscpy: the code has been integrated into
13 MAAS. (LP: #1413388).
14
15+ [ Andres Rodriguez ]
16+ * Refactor maas-dns upgrade code so it doesn't break local DNS config
17+ and it gets migrated (LP: #1413388)*
18+
19+ -- Andres Rodriguez <andreserl@ubuntu.com> Mon, 06 Jul 2015 23:52:59 -0400
20+
21+maas (1.8.0+bzr4001-0ubuntu1) trusty; urgency=medium
22+
23+ * New upstream release, 1.8.0.
24+
25 -- Andres Rodriguez <andreserl@ubuntu.com> Tue, 09 Jun 2015 20:57:42 -0400
26
27 maas (1.8.0~rc3+bzr4000-0ubuntu1) trusty; urgency=medium
28
29=== modified file 'debian/maas-dns.postinst'
30--- debian/maas-dns.postinst 2015-04-29 07:57:12 +0000
31+++ debian/maas-dns.postinst 2015-07-07 21:45:27 +0000
32@@ -52,25 +52,8 @@
33 # Fix permissions
34 fix_dns_permissions
35
36- # If the /etc/bind/named.conf.options is not set up yet, do it now.
37- # This might happen because of an upgrade from an older package.
38- should_edit_named_options=0
39-
40- # If the MAAS include statement doesn't exist in named.conf.local, we need to add it.
41- grep -qs '^include\s.*maas' /etc/bind/named.conf.local || should_edit_named_options=1
42-
43- # If the 'forwarders' option exists in named.conf.options, it needs to be removed.
44- grep -qs "forwarders" /etc/bind/named.conf.options && should_edit_named_options=1
45-
46- # If the 'dnssec-validation' option exists in named.conf.options, it needs to be removed.
47- grep -qs "dnssec-validation" /etc/bind/named.conf.options && should_edit_named_options=1
48-
49- # If the include file for the custom MAAS named.conf.options doesn't exist, it needs to be added.
50- grep -qs "named.conf.options.inside.maas" /etc/bind/named.conf.options || should_edit_named_options=1
51-
52- if [ $should_edit_named_options -eq 1 ]; then
53- edit_named_options
54- fi
55+ # ensure that DNS config is included
56+ edit_named_options
57 fi
58
59 invoke-rc.d bind9 restart || true
60
61=== modified file 'debian/maas-region-controller.postinst'
62--- debian/maas-region-controller.postinst 2015-04-08 22:14:39 +0000
63+++ debian/maas-region-controller.postinst 2015-07-07 21:45:27 +0000
64@@ -49,6 +49,15 @@
65 echo $ipaddr
66 }
67
68+configure_migrate_maas_dns() {
69+ # This only runs on upgrade. We only run this if the
70+ # there are forwarders to migrate or no
71+ # named.conf.options.inside.maas are present.
72+ maas-region-admin edit_named_options \
73+ --migrate-conflicting-options --config-path \
74+ /etc/bind/named.conf.options
75+ invoke-rc.d bind9 restart || true
76+}
77
78 if [ "$1" = "configure" ] && [ -z "$2" ]; then
79 #########################################################
80@@ -133,6 +142,7 @@
81
82 maas_sync_migrate_db
83
84+ configure_migrate_maas_dns
85 fi
86
87 invoke-rc.d maas-regiond restart || true

Subscribers

People subscribed via source and target branches