AAP GUI fails to load and always shows currently upgrading after migrating the AAP to 2.x
Environment
- Red Hat® Ansible Automation Platform 2.x
Issue
-
Ansible Automation Platform page fails to load and GUI always shows below message after upgrading the AAP to 2.x:
"Red Hat Ansible Automation Platform is currently upgrading. This page will refresh when complete."
Resolution
-
Run the following commands to insert the attributes to django_migrations. Please note the parameters listed can be different based on
awx-manage showmigrations
command output.# echo "insert into django_migrations(app,name,applied) values ('main','0170_node_and_link_state','2023-03-14 18:56:43.45063+00');" | awx-manage dbshell # echo "insert into django_migrations(app,name,applied) values ('main','0171_add_health_check_started','2023-03-14 18:56:43.45063+00');" | awx-manage dbshell
-
Once done, run the
awx-manage migrate
command to make sure that migration is successful.
Root Cause
-
The awx-manage showmigrations is incompleted which can be seen by running the same command.
[ ] 0170_node_and_link_state
[ ] 0171_add_health_check_started
Diagnostic Steps
-
The following exception can be seen while running
awx-manage migrate
command from Controller server:[root@automation-controller~]# awx-manage migrate Operations to perform: Apply all migrations: auth, conf, contenttypes, main, oauth2_provider, sessions, sites, social_django, sso, taggit Running migrations: Applying main.0170_node_and_link_state...Traceback (most recent call last): File "/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/backends/utils.py", line 84, in _execute return self.cursor.execute(sql, params) psycopg2.errors.DuplicateColumn: column "listener_port" of relation "main_instance" already exists
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments