Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission denied for launch_awx.sh and launch_awx_task.sh #7545

Closed
cfelder opened this issue Jul 3, 2020 · 4 comments · Fixed by #7552
Closed

Permission denied for launch_awx.sh and launch_awx_task.sh #7545

cfelder opened this issue Jul 3, 2020 · 4 comments · Fixed by #7552
Labels

Comments

@cfelder
Copy link

cfelder commented Jul 3, 2020

ISSUE TYPE
  • Bug Report
SUMMARY

I am currently working on updating @ikke-t awx_pod playbook for using awx 13.

My deployment is a bit different from the installation instructions here, but I would expect that the error below appears when using e.g. docker-compose as well.

I am using the following image: docker.io/ansible/awx:13.0.0

The following files have permissions 0700:

  • /usr/bin/launch_awx.sh
  • /usr/bin/launch_awx_task.sh

which leads to issues when running docker.io/ansible/awx:13.0.0 with non-root user 1000

imho this files should have 0755.

ENVIRONMENT
  • AWX version: 13.0.0
  • AWX install method: podman / awx_pod playbook
  • Ansible version: 2.9.10
  • Operating System: EL8 (CentOS 8)
STEPS TO REPRODUCE
$ ansible-playbook -K -i centos-8, awx-install.yml
$ podman logs -f awx_awxweb
$ podman logs -f awx_awxtask
EXPECTED RESULTS
RESULT 2
OK
ACTUAL RESULTS

Permission denied for launch_awx.sh and launch_awx_task.sh

$ podman logs awx_awxweb
/bin/sh: /usr/bin/launch_awx.sh: Permission denied

$ podman logs awx_awxtask
/bin/sh: /usr/bin/launch_awx_task.sh: Permission denied
ADDITIONAL INFORMATION

Creating a derived container using

RUN chmod 755 /usr/bin/launch_awx*.sh

resolves this issue.

@awxbot awxbot added the type:bug label Jul 3, 2020
@Archer4l
Copy link

Archer4l commented Jul 5, 2020

This problem also actual for 12.0.0 and on 13.0.0 we need to install python-memcache

2020-07-05 00:15:54,997 INFO Listening on TCP address 127.0.0.1:8051
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/wsgi.py", line 39, in
application = get_wsgi_application()
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/core/wsgi.py", line 13, in get_wsgi_application
return WSGIHandler()
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/core/handlers/wsgi.py", line 135, in init
self.load_middleware()
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/core/handlers/base.py", line 35, in load_middleware
middleware = import_string(middleware_path)
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/utils/module_loading.py", line 17, in import_string
module = import_module(module_path)
File "/var/lib/awx/venv/awx/lib64/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/sso/middleware.py", line 15, in
from social_django import utils
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/social_django/utils.py", line 13, in
BACKENDS = settings.AUTHENTICATION_BACKENDS
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/conf/settings.py", line 500, in getattr_without_cache
return getattr(self._wrapped, name)
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/conf/settings.py", line 413, in getattr
value = self._get_local(name)
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/conf/settings.py", line 329, in _get_local
self._preload_cache()
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/conf/settings.py", line 283, in _preload_cache
if self.cache.get('_awx_conf_preload_expires', default=empty) is not empty:
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/conf/settings.py", line 137, in get
value = self.cache.get(key, **kwargs)
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/core/cache/init.py", line 98, in getattr
return getattr(caches[DEFAULT_CACHE_ALIAS], name)
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/core/cache/init.py", line 79, in getitem
cache = _create_cache(alias)
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/core/cache/init.py", line 54, in _create_cache
return backend_cls(location, params)
File "/var/lib/awx/venv/awx/lib/python3.6/site-packages/django/core/cache/backends/memcached.py", line 151, in init
import memcache
ModuleNotFoundError: No module named 'memcache'
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. going in full dynamic mode ***

I fixed all problem via RUN chmod 0755 /usr/bin/launch_awx*.sh && /var/lib/awx/venv/awx/bin/pip3 install python-memcached

@cfelder
Copy link
Author

cfelder commented Jul 5, 2020

FYI: The second issue about the missing memcache module in awx venv has been reported here #7544

@ikke-t
Copy link
Contributor

ikke-t commented Jul 6, 2020

the permissions would be fixed here I believe, if someone could review it please. 6c107db

@cfelder
Copy link
Author

cfelder commented Jul 6, 2020

the permissions would be fixed here I believe, if someone could review it please. 6c107db

lgtm 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants