Merge lp:~rvb/maas/refactor-celerysettings into lp:~maas-committers/maas/trunk
Status: | Merged |
---|---|
Approved by: | Raphaël Badin |
Approved revision: | no longer in the source branch. |
Merged at revision: | 1110 |
Proposed branch: | lp:~rvb/maas/refactor-celerysettings |
Merge into: | lp:~maas-committers/maas/trunk |
Diff against target: |
485 lines (+241/-122) 11 files modified
Makefile (+5/-3) etc/celeryconfig.py (+6/-72) etc/celeryconfig_cluster.py (+43/-0) etc/celeryconfig_common.py (+65/-0) etc/democeleryconfig.py (+9/-24) etc/democeleryconfig_cluster.py (+35/-0) etc/democeleryconfig_common.py (+33/-0) services/celeryd/run (+0/-22) services/cluster-worker/run (+20/-0) services/region-worker/run (+22/-0) setup.py (+3/-1) |
To merge this branch: | bzr merge lp:~rvb/maas/refactor-celerysettings |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jeroen T. Vermeulen (community) | Approve | ||
Review via email: mp+126816@code.launchpad.net |
Commit message
Split the celeryconfig file into 2 files: one for the region controller and one for the cluster controller, both importing from a common config file. Split the celeryd service (on a dev instance) into a region worker (in charge of DNS-related tasks, etc.) and a cluster controller in charge of the cluster-specific tasks (like powering up nodes, uploading DHCP, etc.)
Description of the change
Split the celeryconfig file into 2 files: one for the region controller and one for the cluster controller, both importing from a common config file. Split the celeryd service (on a dev instance) into a region worker (in charge of DNS-related tasks, etc.) and a cluster controller in charge of the cluster-specific tasks (powering up nodes, uploading DHCP, etc.)
= Notes =
- Turns out PXE_TEMPLATES_DIR is not used anywhere so I simply got rid of it.
- I've created two new services: cluster-worker and region-worker, they remplace the old celeryd service.
- All the common settings have been moved into a celeryconfig_common file. Right now, the code relies on the fact that all the settings are available (because some of the settings are used "declaratively", like "@task(
= Pre-imp =
This was discussed with Julian.
= Demo =
Run:
'make run-cluster'
'make run-region'
(Or all in one: 'make run')
And then watch logs/cluster-
You can also have a look at logs/webapp/current to see the initial API call used to exchange the RabbitMQ credentials.
= Next =
The packaging needs to be changed a bit in order for that change to be landed:
- the new file celeryconfig_
- the cluster controller should:
- copy celeryconfig_
I'm working on it.
I like the nomenclature of "region worker" vs. "cluster worker."
PXE_TEMPLATES_DIR was used once upon a time, but somebody realized that we only had one template and so dropped the directory meant for PXE templates... juuuussst before we had to create multiple PXE templates. And then we unified them again.