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

Proposed by Andres Rodriguez
Status: Merged
Approved by: Andres Rodriguez
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) Approve
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
411. By Andres Rodriguez

Address Mike's comments

Revision history for this message
Mike Pontillo (mpontillo) wrote :

LGTM!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2015-07-01 08:07:14 +0000
+++ debian/changelog 2015-07-07 21:45:27 +0000
@@ -1,12 +1,20 @@
1maas (1.8.0+bzr4001-0ubuntu1) trusty; urgency=medium1maas (1.8.0+bzr4016-0ubuntu1) UNRELEASED; urgency=medium
2
3 * New upstream release, 1.8.0.
42
5 [ Raphaël Badin ]3 [ Raphaël Badin ]
6 * Enable proxy_wstunnel module.4 * Enable proxy_wstunnel module.
7 * Drop dependency on python-iscpy: the code has been integrated into5 * Drop dependency on python-iscpy: the code has been integrated into
8 MAAS. (LP: #1413388).6 MAAS. (LP: #1413388).
97
8 [ Andres Rodriguez ]
9 * Refactor maas-dns upgrade code so it doesn't break local DNS config
10 and it gets migrated (LP: #1413388)*
11
12 -- Andres Rodriguez <andreserl@ubuntu.com> Mon, 06 Jul 2015 23:52:59 -0400
13
14maas (1.8.0+bzr4001-0ubuntu1) trusty; urgency=medium
15
16 * New upstream release, 1.8.0.
17
10 -- Andres Rodriguez <andreserl@ubuntu.com> Tue, 09 Jun 2015 20:57:42 -040018 -- Andres Rodriguez <andreserl@ubuntu.com> Tue, 09 Jun 2015 20:57:42 -0400
1119
12maas (1.8.0~rc3+bzr4000-0ubuntu1) trusty; urgency=medium20maas (1.8.0~rc3+bzr4000-0ubuntu1) trusty; urgency=medium
1321
=== modified file 'debian/maas-dns.postinst'
--- debian/maas-dns.postinst 2015-04-29 07:57:12 +0000
+++ debian/maas-dns.postinst 2015-07-07 21:45:27 +0000
@@ -52,25 +52,8 @@
52 # Fix permissions52 # Fix permissions
53 fix_dns_permissions53 fix_dns_permissions
5454
55 # If the /etc/bind/named.conf.options is not set up yet, do it now.55 # ensure that DNS config is included
56 # This might happen because of an upgrade from an older package.56 edit_named_options
57 should_edit_named_options=0
58
59 # If the MAAS include statement doesn't exist in named.conf.local, we need to add it.
60 grep -qs '^include\s.*maas' /etc/bind/named.conf.local || should_edit_named_options=1
61
62 # If the 'forwarders' option exists in named.conf.options, it needs to be removed.
63 grep -qs "forwarders" /etc/bind/named.conf.options && should_edit_named_options=1
64
65 # If the 'dnssec-validation' option exists in named.conf.options, it needs to be removed.
66 grep -qs "dnssec-validation" /etc/bind/named.conf.options && should_edit_named_options=1
67
68 # If the include file for the custom MAAS named.conf.options doesn't exist, it needs to be added.
69 grep -qs "named.conf.options.inside.maas" /etc/bind/named.conf.options || should_edit_named_options=1
70
71 if [ $should_edit_named_options -eq 1 ]; then
72 edit_named_options
73 fi
74fi57fi
7558
76invoke-rc.d bind9 restart || true59invoke-rc.d bind9 restart || true
7760
=== modified file 'debian/maas-region-controller.postinst'
--- debian/maas-region-controller.postinst 2015-04-08 22:14:39 +0000
+++ debian/maas-region-controller.postinst 2015-07-07 21:45:27 +0000
@@ -49,6 +49,15 @@
49 echo $ipaddr49 echo $ipaddr
50}50}
5151
52configure_migrate_maas_dns() {
53 # This only runs on upgrade. We only run this if the
54 # there are forwarders to migrate or no
55 # named.conf.options.inside.maas are present.
56 maas-region-admin edit_named_options \
57 --migrate-conflicting-options --config-path \
58 /etc/bind/named.conf.options
59 invoke-rc.d bind9 restart || true
60}
5261
53if [ "$1" = "configure" ] && [ -z "$2" ]; then62if [ "$1" = "configure" ] && [ -z "$2" ]; then
54 #########################################################63 #########################################################
@@ -133,6 +142,7 @@
133142
134 maas_sync_migrate_db143 maas_sync_migrate_db
135144
145 configure_migrate_maas_dns
136fi146fi
137147
138invoke-rc.d maas-regiond restart || true148invoke-rc.d maas-regiond restart || true

Subscribers

People subscribed via source and target branches