Merge lp:~jtv/maas/pkg-bug-1089819 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: 158
Proposed branch: lp:~jtv/maas/pkg-bug-1089819
Merge into: lp:~maas-maintainers/maas/packaging
Diff against target: 29 lines (+8/-1)
2 files modified
debian/maas-cluster-controller.maas-cluster-celery.upstart (+5/-1)
debian/maas-cluster-controller.maas-pserv.upstart (+3/-0)
To merge this branch: bzr merge lp:~jtv/maas/pkg-bug-1089819
Reviewer Review Type Date Requested Status
Raphaël Badin (community) Approve
Review via email: mp+139647@code.launchpad.net

Commit message

Export CLUSTER_UUID from the cluster controller's upstart jobs to their respective daemon child processes.

Description of the change

The upstart jobs for pserv (the tftpd) and celery (start-cluster-controller) now source maas_cluster.conf, but they also need to export CLUSTER_UUID to get it included in the environments of the respective child processes they fork off.

Raphaël and I discussed the option of sticking the uuid on the command line as an option, but decided we didn't want to expose it to untrusted users on the same system.

Jeroen

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/maas-cluster-controller.maas-cluster-celery.upstart'
2--- debian/maas-cluster-controller.maas-cluster-celery.upstart 2012-10-03 03:43:27 +0000
3+++ debian/maas-cluster-controller.maas-cluster-celery.upstart 2012-12-13 10:10:45 +0000
4@@ -21,6 +21,10 @@
5 end script
6
7 script
8- . $CONFIG_FILE # sets MAAS_URL
9+ # Prepare settings.
10+ . $CONFIG_FILE
11+ # Allow the cluster-controller process to read CLUSTER_UUID as set
12+ # in that config file.
13+ export CLUSTER_UUID
14 exec /usr/sbin/maas-provision start-cluster-controller $MAAS_URL -u maas -g maas
15 end script
16
17=== modified file 'debian/maas-cluster-controller.maas-pserv.upstart'
18--- debian/maas-cluster-controller.maas-pserv.upstart 2012-12-11 09:03:17 +0000
19+++ debian/maas-cluster-controller.maas-pserv.upstart 2012-12-13 10:10:45 +0000
20@@ -23,6 +23,9 @@
21 script
22 # Prepare settings.
23 . $CONFIG_FILE
24+ # Allow the tftpd process to read CLUSTER_UUID as set in that config
25+ # file.
26+ export CLUSTER_UUID
27 # To add options to your daemon, edit the line below:
28 exec /usr/bin/twistd -n --uid=maas --gid=maas --pidfile=/run/maas-pserv.pid --logfile=/dev/null maas-pserv --config-file=/etc/maas/pserv.yaml
29 end script

Subscribers

People subscribed via source and target branches