Merge lp:~andreserl/maas/fix_lp1413388_1.7 into lp:~maas-maintainers/maas/packaging.utopic

Proposed by Andres Rodriguez on 2015-07-07
Status: Merged
Approved by: Andres Rodriguez on 2015-07-09
Approved revision: 368
Merged at revision: 365
Proposed branch: lp:~andreserl/maas/fix_lp1413388_1.7
Merge into: lp:~maas-maintainers/maas/packaging.utopic
Diff against target: 81 lines (+29/-10)
3 files modified
debian/changelog (+11/-1)
debian/maas-dns.postinst (+7/-9)
debian/maas-region-controller.postinst (+11/-0)
To merge this branch: bzr merge lp:~andreserl/maas/fix_lp1413388_1.7
Reviewer Review Type Date Requested Status
Mike Pontillo (community) 2015-07-07 Approve on 2015-07-07
Review via email: mp+263991@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.7 updated on 2015-07-07
367. By Andres Rodriguez on 2015-07-07

Address Mike's comments

Mike Pontillo (mpontillo) wrote :

Looks good. Just one unused variable below.

review: Approve
lp:~andreserl/maas/fix_lp1413388_1.7 updated on 2015-07-08
368. By Andres Rodriguez on 2015-07-08

* New upstream release 1.7.6 bzr3375:
  - Accept list of forwarders for upstream_dns rather than just
    one. (LP: #1470585)
  - Fix upgrade issue where it would remove custom DNS config,
    potentially breaking DNS. (LP: #1413388)

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-04 02:22:25 +0000
3+++ debian/changelog 2015-07-08 01:12:03 +0000
4@@ -1,9 +1,19 @@
5-maas (1.7.6+bzr3369-0ubuntu1) UNRELEASED; urgency=medium
6+maas (1.7.6+bzr3375-0ubuntu1) trusty; urgency=medium
7+
8+ * New upstream release 1.7.6 bzr3375:
9+ - Accept list of forwarders for upstream_dns rather than just
10+ one. (LP: #1470585)
11+ - Fix upgrade issue where it would remove custom DNS config,
12+ potentially breaking DNS. (LP: #1413388)
13
14 [ Raphaƫl Badin ]
15 * Drop dependency on python-iscpy: the code has been integrated into
16 MAAS. (LP: #1413388).
17
18+ [ Andres Rodriguez ]
19+ * Refactor maas-dns upgrade code so it doesn't break local DNS config
20+ and it gets migrated (LP: #1413388)
21+
22 -- Andres Rodriguez <andreserl@ubuntu.com> Fri, 03 Jul 2015 00:11:50 -0400
23
24 maas (1.7.5+bzr3369-0ubuntu1) vivid; urgency=medium
25
26=== modified file 'debian/maas-dns.postinst'
27--- debian/maas-dns.postinst 2014-03-28 15:44:39 +0000
28+++ debian/maas-dns.postinst 2015-07-08 01:12:03 +0000
29@@ -31,16 +31,14 @@
30 # /etc/named/maas/named.conf.options.inside.maas file.
31 maas-region-admin edit_named_options --config-path /etc/bind/named.conf.options
32
33- invoke-rc.d bind9 restart || true
34+elif [ "$1" = "configure" ]; then
35+ # If the /etc/bind/named.conf.options is not set up yet, do it now.
36+ # This might happen because of an upgrade from an older package.
37+ if ! grep -qs "named.conf.options.inside.maas" /etc/bind/named.conf.options; then
38+ maas-region-admin edit_named_options --config-path /etc/bind/named.conf.options
39+ fi
40 fi
41
42-if [ "$1" = "configure" ]; then
43- # If the /etc/bind/named.conf.options is not set up yet, do it now.
44- # This might happen because of an upgrade from an older package.
45- if ! grep -qs "named.conf.options.inside.maas" /etc/bind/named.conf.options; then
46- maas-region-admin edit_named_options --config-path /etc/bind/named.conf.options
47- invoke-rc.d bind9 restart || true
48- fi
49-fi
50+invoke-rc.d bind9 restart || true
51
52 #DEBHELPER#
53
54=== modified file 'debian/maas-region-controller.postinst'
55--- debian/maas-region-controller.postinst 2014-10-10 12:27:35 +0000
56+++ debian/maas-region-controller.postinst 2015-07-08 01:12:03 +0000
57@@ -102,6 +102,16 @@
58 ln -sf /var/log/apache2 /var/log/maas/
59 }
60
61+configure_migrate_maas_dns() {
62+ # This only runs on upgrade. We only run this if the
63+ # there are forwarders to migrate or no
64+ # named.conf.options.inside.maas are present.
65+ maas-region-admin edit_named_options \
66+ --migrate-conflicting-options --config-path \
67+ /etc/bind/named.conf.options || true
68+ invoke-rc.d bind9 restart || true
69+}
70+
71 if [ "$1" = "configure" ] && [ -z "$2" ]; then
72 #########################################################
73 ################ Folder Permissions ####################
74@@ -204,6 +214,7 @@
75
76 maas_sync_migrate_db
77
78+ configure_migrate_maas_dns
79 fi
80
81 invoke-rc.d apache2 restart || true

Subscribers

People subscribed via source and target branches

to all changes: