← Back to team overview

launchpad-reviewers team mailing list archive

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

 

Julian Edwards has proposed merging lp:~julian-edwards/maas/1.2-backport-boot_images_beat into lp:maas/1.2.

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

Requested reviews:
  Julian Edwards (julian-edwards)
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/1.2-backport-boot_images_beat/+merge/132067
-- 
https://code.launchpad.net/~julian-edwards/maas/1.2-backport-boot_images_beat/+merge/132067
Your team MAAS Maintainers is subscribed to branch lp:maas/1.2.
=== modified file 'etc/celeryconfig.py'
--- etc/celeryconfig.py	2012-09-28 15:04:45 +0000
+++ etc/celeryconfig.py	2012-10-30 11:27:21 +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:27:21 +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-17 05:21:12 +0000
+++ etc/celeryconfig_common.py	2012-10-30 11:27:21 +0000
@@ -53,7 +53,6 @@
 MAAS_CLUSTER_CELERY_DB = '/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-11 13:25:43 +0000
+++ src/provisioningserver/tasks.py	2012-10-30 11:27:21 +0000
@@ -334,7 +334,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-08 08:24:11 +0000
+++ src/provisioningserver/tests/test_tasks.py	2012-10-30 11:27:21 +0000
@@ -492,11 +492,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):
 


Follow ups