Merge lp:~julian-edwards/maas/1.2-backport-boot_images_beat into lp:maas/1.2

Proposed by Julian Edwards
Status: Merged
Approved by: Julian Edwards
Approved revision: no longer in the source branch.
Merged at revision: 1279
Proposed branch: lp:~julian-edwards/maas/1.2-backport-boot_images_beat
Merge into: lp:maas/1.2
Diff against target: 82 lines (+6/-17)
5 files modified
etc/celeryconfig.py (+0/-10)
etc/celeryconfig_cluster.py (+5/-0)
etc/celeryconfig_common.py (+0/-1)
src/provisioningserver/tasks.py (+1/-1)
src/provisioningserver/tests/test_tasks.py (+0/-5)
To merge this branch: bzr merge lp:~julian-edwards/maas/1.2-backport-boot_images_beat
Reviewer Review Type Date Requested Status
Julian Edwards (community) Approve
Review via email: mp+132067@code.launchpad.net

Commit message

Backport r1319 from trunk: Move the report-boot-images celerybeat task from region to clusters, as that is now where this task runs

To post a comment you must log in.
Revision history for this message
Julian Edwards (julian-edwards) wrote :

Self-approving mechanical backport.

Revision history for this message
Julian Edwards (julian-edwards) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'etc/celeryconfig.py'
2--- etc/celeryconfig.py 2012-09-28 15:04:45 +0000
3+++ etc/celeryconfig.py 2012-10-30 11:33:22 +0000
4@@ -15,14 +15,9 @@
5
6 __metaclass__ = type
7
8-from datetime import timedelta
9-
10 import celeryconfig_common
11 from maas import import_settings
12
13-# Silence lint, this will be defined by celeryconfig_common.
14-WORKER_QUEUE_BOOT_IMAGES = None
15-
16 import_settings(celeryconfig_common)
17
18 try:
19@@ -34,9 +29,4 @@
20
21
22 CELERYBEAT_SCHEDULE = {
23- 'report-boot-images': {
24- 'task': 'provisioningserver.tasks.report_boot_images',
25- 'schedule': timedelta(minutes=5),
26- 'options': {'queue': WORKER_QUEUE_BOOT_IMAGES},
27- },
28 }
29
30=== modified file 'etc/celeryconfig_cluster.py'
31--- etc/celeryconfig_cluster.py 2012-10-11 10:47:57 +0000
32+++ etc/celeryconfig_cluster.py 2012-10-30 11:33:22 +0000
33@@ -40,4 +40,9 @@
34 'schedule': timedelta(minutes=1),
35 'options': {'queue': CLUSTER_UUID},
36 },
37+ 'report-boot-images': {
38+ 'task': 'provisioningserver.tasks.report_boot_images',
39+ 'schedule': timedelta(minutes=5),
40+ 'options': {'queue': CLUSTER_UUID},
41+ },
42 }
43
44=== modified file 'etc/celeryconfig_common.py'
45--- etc/celeryconfig_common.py 2012-10-17 05:21:12 +0000
46+++ etc/celeryconfig_common.py 2012-10-30 11:33:22 +0000
47@@ -53,7 +53,6 @@
48 MAAS_CLUSTER_CELERY_DB = '/var/lib/maas/celerybeat-cluster-schedule'
49
50 WORKER_QUEUE_DNS = 'celery'
51-WORKER_QUEUE_BOOT_IMAGES = 'celery'
52
53 # Each cluster should have its own queue created automatically by Celery.
54 CELERY_CREATE_MISSING_QUEUES = True
55
56=== modified file 'src/provisioningserver/tasks.py'
57--- src/provisioningserver/tasks.py 2012-10-30 10:24:59 +0000
58+++ src/provisioningserver/tasks.py 2012-10-30 11:33:22 +0000
59@@ -335,7 +335,7 @@
60 # =====================================================================
61
62
63-@task(queue=celery_config.WORKER_QUEUE_BOOT_IMAGES)
64+@task
65 def report_boot_images():
66 """For master worker only: report available netboot images."""
67 boot_images.report_to_server()
68
69=== modified file 'src/provisioningserver/tests/test_tasks.py'
70--- src/provisioningserver/tests/test_tasks.py 2012-10-30 11:00:20 +0000
71+++ src/provisioningserver/tests/test_tasks.py 2012-10-30 11:33:22 +0000
72@@ -499,11 +499,6 @@
73 args, kwargs = MAASClient.post.call_args
74 self.assertItemsEqual([image], json.loads(kwargs['images']))
75
76- def test_report_boot_images_attached_to_boot_images_worker_queue(self):
77- self.assertEqual(
78- write_dns_config.queue,
79- celery_config.WORKER_QUEUE_BOOT_IMAGES)
80-
81
82 class TestTagTasks(PservTestCase):
83

Subscribers

People subscribed via source and target branches

to status/vote changes: