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

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

Address Mike's comments

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

Looks good. Just one unused variable below.

review: Approve
lp:~andreserl/maas/fix_lp1413388_1.7 updated
368. By Andres Rodriguez

* 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
=== modified file 'debian/changelog'
--- debian/changelog 2015-07-04 02:22:25 +0000
+++ debian/changelog 2015-07-08 01:12:03 +0000
@@ -1,9 +1,19 @@
1maas (1.7.6+bzr3369-0ubuntu1) UNRELEASED; urgency=medium1maas (1.7.6+bzr3375-0ubuntu1) trusty; urgency=medium
2
3 * New upstream release 1.7.6 bzr3375:
4 - Accept list of forwarders for upstream_dns rather than just
5 one. (LP: #1470585)
6 - Fix upgrade issue where it would remove custom DNS config,
7 potentially breaking DNS. (LP: #1413388)
28
3 [ Raphaël Badin ]9 [ Raphaël Badin ]
4 * Drop dependency on python-iscpy: the code has been integrated into10 * Drop dependency on python-iscpy: the code has been integrated into
5 MAAS. (LP: #1413388).11 MAAS. (LP: #1413388).
612
13 [ Andres Rodriguez ]
14 * Refactor maas-dns upgrade code so it doesn't break local DNS config
15 and it gets migrated (LP: #1413388)
16
7 -- Andres Rodriguez <andreserl@ubuntu.com> Fri, 03 Jul 2015 00:11:50 -040017 -- Andres Rodriguez <andreserl@ubuntu.com> Fri, 03 Jul 2015 00:11:50 -0400
818
9maas (1.7.5+bzr3369-0ubuntu1) vivid; urgency=medium19maas (1.7.5+bzr3369-0ubuntu1) vivid; urgency=medium
1020
=== modified file 'debian/maas-dns.postinst'
--- debian/maas-dns.postinst 2014-03-28 15:44:39 +0000
+++ debian/maas-dns.postinst 2015-07-08 01:12:03 +0000
@@ -31,16 +31,14 @@
31 # /etc/named/maas/named.conf.options.inside.maas file.31 # /etc/named/maas/named.conf.options.inside.maas file.
32 maas-region-admin edit_named_options --config-path /etc/bind/named.conf.options32 maas-region-admin edit_named_options --config-path /etc/bind/named.conf.options
3333
34 invoke-rc.d bind9 restart || true34elif [ "$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
35fi40fi
3641
37if [ "$1" = "configure" ]; then42invoke-rc.d bind9 restart || true
38 # If the /etc/bind/named.conf.options is not set up yet, do it now.
39 # This might happen because of an upgrade from an older package.
40 if ! grep -qs "named.conf.options.inside.maas" /etc/bind/named.conf.options; then
41 maas-region-admin edit_named_options --config-path /etc/bind/named.conf.options
42 invoke-rc.d bind9 restart || true
43 fi
44fi
4543
46#DEBHELPER#44#DEBHELPER#
4745
=== modified file 'debian/maas-region-controller.postinst'
--- debian/maas-region-controller.postinst 2014-10-10 12:27:35 +0000
+++ debian/maas-region-controller.postinst 2015-07-08 01:12:03 +0000
@@ -102,6 +102,16 @@
102 ln -sf /var/log/apache2 /var/log/maas/102 ln -sf /var/log/apache2 /var/log/maas/
103}103}
104104
105configure_migrate_maas_dns() {
106 # This only runs on upgrade. We only run this if the
107 # there are forwarders to migrate or no
108 # named.conf.options.inside.maas are present.
109 maas-region-admin edit_named_options \
110 --migrate-conflicting-options --config-path \
111 /etc/bind/named.conf.options || true
112 invoke-rc.d bind9 restart || true
113}
114
105if [ "$1" = "configure" ] && [ -z "$2" ]; then115if [ "$1" = "configure" ] && [ -z "$2" ]; then
106 #########################################################116 #########################################################
107 ################ Folder Permissions ####################117 ################ Folder Permissions ####################
@@ -204,6 +214,7 @@
204214
205 maas_sync_migrate_db215 maas_sync_migrate_db
206216
217 configure_migrate_maas_dns
207fi218fi
208219
209invoke-rc.d apache2 restart || true220invoke-rc.d apache2 restart || true

Subscribers

People subscribed via source and target branches

to all changes: