Awx: Production Install seems to fail before migrations have run

Created on 7 Sep 2017  ยท  5Comments  ยท  Source: ansible/awx

Summary

When AWX is first deployed it will start running migrations, this isn't obvious from the user interface and causes errors to be displayed as though something had gone wrong with the deployment when in actuality, we're still waiting for the migrations to run.

Environment

  • AWX version: 1.0.0.263

Steps To Reproduce:

Install a fresh AWX container set

Expected Results:

A placeholder page is displayed until the migrations have finished

Actual Results:

The interface shows errors until after the migration is finished on the task container

Additional Information:

enhancement

Most helpful comment

In addition migrations is really slow (around 5 min) with fresh new database...

All 5 comments

In addition migrations is really slow (around 5 min) with fresh new database...

We can probably add middleware that does a check like the following:

from django.db import connection
from django.db.migrations.executor import MigrationExecutor

def migrations_complete():
    executor = MigrationExecutor(connection) 
    plan = executor.migration_plan(executor.loader.graph.leaf_nodes())
    return not bool(plan)

@cchurch We could think adding your test on _docker healthcheck_ feature with docker-compose >= 2.1 in combinaison to depends_on

Unfortunately migrations are going to be slow until we've upgraded to Django 1.10+ which we are looking to do pretty soonish.

implemented in #113

Was this page helpful?
0 / 5 - 0 ratings