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: 332
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
1=== modified file 'debian/changelog'
2--- debian/changelog 2014-10-20 22:30:43 +0000
3+++ debian/changelog 2014-11-10 11:43:29 +0000
4@@ -1,9 +1,13 @@
5-maas (1.7.0~beta7+bzr3267-0ubuntu2) UNRELEASED; urgency=medium
6+maas (1.7.0~beta7+bzr3352-0ubuntu1) UNRELEASED; urgency=medium
7
8 [ Michael McCracken ]
9 * debian/maas-dns.postrm: ensure named.conf is cleaned of maas
10 includes (LP: #1346538)
11
12+ [ Jeroen Vermeulen ]
13+ * debian/maas-cluster-controller.postinst: configure MAAS_URL through new
14+ "maas-provision configure-maas-url" sub-command instead of with "sed".
15+
16 -- Michael McCracken <mike.mccracken@canonical.com> Mon, 20 Oct 2014 14:48:20 -0700
17
18 maas (1.7.0~beta7+bzr3266-0ubuntu1) utopic; urgency=medium
19
20=== modified file 'debian/maas-cluster-controller.postinst'
21--- debian/maas-cluster-controller.postinst 2014-10-14 06:55:35 +0000
22+++ debian/maas-cluster-controller.postinst 2014-11-10 11:43:29 +0000
23@@ -108,16 +108,11 @@
24 fi
25 }
26
27-configure_pserv_generator(){
28+configure_maas_url(){
29 # Get the MAAS_URL on configure/reconfigure and write it to the conf files.
30 db_get maas-cluster-controller/maas-url || true
31 if [ -n "$RET" ]; then
32- sed -i "s|MAAS_URL=.*|MAAS_URL=\"$RET\"|" /etc/maas/maas_cluster.conf
33- # Extract the hostname part.
34- HOSTPART=$(echo $RET|awk '{ split($0,array,"/")} END{print array[3] }')
35- # And substitute it in-place in pserv.yaml on an indented, non-commented
36- # line.
37- sed -ri "s|^([[:space:]]+)(#+[[:space:]]*)?(generator:[[:space:]]+https?://)[^:/]+|\1\3$HOSTPART|" /etc/maas/pserv.yaml
38+ maas-provision configure-maas-url "$RET"
39 fi
40 }
41
42@@ -142,7 +137,7 @@
43 fi
44
45 configure_maas_tgt
46- configure_pserv_generator
47+ configure_maas_url
48 # Only ask for a shared secret when the region is not installed
49 # on the same system.
50 if [ -n "$DEBCONF_RECONFIGURE" ] && [ ! -f /usr/sbin/maas-region-admin ]; then

Subscribers

People subscribed via source and target branches