Merge lp:~jtv/maas/pkg-bug-1373261 into lp:~maas-maintainers/maas/packaging

Proposed by Jeroen T. Vermeulen
Status: Merged
Approved by: Jeroen T. Vermeulen
Approved revision: no longer in the source branch.
Merged at revision: 331
Proposed branch: lp:~jtv/maas/pkg-bug-1373261
Merge into: lp:~maas-maintainers/maas/packaging
Diff against target: 50 lines (+8/-9)
2 files modified
debian/changelog (+5/-1)
debian/maas-cluster-controller.postinst (+3/-8)
To merge this branch: bzr merge lp:~jtv/maas/pkg-bug-1373261
Reviewer Review Type Date Requested Status
Gavin Panella (community) Approve
Review via email: mp+241126@code.launchpad.net

Commit message

Use the new ‘maas-provision configure-maas-url’ command to (re)configure MAAS_URL, instead of shell code.

Fixes corruption in pserv.yaml when the URL uses an IPv6 host address.

Description of the change

This requires the accompanying code change: https://code.launchpad.net/~jtv/maas/bug-1373261/+merge/241123

Jeroen

To post a comment you must log in.
Revision history for this message
Gavin Panella (allenap) wrote :

Phew.

review: Approve
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

...And it works in practice too. Now that the trunk branch has landed, I've updated the changelog with the required revision number.

Revision history for this message
MAAS Lander (maas-lander) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

The MP wasn't aware of the changelog update...

Revision history for this message
Julian Edwards (julian-edwards) wrote :

On Monday 10 Nov 2014 13:00:35 you wrote:
> The MP wasn't aware of the changelog update...

You have to reload the MP page and make sure the branch scanner has seen the
latest revision pushed up. Easy to keep getting wrong isn't it :(

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2014-10-20 22:30:43 +0000
+++ debian/changelog 2014-11-10 11:43:29 +0000
@@ -1,9 +1,13 @@
1maas (1.7.0~beta7+bzr3267-0ubuntu2) UNRELEASED; urgency=medium1maas (1.7.0~beta7+bzr3352-0ubuntu1) UNRELEASED; urgency=medium
22
3 [ Michael McCracken ]3 [ Michael McCracken ]
4 * debian/maas-dns.postrm: ensure named.conf is cleaned of maas4 * debian/maas-dns.postrm: ensure named.conf is cleaned of maas
5 includes (LP: #1346538)5 includes (LP: #1346538)
66
7 [ Jeroen Vermeulen ]
8 * debian/maas-cluster-controller.postinst: configure MAAS_URL through new
9 "maas-provision configure-maas-url" sub-command instead of with "sed".
10
7 -- Michael McCracken <mike.mccracken@canonical.com> Mon, 20 Oct 2014 14:48:20 -070011 -- Michael McCracken <mike.mccracken@canonical.com> Mon, 20 Oct 2014 14:48:20 -0700
812
9maas (1.7.0~beta7+bzr3266-0ubuntu1) utopic; urgency=medium13maas (1.7.0~beta7+bzr3266-0ubuntu1) utopic; urgency=medium
1014
=== modified file 'debian/maas-cluster-controller.postinst'
--- debian/maas-cluster-controller.postinst 2014-10-14 06:55:35 +0000
+++ debian/maas-cluster-controller.postinst 2014-11-10 11:43:29 +0000
@@ -108,16 +108,11 @@
108 fi108 fi
109}109}
110110
111configure_pserv_generator(){111configure_maas_url(){
112 # Get the MAAS_URL on configure/reconfigure and write it to the conf files.112 # Get the MAAS_URL on configure/reconfigure and write it to the conf files.
113 db_get maas-cluster-controller/maas-url || true113 db_get maas-cluster-controller/maas-url || true
114 if [ -n "$RET" ]; then114 if [ -n "$RET" ]; then
115 sed -i "s|MAAS_URL=.*|MAAS_URL=\"$RET\"|" /etc/maas/maas_cluster.conf115 maas-provision configure-maas-url "$RET"
116 # Extract the hostname part.
117 HOSTPART=$(echo $RET|awk '{ split($0,array,"/")} END{print array[3] }')
118 # And substitute it in-place in pserv.yaml on an indented, non-commented
119 # line.
120 sed -ri "s|^([[:space:]]+)(#+[[:space:]]*)?(generator:[[:space:]]+https?://)[^:/]+|\1\3$HOSTPART|" /etc/maas/pserv.yaml
121 fi116 fi
122}117}
123118
@@ -142,7 +137,7 @@
142 fi137 fi
143138
144 configure_maas_tgt139 configure_maas_tgt
145 configure_pserv_generator140 configure_maas_url
146 # Only ask for a shared secret when the region is not installed141 # Only ask for a shared secret when the region is not installed
147 # on the same system.142 # on the same system.
148 if [ -n "$DEBCONF_RECONFIGURE" ] && [ ! -f /usr/sbin/maas-region-admin ]; then143 if [ -n "$DEBCONF_RECONFIGURE" ] && [ ! -f /usr/sbin/maas-region-admin ]; then

Subscribers

People subscribed via source and target branches