diff --git a/zun/servicegroup/zun_service_periodic.py b/zun/servicegroup/zun_service_periodic.py index 03720c63d..6e760bb77 100644 --- a/zun/servicegroup/zun_service_periodic.py +++ b/zun/servicegroup/zun_service_periodic.py @@ -32,6 +32,7 @@ class ZunServicePeriodicTasks(periodic_task.PeriodicTasks): self.zun_service_ref = None self.host = conf.host self.binary = binary + self.availability_zone = conf.default_availability_zone super(ZunServicePeriodicTasks, self).__init__(conf) @periodic_task.periodic_task(run_immediately=True) @@ -50,6 +51,7 @@ class ZunServicePeriodicTasks(periodic_task.PeriodicTasks): self.zun_service_ref = objects.ZunService( ctx, **zun_service_dict) self.zun_service_ref.create() + self.zun_service_ref.availability_zone = self.availability_zone self.zun_service_ref.report_state_up()