Merge lp:~julian-edwards/maas/1.2-cluster-pserv-address-bug-1081212 into lp:~maas-maintainers/maas/packaging.quantal

Proposed by Julian Edwards
Status: Merged
Approved by: Julian Edwards
Approved revision: 147
Merged at revision: 146
Proposed branch: lp:~julian-edwards/maas/1.2-cluster-pserv-address-bug-1081212
Merge into: lp:~maas-maintainers/maas/packaging.quantal
Diff against target: 32 lines (+8/-1)
2 files modified
debian/changelog (+2/-0)
debian/maas-cluster-controller.postinst (+6/-1)
To merge this branch: bzr merge lp:~julian-edwards/maas/1.2-cluster-pserv-address-bug-1081212
Reviewer Review Type Date Requested Status
Gavin Panella (community) Approve
Review via email: mp+135575@code.launchpad.net

Commit message

  * debian/maas-cluster-controller.postinst: Ensure that /etc/maas/pserv.yaml
    is updated when reconfiguring. (LP: #1081212)

To post a comment you must log in.
Revision history for this message
Gavin Panella (allenap) wrote :
review: Approve
Revision history for this message
Raphaël Badin (rvb) wrote :

Don't forget to backport this to the precise packaging branch as well.

147. By Julian Edwards

Gavin's review comments

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

On 23/11/12 02:20, Raphaël Badin wrote:
> Don't forget to backport this to the precise packaging branch as well.
>

Done - pushed up to ~maas-maintainers/maas/packaging.precise.sru

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 2012-11-21 01:18:06 +0000
3+++ debian/changelog 2012-11-22 22:51:21 +0000
4@@ -30,6 +30,8 @@
5 * debian/maas-region-controller.install: Remove installation of maas-gc; it
6 is no longer required as upstream no longer stores files in the filesystem.
7 (LP: #1069734)
8+ * debian/maas-cluster-controller.postinst: Ensure that /etc/maas/pserv.yaml
9+ is updated when reconfiguring. (LP: #1081212)
10
11 [ Andres Rodriguez ]
12 * debian/control:
13
14=== modified file 'debian/maas-cluster-controller.postinst'
15--- debian/maas-cluster-controller.postinst 2012-11-20 22:13:28 +0000
16+++ debian/maas-cluster-controller.postinst 2012-11-22 22:51:21 +0000
17@@ -51,10 +51,15 @@
18 create_log_dir
19 fi
20
21- # Get the MAAS_URL on configure/reconfigure and write it to the conf file.
22+ # Get the MAAS_URL on configure/reconfigure and write it to the conf files.
23 db_get maas-cluster-controller/maas-url || true
24 if [ -n "$RET" ]; then
25 sed -i "s|MAAS_URL=.*|MAAS_URL="$RET"|" /etc/maas/maas_cluster.conf
26+ # Extract the hostname part.
27+ HOSTPART=$(echo $RET|awk '{ split($0,array,"/")} END{print array[3] }')
28+ # And substitute it in-place in pserv.conf on an indented, non-commented
29+ # line.
30+ sed -ri "s|^([[:space:]]+generator:[[:space:]]+https?://)[^:/]+|\1$HOSTPART|" /etc/maas/pserv.conf
31 fi
32 fi
33

Subscribers

People subscribed via source and target branches

to all changes: