Merge lp:~allenap/maas/1.2-dev-services-shutdown into lp:maas/1.2

Proposed by Gavin Panella
Status: Merged
Approved by: Gavin Panella
Approved revision: 1344
Merged at revision: 1344
Proposed branch: lp:~allenap/maas/1.2-dev-services-shutdown
Merge into: lp:maas/1.2
Diff against target: 30 lines (+5/-4)
2 files modified
services/cluster-worker/run (+1/-1)
services/region-worker/run (+4/-3)
To merge this branch: bzr merge lp:~allenap/maas/1.2-dev-services-shutdown
Reviewer Review Type Date Requested Status
Gavin Panella (community) Approve
Review via email: mp+141749@code.launchpad.net

Commit message

Backport r1419 from trunk: Use pgrphack to ensure that the celeryd development services shut down correctly.

Previously the region-worker service would leave processes behind, and the cluster-worker service would hang if not started via fghack.

To post a comment you must log in.
Revision history for this message
Gavin Panella (allenap) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'services/cluster-worker/run'
2--- services/cluster-worker/run 2012-12-12 15:41:29 +0000
3+++ services/cluster-worker/run 2013-01-03 13:27:26 +0000
4@@ -22,5 +22,5 @@
5 export CLUSTER_UUID="adfd3977-f251-4f2c-8d61-745dbd690bfc"
6
7 script="$(readlink -f bin/maas-provision)"
8-exec fghack "${script}" start-cluster-controller \
9+exec pgrphack "${script}" start-cluster-controller \
10 http://0.0.0.0:5240/ -u "$(id -un)" -g "$(id -gn)"
11
12=== modified file 'services/region-worker/run'
13--- services/region-worker/run 2012-10-05 12:08:51 +0000
14+++ services/region-worker/run 2013-01-03 13:27:26 +0000
15@@ -14,11 +14,12 @@
16 # because there are race issues when restarting.
17 [ -z "${logdir:-}" ] || exec &>> "${logdir}/current"
18
19-# XXX JeroenVermeulen 2012-08-23, bug=1040529: Use fghack to kludge around
20-# hanging celery shutdown.
21 export PYTHONPATH=etc/:src/
22 script="$(readlink -f bin/celeryd)"
23-exec fghack "${script}" \
24+# XXX GavinPanella 2013-01-02, bug=1040529: celeryd does not shutdown
25+# correctly when signalled: processes are often left behind. However,
26+# pgrphack works around this, ensuring a complete shutdown.
27+exec pgrphack "${script}" \
28 --loglevel INFO --beat --queues celery,master \
29 --schedule=run/celerybeat-region-schedule \
30 --config=democeleryconfig

Subscribers

People subscribed via source and target branches

to status/vote changes: