Provision the instance before booting anything

There was a race condition because the callback reciever tried to run this code:

  File "/awx_devel/awx/main/management/commands/run_callback_receiver.py", line 31, in handle
    CallbackBrokerWorker(),
  File "/awx_devel/awx/main/dispatch/worker/callback.py", line 49, in __init__
    self.subsystem_metrics = s_metrics.Metrics(auto_pipe_execute=False)
  File "/awx_devel/awx/main/analytics/subsystem_metrics.py", line 156, in __init__
    self.instance_name = Instance.objects.me().hostname

Before get_or_register was being called by the dispatcher.
This commit is contained in:
Shane McDonald
2022-03-23 18:42:43 -04:00
parent 270497eda1
commit b04747676c
3 changed files with 6 additions and 9 deletions

View File

@@ -17,4 +17,6 @@ set -e
wait-for-migrations
awx-manage provision_instance
supervisord -c /etc/supervisord_task.conf