← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jtv/maas/pkg-1055523-cluster-uuid into lp:~maas-maintainers/maas/packaging

 

Jeroen T. Vermeulen has proposed merging lp:~jtv/maas/pkg-1055523-cluster-uuid into lp:~maas-maintainers/maas/packaging.

Commit message:
Set CLUSTER_UUID in the local celery config during cluster postinst.

Requested reviews:
  MAAS Maintainers (maas-maintainers)
Related bugs:
  Bug #1055523 in MAAS: "Cluster controllers don't have their own amqp queues yet"
  https://bugs.launchpad.net/maas/+bug/1055523

For more details, see:
https://code.launchpad.net/~jtv/maas/pkg-1055523-cluster-uuid/+merge/126649

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
-- 
https://code.launchpad.net/~jtv/maas/pkg-1055523-cluster-uuid/+merge/126649
Your team MAAS Maintainers is requested to review the proposed merge of lp:~jtv/maas/pkg-1055523-cluster-uuid into lp:~maas-maintainers/maas/packaging.
=== modified file 'debian/maas.postinst'
--- debian/maas.postinst	2012-09-25 23:18:02 +0000
+++ debian/maas.postinst	2012-09-27 09:49:23 +0000
@@ -98,6 +98,12 @@
 		sed -i "s|^BROKER_URL\ \= '.*'$|BROKER_URL = '"$broker_url"'|" \
                        /etc/maas/maas_local_celeryconfig.py
 	fi
+
+	if grep -qs "^CLUSTER_UUID\ \= None$" /etc/maas/maas_local_celeryconfig.py; then
+		local uuid="$(uuidgen)"
+		sed -i "s|^CLUSTER_UUID\ \= None$|CLUSTER_UUID = '"$uuid"'|" \
+                       /etc/maas/maas_local_celeryconfig.py
+	fi
 }
 
 configure_maas_database() {