Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Production Install seems to fail before migrations have run #23

Closed
matburt opened this issue Sep 6, 2017 · 5 comments
Closed

Production Install seems to fail before migrations have run #23

matburt opened this issue Sep 6, 2017 · 5 comments
Assignees

Comments

@matburt
Copy link
Member

matburt commented Sep 6, 2017

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:

@matburt matburt self-assigned this Sep 6, 2017
@kakawait
Copy link

kakawait commented Sep 8, 2017

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

@cchurch
Copy link
Contributor

cchurch commented Sep 8, 2017

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)

@kakawait
Copy link

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

@matburt
Copy link
Member Author

matburt commented Sep 11, 2017

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

@matburt
Copy link
Member Author

matburt commented Sep 11, 2017

implemented in #113

@matburt matburt closed this as completed Sep 11, 2017
mabashian pushed a commit to mabashian/awx that referenced this issue Jun 28, 2019
softwarefactory-project-zuul bot pushed a commit that referenced this issue Jan 18, 2021
AlanCoding referenced this issue in AlanCoding/awx Jan 21, 2021
Fix obvious code error with foreman inventory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants