Open xdkreij opened 11 months ago
Thanks for reporting, we'll have a look into this. Internal ticket TRIX-389
Indeed, the changed path is not (yet) anticipated for.
The full traceback is:
File "/tmp/ansible_ansible.builtin.pip_payload_gd_n4f6i/ansible_ansible.builtin.pip_payload.zip/ansible/module_utils/basic.py", line 1443, in get_bin_path
bin_path = get_bin_path(arg=arg, opt_dirs=opt_dirs)
File "/tmp/ansible_ansible.builtin.pip_payload_gd_n4f6i/ansible_ansible.builtin.pip_payload.zip/ansible/module_utils/common/process.py", line 44, in get_bin_path
raise ValueError('Failed to find required executable "%s" in paths: %s' % (arg, os.pathsep.join(paths)))
fatal: [d-vcpu-srv-01]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"chdir": null,
"editable": false,
"executable": null,
"extra_args": "--upgrade",
"name": [
"https://updates.clustervision.com/trinityx/14/additional/noarch/pip/stable/config-manager/trinityx_config_manager-2.0.latest-py3-none-any.whl"
],
"requirements": null,
"state": "present",
"umask": null,
"version": null,
"virtualenv": "/trinity/local/python",
"virtualenv_command": "virtualenv",
"virtualenv_python": null,
"virtualenv_site_packages": false
}
},
"msg": "Failed to find required executable \"virtualenv\" in paths: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/sbin"
}
It still breaks, even when the path is correct
Simply because the python package 'python3-virtualenv.noarch' isn't being installed
Task completes fine after manual installation. Adding the package as a prerequisite should solve that
TASK [trinity/config-manager : Install config_manager pip package] **************************************************************************************************************
changed: [d-vcpu-srv-01] => {"changed": true, "cmd": ["/trinity/local/python/bin/pip3", "install", "--upgrade", "https://updates.clustervision.com/trinityx/14/additional/noarch/pip/stable/config-manager/trinityx_config_manager-2.0.latest-py3-none-any.whl"], "name": ["https://updates.clustervision.com/trinityx/14/additional/noarch/pip/stable/config-manager/trinityx_config_manager-2.0.latest-py3-none-any.whl"], "requirements": null, "state": "present", "stderr": "WARNING: You are using pip version 21.3.1; however, version 23.3.2 is available.\nYou should consider upgrading via the '/trinity/local/python/bin/platform-python -m pip install --upgrade pip' command.\n", "stderr_lines": ["WARNING: You are using pip version 21.3.1; however, version 23.3.2 is available.", "You should consider upgrading via the '/trinity/local/python/bin/platform-python -m pip install --upgrade pip' command."], "stdout": "Using base prefix '/usr'\nNew python executable in /trinity/local/python/bin/platform-python\nAlso creating executable in /trinity/local/python/bin/python\nInstalling setuptools, pip, wheel...done.\nRunning virtualenv with interpreter /usr/libexec/platform-python\nCollecting trinityx-config-manager==2.0.latest\n Using cached https://updates.clustervision.com/trinityx/14/additional/noarch/pip/stable/config-manager/trinityx_config_manager-2.0.latest-py3-none-any.whl (1.8 kB)\nInstalling collected packages: trinityx-config-manager\nSuccessfully installed trinityx-config-manager-2.0.1700240422\n", "stdout_lines": ["Using base prefix '/usr'", "New python executable in /trinity/local/python/bin/platform-python", "Also creating executable in /trinity/local/python/bin/python", "Installing setuptools, pip, wheel...done.", "Running virtualenv with interpreter /usr/libexec/platform-python", "Collecting trinityx-config-manager==2.0.latest", " Using cached https://updates.clustervision.com/trinityx/14/additional/noarch/pip/stable/config-manager/trinityx_config_manager-2.0.latest-py3-none-any.whl (1.8 kB)", "Installing collected packages: trinityx-config-manager", "Successfully installed trinityx-config-manager-2.0.1700240422"], "version": null, "virtualenv": "/trinity/local/python"}
TASK [trinity/config-manager : Symlink '/trinity/local/python/bin/trix-config-manager' to '/trinity/local/sbin/trix-config-manager'] ********************************************
changed: [d-vcpu-srv-01] => {"changed": true, "dest": "/trinity/local/sbin/trix-config-manager", "gid": 0, "group": "root", "mode": "0777", "owner": "root", "secontext": "unconfined_u:object_r:unlabeled_t:s0", "size": 45, "src": "/trinity/local/python/bin/trix-config-manager", "state": "link", "uid": 0}
we're looking into using OS/distribution python instead of our own bundled version as python 3.11 is widely available now. not sure when it'll be released. testing is ongoing.
On RHEL 8.6
Error
file - roles/trinity/config-manager/tasks/main.yml
group_vars/all.yml
ls /trinity_local/
where's the venv? there it is!!
Another statically defined path is most likely the root cause
Expected results