I’m using the internal postgres automatically deployed with AWX. The install acts differently every time. So, I just did a delete and reran the full install script. It created everything perfectly, but the site would not come up. The route was not published in OpenShift. I deleted the AWX pod, and let it recreate itself and that time it worked. In fact, it worked perfectly. I have all the missing components. So, I’m not able to demonstrate this time what happens when it’s broken.
When the site was not browseable, I ran the command at the web node the first time and received: (After getting this I did the pod refresh, and everything is working like a dream now.)
h-5.1$ awx-manage migrate --noinput
Operations to perform:
Apply all migrations: auth, conf, contenttypes, main, oauth2_provider, sessions, sites, social_django, sso, taggit
Running migrations:
Applying main.0002_squashed_v300_release…Traceback (most recent call last):
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/backends/utils.py”, line 82, in _execute
return self.cursor.execute(sql)
psycopg2.errors.UniqueViolation: duplicate key value violates unique constraint “pg_type_typname_nsp_index”
DETAIL: Key (typname, typnamespace)=(main_towersettings_id_seq, 2200) already exists.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File “/usr/bin/awx-manage”, line 8, in
sys.exit(manage())
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/init.py”, line 201, in manage
execute_from_command_line(sys.argv)
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/init.py”, line 419, in execute_from_command_line
utility.execute()
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/init.py”, line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/base.py”, line 354, in run_from_argv
self.execute(*args, **cmd_options)
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/base.py”, line 398, in execute
output = self.handle(*args, **options)
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/base.py”, line 89, in wrapped
res = handle_func(*args, **kwargs)
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/commands/migrate.py”, line 244, in handle
post_migrate_state = executor.migrate(
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/migrations/executor.py”, line 117, in migrate
state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/migrations/executor.py”, line 147, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/migrations/executor.py”, line 227, in apply_migration
state = migration.apply(state, schema_editor)
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/migrations/migration.py”, line 126, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/migrations/operations/models.py”, line 92, in database_forwards
schema_editor.create_model(model)
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/backends/base/schema.py”, line 345, in create_model
self.execute(sql, params or None)
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/backends/base/schema.py”, line 145, in execute
cursor.execute(sql, params)
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/backends/utils.py”, line 66, in execute
return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/backends/utils.py”, line 75, in _execute_with_wrappers
return executor(sql, params, many, context)
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)
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/utils.py”, line 90, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/db/backends/utils.py”, line 82, in _execute
return self.cursor.execute(sql)
django.db.utils.IntegrityError: duplicate key value violates unique constraint “pg_type_typname_nsp_index”
DETAIL: Key (typname, typnamespace)=(main_towersettings_id_seq, 2200) already exists.
sh-5.1$