Skip to content

make awx-kube-build error, missing AWX_SETTINGS_FILE #16107

@woodbb

Description

@woodbb

Please confirm the following

  • I agree to follow this project's code of conduct.
  • I have checked the current issues for duplicates.
  • I understand that AWX is open source software provided for free and that I might not receive a timely response.
  • I am NOT reporting a (potential) security vulnerability. (These should be emailed to [email protected] instead.)

Bug Summary

make awx-kube-build errors, missing AWX_SETTINGS_FILE

AWX version

trying to build from source

Select the relevant components

  • UI
  • UI (tech preview)
  • API
  • Docs
  • Collection
  • CLI
  • Other

Installation method

kubernetes

Modifications

no

Ansible version

2.16.14

Operating system

Fedora

Web browser

No response

Steps to reproduce

clone repo and run "make awx-kube-build"

Expected results

Custom AWX images

Actual results

=> [builder 14/15] RUN make sdist && /var/lib/awx/venv/awx/bin/pip install dist/awx.tar.gz 49.1s
=> ERROR [builder 15/15] RUN DJANGO_SETTINGS_MODULE=awx.settings.defaults SKIP_SECRET_KEY_CHECK=yes SKIP_PG_VERSION_C 2.6s

[builder 15/15] RUN DJANGO_SETTINGS_MODULE=awx.settings.defaults SKIP_SECRET_KEY_CHECK=yes SKIP_PG_VERSION_CHECK=yes /var/lib/awx/venv/awx/bin/awx-manage collectstatic --noinput --clear:
2.291 Traceback (most recent call last):
2.291 File "/var/lib/awx/venv/awx/bin/awx-manage", line 8, in
2.291 sys.exit(manage())
2.292 ^^^^^^^^
2.292 File "/var/lib/awx/venv/awx/lib64/python3.11/site-packages/awx/init.py", line 77, in manage
2.292 prepare_env()
2.292 File "/var/lib/awx/venv/awx/lib64/python3.11/site-packages/awx/init.py", line 71, in prepare_env
2.292 if not settings.DEBUG: # pragma: no cover
2.292 ^^^^^^^^^^^^^^
2.292 File "/var/lib/awx/venv/awx/lib64/python3.11/site-packages/django/conf/init.py", line 102, in getattr
2.292 self._setup(name)
2.292 File "/var/lib/awx/venv/awx/lib64/python3.11/site-packages/django/conf/init.py", line 89, in _setup
2.293 self._wrapped = Settings(settings_module)
2.293 ^^^^^^^^^^^^^^^^^^^^^^^^^
2.293 File "/var/lib/awx/venv/awx/lib64/python3.11/site-packages/django/conf/init.py", line 217, in init
2.293 mod = importlib.import_module(self.SETTINGS_MODULE)
2.293 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2.293 File "/usr/lib64/python3.11/importlib/init.py", line 126, in import_module
2.293 return _bootstrap._gcd_import(name[level:], package, level)
2.293 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2.293 File "", line 1204, in _gcd_import
2.293 File "", line 1176, in _find_and_load
2.293 File "", line 1126, in _find_and_load_unlocked
2.293 File "", line 241, in _call_with_frames_removed
2.293 File "", line 1204, in _gcd_import
2.293 File "", line 1176, in _find_and_load
2.293 File "", line 1147, in _find_and_load_unlocked
2.293 File "", line 690, in _load_unlocked
2.293 File "", line 940, in exec_module
2.293 File "", line 241, in _call_with_frames_removed
2.293 File "/var/lib/awx/venv/awx/lib64/python3.11/site-packages/awx/settings/init.py", line 62, in
2.293 assert_production_settings(DYNACONF, settings_dir, settings_file_path)
2.293 File "/var/lib/awx/venv/awx/lib64/python3.11/site-packages/awx/settings/functions.py", line 86, in assert_production_settings
2.293 raise ImproperlyConfigured(msg)
2.294 django.core.exceptions.ImproperlyConfigured: No AWX configuration found at ['/etc/tower', '/etc/ansible-automation-platform/', '/etc/tower/conf.d/'].
2.294 Define the AWX_SETTINGS_FILE environment variable to specify an alternate path.


8 warnings found (use docker --debug to expand):

  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 22)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 23)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 96)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 97)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 98)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 99)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 20)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 21)
    Dockerfile:89

87 | RUN make sdist && /var/lib/awx/venv/awx/bin/pip install dist/awx.tar.gz
88 |
89 | >>> RUN DJANGO_SETTINGS_MODULE=awx.settings.defaults SKIP_SECRET_KEY_CHECK=yes SKIP_PG_VERSION_CHECK=yes /var/lib/awx/venv/awx/bin/awx-manage collectstatic --noinput --clear
90 |
91 |

ERROR: failed to build: failed to solve: process "/bin/sh -c DJANGO_SETTINGS_MODULE=awx.settings.defaults SKIP_SECRET_KEY_CHECK=yes SKIP_PG_VERSION_CHECK=yes /var/lib/awx/venv/awx/bin/awx-manage collectstatic --noinput --clear" did not complete successfully: exit code: 1
make: *** [Makefile:628: awx-kube-build] Error 1

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions