# Problems updating to 22.4.0 from 22.3.0

**URL:** <https://forum.ansible.com/t/problems-updating-to-22-4-0-from-22-3-0/38197>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [July 6, 2023, 3:34pm UTC](https://forum.ansible.com/t/problems-updating-to-22-4-0-from-22-3-0/38197 "2023-07-06T15:34:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neil\_Wright](https://avatars.discourse-cdn.com/v4/letter/n/90ced4/32.png) [@Neil\_Wright](https://forum.ansible.com/u/Neil_Wright)\
**Post date:** [July 6, 2023, 3:34pm UTC](https://forum.ansible.com/t/problems-updating-to-22-4-0-from-22-3-0/38197/1 "2023-07-06T15:34:09Z")

</div>

Hi,  
We have awx version 22.3.0 (operator 2.2.0) running in AKS using an external Postgres DB. I’ve recently attempted to update it to version 22.4.0 by deploying operator 2.3.0 but without success. The containers are created but the web page gives a gateway error and the awx\_web logs show:

.  
.  
[wait-for-migrations] Attempt 28 of 30  
[wait-for-migrations] Waiting 30 seconds before next attempt  
[wait-for-migrations] Attempt 29 of 30  
[wait-for-migrations] Waiting 30 seconds before next attempt  
[wait-for-migrations] Attempt 30 of 30  
[wait-for-migrations] ERROR: Database migrations not applied

I tried running awx-manage migrate manually but that also errors giving the following exceptions:

psycopg.errors.DuplicateTable: relation “django\_migrations” already exists

django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the django\_migrations table (relation “django\_migrations” already exists)

Anyone have any idea what might be going wrong?  
I managed to roll it back to 22.3.0 by redeploying operator but I can try it again if there’s any logs etc that would be useful…

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![AWX\_Project](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AWX\_Project](https://forum.ansible.com/u/AWX_Project)\
**Post date:** [July 7, 2023, 5:18pm UTC](https://forum.ansible.com/t/problems-updating-to-22-4-0-from-22-3-0/38197/2 "2023-07-07T17:18:40Z")

</div>

Hello,  
We are sorry to hear you’re having trouble with migrations. We’d like to gather a bit more information from you. Would you mind running `awx-manage showmigrations` in your task container and provide us with that output? That could be helpful as it should show where the migrations are getting hung up.

You can also log into your database and run `\dt`? That should show the existing tables within your database. From there you can also run `select * from django_migrations;` . Please provide us with that information as well.

- AWX Team

---

<div class="post-metadata">

**Author:** ![Neil\_Wright](https://avatars.discourse-cdn.com/v4/letter/n/90ced4/32.png) [@Neil\_Wright](https://forum.ansible.com/u/Neil_Wright)\
**Post date:** [July 13, 2023, 1:29pm UTC](https://forum.ansible.com/t/problems-updating-to-22-4-0-from-22-3-0/38197/3 "2023-07-13T13:29:44Z")

</div>

Hi,  
Thanks for reply and sorry for the delay in getting back to you. I’ve redeployed 22.4.0 so that I can run the commands you asked and it has broken again in the same way.  
awx-manage showmigrations errors with the following output:

bash-5.1$ awx-manage showmigrations  
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 200, 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 442, in execute\_from\_command\_line  
utility.execute()  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/ **init**.py”, line 436, 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 412, 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 453, in execute  
self.check()  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/management/base.py”, line 485, in check  
all\_issues = checks.run\_checks(  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/checks/registry.py”, line 88, in run\_checks  
new\_errors = check(app\_configs=app\_configs, databases=databases)  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/checks/urls.py”, line 14, in check\_url\_config  
return check\_resolver(resolver)  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/core/checks/urls.py”, line 24, in check\_resolver  
return check\_method()  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/urls/resolvers.py”, line 494, in check  
for pattern in self.url\_patterns:  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/utils/functional.py”, line 57, in **get**  
res = instance. **dict** [self.name] = self.func(instance)  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/urls/resolvers.py”, line 715, in url\_patterns  
patterns = getattr(self.urlconf\_module, “urlpatterns”, self.urlconf\_module)  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/utils/functional.py”, line 57, in **get**  
res = instance. **dict** [self.name] = self.func(instance)  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/urls/resolvers.py”, line 708, in urlconf\_module  
return import\_module(self.urlconf\_name)  
File “/usr/lib64/python3.9/importlib/ **init**.py”, line 127, in import\_module  
return \_bootstrap.\_gcd\_import(name[level:], package, level)  
File “”, line 1030, in \_gcd\_import  
File “”, line 1007, in \_find\_and\_load  
File “”, line 986, in \_find\_and\_load\_unlocked  
File “”, line 680, in \_load\_unlocked  
File “”, line 850, in exec\_module  
File “”, line 228, in \_call\_with\_frames\_removed  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/urls.py”, line 13, in   
re\_path(r’^api/‘, include(‘awx.api.urls’, namespace=‘api’)),  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/django/urls/conf.py”, line 38, in include  
urlconf\_module = import\_module(urlconf\_module)  
File “/usr/lib64/python3.9/importlib/ **init**.py”, line 127, in import\_module  
return \_bootstrap.\_gcd\_import(name[level:], package, level)  
File “”, line 1030, in \_gcd\_import  
File “”, line 1007, in \_find\_and\_load  
File “”, line 986, in \_find\_and\_load\_unlocked  
File “”, line 680, in \_load\_unlocked  
File “”, line 850, in exec\_module  
File “”, line 228, in \_call\_with\_frames\_removed  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/api/urls/ **init**.py”, line 5, in   
from .urls import urlpatterns  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/api/urls/urls.py”, line 83, in   
from .oauth2\_root import urls as oauth2\_root\_urls  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/api/urls/oauth2\_root.py”, line 10, in   
from oauth2\_provider import views  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/oauth2\_provider/views/ **init**.py”, line 18, in   
from .oidc import ConnectDiscoveryInfoView, JwksInfoView, UserInfoView  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/oauth2\_provider/views/oidc.py”, line 16, in   
Application = get\_application\_model()  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/oauth2\_provider/models.py”, line 571, in get\_application\_model  
return apps.get\_model(oauth2\_settings.APPLICATION\_MODEL)  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/ **init**.py”, line 119, in oauth2\_getattribute  
val = settings.OAUTH2\_PROVIDER.get(attr)  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/conf/settings.py”, line 527, in **getattr\_without\_cache**  
return getattr(self.\_wrapped, name)  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/conf/settings.py”, line 425, in **getattr**  
value = self.\_get\_local\_with\_cache(name)  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/cachetools/ **init**.py”, line 724, in wrapper  
v = method(self, \*args, \*\*kwargs)  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/conf/settings.py”, line 420, in \_get\_local\_with\_cache  
return self.\_get\_local(name)  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/conf/settings.py”, line 339, in \_get\_local  
self.\_preload\_cache()  
File “/var/lib/awx/venv/awx/lib64/python3.9/site-packages/awx/conf/settings.py”, line 309, in \_preload\_cache  
if settings\_to\_cache[setting.key] != SETTING\_CACHE\_NOTSET:  
KeyError: b’AUTH\_LDAP\_GROUP\_TYPE\_PARAMS’

I’ve attached the output of the \dt and select commands as separate files as they’re a bit large to paste directly into the message body.

Thanks again for your help,

Neil

> **(attachments)**
>
> [tables.txt](https://forum.ansible.com/uploads/short-url/69ck4SfZtWCsfEaURd7G81bjfbn.txt) (371 KB)  
> [django\_migrations.txt](https://forum.ansible.com/uploads/short-url/mktis6D4udLC1FZG0HVLLsdDNDl.txt) (31.3 KB)

---

<div class="post-metadata">

**Author:** ![AWX\_Project](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AWX\_Project](https://forum.ansible.com/u/AWX_Project)\
**Post date:** [July 14, 2023, 6:05pm UTC](https://forum.ansible.com/t/problems-updating-to-22-4-0-from-22-3-0/38197/4 "2023-07-14T18:05:46Z")

</div>

can you share the awx spec file that you are using to deploy this?

also you provide output of

SELECT \* FROM conf\_setting where key like ‘%LDAP%’;

and remove sensitive info please

AWX Team

---

<div class="post-metadata">

**Author:** ![Neil\_Wright](https://avatars.discourse-cdn.com/v4/letter/n/90ced4/32.png) [@Neil\_Wright](https://forum.ansible.com/u/Neil_Wright)\
**Post date:** [July 17, 2023, 2:19pm UTC](https://forum.ansible.com/t/problems-updating-to-22-4-0-from-22-3-0/38197/5 "2023-07-17T14:19:28Z")

</div>

Hi,  
Thanks for your message. I’ve attached the results of the query along with the awx spec (the variables are substituted depending on whether it’s the prod or test deployment)

Thanks again,

Neil

> **(attachments)**
>
> [query\_ldap.txt](https://forum.ansible.com/uploads/short-url/zJW8tnBsphcYYuE1rVy1xJZy2rt.txt) (15.6 KB)  
> [awx.yaml](https://forum.ansible.com/uploads/short-url/xS277nbc1rxxwBglw9u0QoK7G8p.yaml) (828 Bytes)

---

<div class="post-metadata">

**Author:** ![Neil\_Wright](https://avatars.discourse-cdn.com/v4/letter/n/90ced4/32.png) [@Neil\_Wright](https://forum.ansible.com/u/Neil_Wright)\
**Post date:** [July 26, 2023, 3:43pm UTC](https://forum.ansible.com/t/problems-updating-to-22-4-0-from-22-3-0/38197/6 "2023-07-26T15:43:25Z")

</div>

Hi,  
I’ve just tried deploying operator 2.4.0 to deploy awx 22.5.0 and it fails with the same ‘waiting for migrations’ message in the awx-web container logs.

Interestingly, this time I was able to run the awx-manage command and have attached the result.

awx-manage check fails with the error:

“KeyError: b’AUTH\_LDAP\_GROUP\_TYPE\_PARAMS’”.

(I’ve attached the full output of that command too if it helps.)

We dont use ladp authentication so the settings are all at their defaults.

Thanks again,

Neil

> **(attachments)**
>
> [awx-manage check.txt](https://forum.ansible.com/uploads/short-url/sVx59AVszWNjxhbraqJu3fwpoOp.txt) (5.92 KB)  
> [showmigrations.txt](https://forum.ansible.com/uploads/short-url/82kUQTLYtTaXLza3YheKW2Q5CGB.txt) (8.62 KB)

---

<div class="post-metadata">

**Author:** ![AWX\_Project](https://avatars.discourse-cdn.com/v4/letter/a/eada6e/32.png) [@AWX\_Project](https://forum.ansible.com/u/AWX_Project)\
**Post date:** [August 11, 2023, 3:16pm UTC](https://forum.ansible.com/t/problems-updating-to-22-4-0-from-22-3-0/38197/7 "2023-08-11T15:16:17Z")

</div>

Per your last email are you starting up a new instance altogether? It looks like this might be the case since there are no migrations applied at all.  
If so, are you attempting to set up LDAP via your spec file? If so, can you please send that with any sensitive information redacted with something like `<redacted>`.

-The AWX Team

---

<div class="post-metadata">

**Author:** ![Neil\_Wright](https://avatars.discourse-cdn.com/v4/letter/n/90ced4/32.png) [@Neil\_Wright](https://forum.ansible.com/u/Neil_Wright)\
**Post date:** [August 16, 2023, 9:48am UTC](https://forum.ansible.com/t/problems-updating-to-22-4-0-from-22-3-0/38197/8 "2023-08-16T09:48:50Z")

</div>

Hi,  
We just deploy the new operator to kubernetes and it deploys the relevant awx version. We use an external postgres DB on azure so all the settings are retained. We don’t use LDAP at all.

However, since my last message I deployed operator v2.5.0 and this time awx updated to 22.6.0 successfully. The migrations completed and everything seems to work as it should so, for now at least, all is well 🙂

Thanks again for your help,

Neil
