Hi,
I inherited an AWX installation that has in SETTINGS / SYSTEM a “Custom virtual environment paths” to /data/virtualenv
I’m running AWX 15.0.1
AWX is running in a docker container where this path is a mounted
/dev/mapper/vg_data-lv_data 51339744 20523380 28178748 43% /data/virtualenv
I am able to source these venv’s from the command line within the awx_web and awx_task containers.
Whenever i try to use these venvs from an AWX template, AWX is unable to find the venv end returns a failed job with the following error message:
Traceback (most recent call last): File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/awx/main/tasks.py”, line 1501, in run res = ansible_runner.interface.run(**params) File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/ansible_runner/interface.py”, line 178, in run r.run() File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/ansible_runner/runner.py”, line 179, in run use_poll=self.config.pexpect_use_poll, File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/pexpect/pty_spawn.py”, line 204, in init self._spawn(command, args, preexec_fn, dimensions) File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/pexpect/pty_spawn.py”, line 303, in _spawn cwd=self.cwd, **kwargs) File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/pexpect/pty_spawn.py”, line 314, in _spawnpty return ptyprocess.PtyProcess.spawn(args, **kwargs) File “/var/lib/awx/venv/awx/lib/python3.6/site-packages/ptyprocess/ptyprocess.py”, line 330, in spawn raise exception OSError: [Errno 2] No such file or directory: b’/data/virtualenv/ftth_ng/bin/ansible-playbook’
If i am able to source the venv from the cli within containers, should AWX not also be able to find this?
docker exec -it awx_task /bin/bash
bash-4.4# source /data/virtualenv/ftth_config_ng/bin/activate
(ftth_config_ng) bash-4.4#
docker exec -it awx_web /bin/bash
bash-4.4# source /data/virtualenv/ftth_config_ng/bin/activate
(ftth_config_ng) bash-4.4#
As i am far from an AWX or docker expert, i don’t get/see where the problem lies, if someone could point me in the right direction.
Thank you in advance.
Kind regards,
Thijn