← Back to team overview

launchpad-reviewers team mailing list archive

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

 

Gavin Panella has proposed merging lp:~allenap/maas/dev-services-shutdown into lp:maas.

Commit message:
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.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~allenap/maas/dev-services-shutdown/+merge/141645
-- 
https://code.launchpad.net/~allenap/maas/dev-services-shutdown/+merge/141645
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~allenap/maas/dev-services-shutdown into lp:maas.
=== modified file 'services/cluster-worker/run'
--- services/cluster-worker/run	2012-12-11 13:30:57 +0000
+++ services/cluster-worker/run	2013-01-02 17:01:23 +0000
@@ -22,5 +22,5 @@
 export CLUSTER_UUID="adfd3977-f251-4f2c-8d61-745dbd690bfc"
 
 script="$(readlink -f bin/maas-provision)"
-exec fghack "${script}" start-cluster-controller \
+exec pgrphack "${script}" start-cluster-controller \
     http://0.0.0.0:5240/ -u "$(id -un)" -g "$(id -gn)"

=== modified file 'services/region-worker/run'
--- services/region-worker/run	2012-10-05 12:08:51 +0000
+++ services/region-worker/run	2013-01-02 17:01:23 +0000
@@ -14,11 +14,12 @@
 # because there are race issues when restarting.
 [ -z "${logdir:-}" ] || exec &>> "${logdir}/current"
 
-# XXX JeroenVermeulen 2012-08-23, bug=1040529: Use fghack to kludge around
-# hanging celery shutdown.
 export PYTHONPATH=etc/:src/
 script="$(readlink -f bin/celeryd)"
-exec fghack "${script}" \
+# XXX GavinPanella 2013-01-02, bug=1040529: celeryd does not shutdown
+# correctly when signalled: processes are often left behind. However,
+# pgrphack works around this, ensuring a complete shutdown.
+exec pgrphack "${script}" \
     --loglevel INFO --beat --queues celery,master \
     --schedule=run/celerybeat-region-schedule \
     --config=democeleryconfig


Follow ups