Merge lp:~jtv/maas/pkg-1055523-cluster-uuid 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: 98
Proposed branch: lp:~jtv/maas/pkg-1055523-cluster-uuid
Merge into: lp:~maas-maintainers/maas/packaging
Diff against target: 16 lines (+6/-0)
1 file modified
debian/maas.postinst (+6/-0)
To merge this branch: bzr merge lp:~jtv/maas/pkg-1055523-cluster-uuid
Reviewer Review Type Date Requested Status
Raphaël Badin (community) Approve
Review via email: mp+126649@code.launchpad.net

Commit message

Set CLUSTER_UUID in the local celery config during cluster postinst.

Description of the change

As discussed with Julian and Raphael. This needs to accompany my trunk branch for bug 1055523. It will probably conflict with Julian's ongoing re-packaging work.

Jeroen

To post a comment you must log in.
Revision history for this message
Raphaël Badin (rvb) :
review: Approve
Revision history for this message
Julian Edwards (julian-edwards) wrote :

> As discussed with Julian and Raphael. This needs to accompany my trunk
> branch for bug 1055523. It will probably conflict with Julian's ongoing
> re-packaging work.

I've patched my current WIP branch with this change.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/maas.postinst'
2--- debian/maas.postinst 2012-09-25 23:18:02 +0000
3+++ debian/maas.postinst 2012-09-27 09:49:23 +0000
4@@ -98,6 +98,12 @@
5 sed -i "s|^BROKER_URL\ \= '.*'$|BROKER_URL = '"$broker_url"'|" \
6 /etc/maas/maas_local_celeryconfig.py
7 fi
8+
9+ if grep -qs "^CLUSTER_UUID\ \= None$" /etc/maas/maas_local_celeryconfig.py; then
10+ local uuid="$(uuidgen)"
11+ sed -i "s|^CLUSTER_UUID\ \= None$|CLUSTER_UUID = '"$uuid"'|" \
12+ /etc/maas/maas_local_celeryconfig.py
13+ fi
14 }
15
16 configure_maas_database() {

Subscribers

People subscribed via source and target branches