launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #13886
[Merge] lp:~julian-edwards/maas/boot_images_beat into lp:maas
Julian Edwards has proposed merging lp:~julian-edwards/maas/boot_images_beat into lp:maas.
Commit message:
Move the report-boot-images celerybeat task from region to clusters, as that is now where this task runs.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #1068843 in MAAS: "maas-cluster-controller doesn't have images for provisioning"
https://bugs.launchpad.net/maas/+bug/1068843
For more details, see:
https://code.launchpad.net/~julian-edwards/maas/boot_images_beat/+merge/132065
--
https://code.launchpad.net/~julian-edwards/maas/boot_images_beat/+merge/132065
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~julian-edwards/maas/boot_images_beat into lp:maas.
=== modified file 'etc/celeryconfig.py'
--- etc/celeryconfig.py 2012-09-28 15:04:45 +0000
+++ etc/celeryconfig.py 2012-10-30 11:20:31 +0000
@@ -15,14 +15,9 @@
__metaclass__ = type
-from datetime import timedelta
-
import celeryconfig_common
from maas import import_settings
-# Silence lint, this will be defined by celeryconfig_common.
-WORKER_QUEUE_BOOT_IMAGES = None
-
import_settings(celeryconfig_common)
try:
@@ -34,9 +29,4 @@
CELERYBEAT_SCHEDULE = {
- 'report-boot-images': {
- 'task': 'provisioningserver.tasks.report_boot_images',
- 'schedule': timedelta(minutes=5),
- 'options': {'queue': WORKER_QUEUE_BOOT_IMAGES},
- },
}
=== 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:20:31 +0000
@@ -40,4 +40,9 @@
'schedule': timedelta(minutes=1),
'options': {'queue': CLUSTER_UUID},
},
+ 'report-boot-images': {
+ 'task': 'provisioningserver.tasks.report_boot_images',
+ 'schedule': timedelta(minutes=5),
+ 'options': {'queue': CLUSTER_UUID},
+ },
}
=== modified file 'etc/celeryconfig_common.py'
--- etc/celeryconfig_common.py 2012-10-23 12:48:31 +0000
+++ etc/celeryconfig_common.py 2012-10-30 11:20:31 +0000
@@ -54,7 +54,6 @@
CELERYBEAT_SCHEDULE_FILENAME = '/var/lib/maas/celerybeat-cluster-schedule'
WORKER_QUEUE_DNS = 'celery'
-WORKER_QUEUE_BOOT_IMAGES = 'celery'
# Each cluster should have its own queue created automatically by Celery.
CELERY_CREATE_MISSING_QUEUES = True
=== modified file 'src/provisioningserver/tasks.py'
--- src/provisioningserver/tasks.py 2012-10-23 09:32:58 +0000
+++ src/provisioningserver/tasks.py 2012-10-30 11:20:31 +0000
@@ -335,7 +335,7 @@
# =====================================================================
-@task(queue=celery_config.WORKER_QUEUE_BOOT_IMAGES)
+@task
def report_boot_images():
"""For master worker only: report available netboot images."""
boot_images.report_to_server()
=== modified file 'src/provisioningserver/tests/test_tasks.py'
--- src/provisioningserver/tests/test_tasks.py 2012-10-25 10:01:04 +0000
+++ src/provisioningserver/tests/test_tasks.py 2012-10-30 11:20:31 +0000
@@ -499,11 +499,6 @@
args, kwargs = MAASClient.post.call_args
self.assertItemsEqual([image], json.loads(kwargs['images']))
- def test_report_boot_images_attached_to_boot_images_worker_queue(self):
- self.assertEqual(
- write_dns_config.queue,
- celery_config.WORKER_QUEUE_BOOT_IMAGES)
-
class TestTagTasks(PservTestCase):