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
=== modified file 'etc/celeryconfig.py'
--- etc/celeryconfig.py 2012-09-28 15:04:45 +0000
+++ etc/celeryconfig.py 2012-10-30 11:33:22 +0000
@@ -15,14 +15,9 @@
1515
16__metaclass__ = type16__metaclass__ = type
1717
18from datetime import timedelta
19
20import celeryconfig_common18import celeryconfig_common
21from maas import import_settings19from maas import import_settings
2220
23# Silence lint, this will be defined by celeryconfig_common.
24WORKER_QUEUE_BOOT_IMAGES = None
25
26import_settings(celeryconfig_common)21import_settings(celeryconfig_common)
2722
28try:23try:
@@ -34,9 +29,4 @@
3429
3530
36CELERYBEAT_SCHEDULE = {31CELERYBEAT_SCHEDULE = {
37 'report-boot-images': {
38 'task': 'provisioningserver.tasks.report_boot_images',
39 'schedule': timedelta(minutes=5),
40 'options': {'queue': WORKER_QUEUE_BOOT_IMAGES},
41 },
42}32}
4333
=== modified file 'etc/celeryconfig_cluster.py'
--- etc/celeryconfig_cluster.py 2012-10-11 10:47:57 +0000
+++ etc/celeryconfig_cluster.py 2012-10-30 11:33:22 +0000
@@ -40,4 +40,9 @@
40 'schedule': timedelta(minutes=1),40 'schedule': timedelta(minutes=1),
41 'options': {'queue': CLUSTER_UUID},41 'options': {'queue': CLUSTER_UUID},
42 },42 },
43 'report-boot-images': {
44 'task': 'provisioningserver.tasks.report_boot_images',
45 'schedule': timedelta(minutes=5),
46 'options': {'queue': CLUSTER_UUID},
47 },
43}48}
4449
=== modified file 'etc/celeryconfig_common.py'
--- etc/celeryconfig_common.py 2012-10-17 05:21:12 +0000
+++ etc/celeryconfig_common.py 2012-10-30 11:33:22 +0000
@@ -53,7 +53,6 @@
53MAAS_CLUSTER_CELERY_DB = '/var/lib/maas/celerybeat-cluster-schedule'53MAAS_CLUSTER_CELERY_DB = '/var/lib/maas/celerybeat-cluster-schedule'
5454
55WORKER_QUEUE_DNS = 'celery'55WORKER_QUEUE_DNS = 'celery'
56WORKER_QUEUE_BOOT_IMAGES = 'celery'
5756
58# Each cluster should have its own queue created automatically by Celery.57# Each cluster should have its own queue created automatically by Celery.
59CELERY_CREATE_MISSING_QUEUES = True58CELERY_CREATE_MISSING_QUEUES = True
6059
=== modified file 'src/provisioningserver/tasks.py'
--- src/provisioningserver/tasks.py 2012-10-30 10:24:59 +0000
+++ src/provisioningserver/tasks.py 2012-10-30 11:33:22 +0000
@@ -335,7 +335,7 @@
335# =====================================================================335# =====================================================================
336336
337337
338@task(queue=celery_config.WORKER_QUEUE_BOOT_IMAGES)338@task
339def report_boot_images():339def report_boot_images():
340 """For master worker only: report available netboot images."""340 """For master worker only: report available netboot images."""
341 boot_images.report_to_server()341 boot_images.report_to_server()
342342
=== modified file 'src/provisioningserver/tests/test_tasks.py'
--- src/provisioningserver/tests/test_tasks.py 2012-10-30 11:00:20 +0000
+++ src/provisioningserver/tests/test_tasks.py 2012-10-30 11:33:22 +0000
@@ -499,11 +499,6 @@
499 args, kwargs = MAASClient.post.call_args499 args, kwargs = MAASClient.post.call_args
500 self.assertItemsEqual([image], json.loads(kwargs['images']))500 self.assertItemsEqual([image], json.loads(kwargs['images']))
501501
502 def test_report_boot_images_attached_to_boot_images_worker_queue(self):
503 self.assertEqual(
504 write_dns_config.queue,
505 celery_config.WORKER_QUEUE_BOOT_IMAGES)
506
507502
508class TestTagTasks(PservTestCase):503class TestTagTasks(PservTestCase):
509504

Subscribers

People subscribed via source and target branches

to status/vote changes: