ansible / awx

AWX provides a web-based user interface, REST API, and task engine built on top of Ansible. It is one of the upstream projects for Red Hat Ansible Automation Platform.
Other
14.11k stars 3.43k forks source link

Django version upgrade to 3.2.0 breaking AWX v17.1.0 #15411

Closed khagarwal closed 4 months ago

khagarwal commented 4 months ago

Please confirm the following

Bug Summary

Previous setup: AWX v17.1.0 running on a Ubuntu22.04 vm with below configurations: a. Python 3.9 b. Django 2.2.28 c. social_auth_app_django 3.1.0

New setup: AWX v17.1.0 running on a Ubuntu22.04 vm with below configurations: a. Python 3.9 b. Django 3.2.0 c. social_auth_app_django 5.4.1

Deployment strategy used: AWX v17.1.0 is deployed as a docker compose stack.

On updating social_auth_app_django to 5.4.1, and hence, Django to 3.2.0 (least compatible version with the required social_auth_app_django package) as a part of a compliance drive. I am seeing the following failure in the awx-manage play:

stderr: "Creating network \"awxcompose_default\" with driver \"bridge\"\nCreating awx_postgres ... \r\nCreating awx_redis    ... \r\nCreating awx_postgres ... done\r\nCreating awx_redis    ... done\r\nCreating awx_web      ... \r\nCreating awx_web      ... done\r\nCreating awxcompose_task_run ... \r\nCreating awxcompose_task_run ... done\r\nTraceback (most recent call last):\n  File \"/usr/bin/awx-manage\", line 8, in <module>\n    sys.exit(manage())\n  File \"/var/lib/awx/venv/awx/lib/python3.9/site-packages/awx/__init__.py\", line 138, in manage\n    prepare_env()\n  File \"/var/lib/awx/venv/awx/lib/python3.9/site-packages/awx/__init__.py\", line 97, in prepare_env\n    if not settings.DEBUG: # pragma: no cover\n  File \"/var/lib/awx/venv/awx/lib/python3.9/site-packages/django/conf/__init__.py\", line 82, in __getattr__\n    self._setup(name)\n  File \"/var/lib/awx/venv/awx/lib/python3.9/site-packages/django/conf/__init__.py\", line 69, in _setup\n    self._wrapped = Settings(settings_module)\n\
     \  File \"/var/lib/awx/venv/awx/lib/python3.9/site-packages/django/conf/__init__.py\", line 190, in __init__\n    raise ImproperlyConfigured(\ndjango.core.exceptions.ImproperlyConfigured: PASSWORD_RESET_TIMEOUT_DAYS/PASSWORD_RESET_TIMEOUT are mutually exclusive.\n1"
  stderr_lines:
  - Creating network "awxcompose_default" with driver "bridge"
  - 'Creating awx_postgres ... '
  - 'Creating awx_redis    ... '
  - Creating awx_postgres ... done
  - Creating awx_redis    ... done
  - 'Creating awx_web      ... '
  - Creating awx_web      ... done
  - 'Creating awxcompose_task_run ... '
  - Creating awxcompose_task_run ... done
  - 'Traceback (most recent call last):'
  - '  File "/usr/bin/awx-manage", line 8, in <module>'
  - '    sys.exit(manage())'
  - '  File "/var/lib/awx/venv/awx/lib/python3.9/site-packages/awx/__init__.py", line 138, in manage'
  - '    prepare_env()'
  - '  File "/var/lib/awx/venv/awx/lib/python3.9/site-packages/awx/__init__.py", line 97, in prepare_env'
  - '    if not settings.DEBUG: # pragma: no cover'
  - '  File "/var/lib/awx/venv/awx/lib/python3.9/site-packages/django/conf/__init__.py", line 82, in __getattr__'
  - '    self._setup(name)'
  - '  File "/var/lib/awx/venv/awx/lib/python3.9/site-packages/django/conf/__init__.py", line 69, in _setup'
  - '    self._wrapped = Settings(settings_module)'
  - '  File "/var/lib/awx/venv/awx/lib/python3.9/site-packages/django/conf/__init__.py", line 190, in __init__'
  - '    raise ImproperlyConfigured('
  - 'django.core.exceptions.ImproperlyConfigured: PASSWORD_RESET_TIMEOUT_DAYS/PASSWORD_RESET_TIMEOUT are mutually exclusive.'

AWX version

17.1.0

Select the relevant components

Installation method

docker development environment

Modifications

yes

Ansible version

8.5.0

Operating system

Ubuntu 22.04

Web browser

No response

Steps to reproduce

Build the dockerfile and deploy the awx containers as a docker compose stack.

Expected results

The awx-base and postgres image should deploy successfully.

Actual results

The awx-manage play failed with the following error:

stderr: "Creating network \"awxcompose_default\" with driver \"bridge\"\nCreating awx_postgres ... \r\nCreating awx_redis    ... \r\nCreating awx_postgres ... done\r\nCreating awx_redis    ... done\r\nCreating awx_web      ... \r\nCreating awx_web      ... done\r\nCreating awxcompose_task_run ... \r\nCreating awxcompose_task_run ... done\r\nTraceback (most recent call last):\n  File \"/usr/bin/awx-manage\", line 8, in <module>\n    sys.exit(manage())\n  File \"/var/lib/awx/venv/awx/lib/python3.9/site-packages/awx/__init__.py\", line 138, in manage\n    prepare_env()\n  File \"/var/lib/awx/venv/awx/lib/python3.9/site-packages/awx/__init__.py\", line 97, in prepare_env\n    if not settings.DEBUG: # pragma: no cover\n  File \"/var/lib/awx/venv/awx/lib/python3.9/site-packages/django/conf/__init__.py\", line 82, in __getattr__\n    self._setup(name)\n  File \"/var/lib/awx/venv/awx/lib/python3.9/site-packages/django/conf/__init__.py\", line 69, in _setup\n    self._wrapped = Settings(settings_module)\n\
     \  File \"/var/lib/awx/venv/awx/lib/python3.9/site-packages/django/conf/__init__.py\", line 190, in __init__\n    raise ImproperlyConfigured(\ndjango.core.exceptions.ImproperlyConfigured: PASSWORD_RESET_TIMEOUT_DAYS/PASSWORD_RESET_TIMEOUT are mutually exclusive.\n1"
  stderr_lines:
  - Creating network "awxcompose_default" with driver "bridge"
  - 'Creating awx_postgres ... '
  - 'Creating awx_redis    ... '
  - Creating awx_postgres ... done
  - Creating awx_redis    ... done
  - 'Creating awx_web      ... '
  - Creating awx_web      ... done
  - 'Creating awxcompose_task_run ... '
  - Creating awxcompose_task_run ... done
  - 'Traceback (most recent call last):'
  - '  File "/usr/bin/awx-manage", line 8, in <module>'
  - '    sys.exit(manage())'
  - '  File "/var/lib/awx/venv/awx/lib/python3.9/site-packages/awx/__init__.py", line 138, in manage'
  - '    prepare_env()'
  - '  File "/var/lib/awx/venv/awx/lib/python3.9/site-packages/awx/__init__.py", line 97, in prepare_env'
  - '    if not settings.DEBUG: # pragma: no cover'
  - '  File "/var/lib/awx/venv/awx/lib/python3.9/site-packages/django/conf/__init__.py", line 82, in __getattr__'
  - '    self._setup(name)'
  - '  File "/var/lib/awx/venv/awx/lib/python3.9/site-packages/django/conf/__init__.py", line 69, in _setup'
  - '    self._wrapped = Settings(settings_module)'
  - '  File "/var/lib/awx/venv/awx/lib/python3.9/site-packages/django/conf/__init__.py", line 190, in __init__'
  - '    raise ImproperlyConfigured('
  - 'django.core.exceptions.ImproperlyConfigured: PASSWORD_RESET_TIMEOUT_DAYS/PASSWORD_RESET_TIMEOUT are mutually exclusive.'

Additional information

Requirements.txt file:

boto3==1.25.0
botocore==1.28.0
diskcache==4.1.0
ansible==8.5.0
ansible-core==2.15.9
ansible-cached-lookup==1.0.0
ansible-tower-cli==3.3.9
dnspython==2.6.1
future==0.18.3
nsxramlclient_py3==2.0.8
prettytable==0.7.2
psutil>=5.4.8
pymsteams==0.1.12
pyvmomi==6.7.3
# Azure requirements, coming from Ansible 2.8 (upcoming version)
packaging==21.3
paramiko==3.4.0
requests[security]==2.28.1
random-password-generator==2.2.0
azure-cli-core==2.56.0
azure-cli-nspkg==3.0.2
azure-mgmt-authorization==1.0.0
azure-mgmt-batch==15.0.0
azure-mgmt-cdn==3.0.0
azure-mgmt-compute==4.4.0
azure-mgmt-containerinstance==1.4.0
azure-mgmt-containerregistry==2.0.0
azure-mgmt-containerservice==4.4.0
azure-mgmt-dns==2.1.0
azure-mgmt-keyvault==1.1.0
azure-mgmt-marketplaceordering==0.1.0
azure-mgmt-monitor==0.5.2
azure-mgmt-network==2.3.0
azure-mgmt-nspkg==2.0.0
azure-mgmt-redis==5.0.0
azure-mgmt-resource==2.1.0
azure-mgmt-rdbms==1.4.1
azure-mgmt-servicebus==0.5.3
azure-mgmt-sql==0.10.0
azure-mgmt-storage==3.1.0
azure-mgmt-trafficmanager==0.50.0
azure-mgmt-web==0.41.0
azure-nspkg==2.0.0
azure-storage==0.35.1
msrest==0.6.1
msrestazure==0.6.4
azure-graphrbac==0.40.0
azure-mgmt-cosmosdb==0.5.2
azure-mgmt-hdinsight==0.1.0
azure-mgmt-devtestlabs==3.0.0
azure-mgmt-loganalytics==0.2.0
# Our local module Azure requirements, not in upstream:
azure-mgmt-msi==0.2.0
opencensus-ext-azure
opencensus-ext-logging
fluent-logger==0.9.6
certifi==2023.07.22

yum-requirements.txt file: expect

relrod commented 4 months ago

AWX 17.1.0 was released nearly three and a half years ago. Perhaps you can ask on the ansible forum and someone can help, but we don't support it anymore. We'd suggest upgrading to the latest version of AWX.