Description of problem: With https://github.com/RedHatInsights/insights-core/pull/1855 we added logging of the client versions to the insights-client.log but the path we specify is incorrect and will fail on RHEL8 systems which do not have python installed. The correct path should be /usr/libexec/platform-python. Version-Release number of selected component (if applicable): This was introduced in 3.0.112-1 How reproducible: 100% Steps to Reproduce: 1. Set up a which does not have python2 or python3 installed 2. Excecute insights-client --register 3. Weep Actual results: # insights-client Fatal error Traceback (most recent call last): File "/var/lib/insights/last_stable.egg/insights/client/phase/v1.py", line 32, in _f func(client, config) File "/var/lib/insights/last_stable.egg/insights/client/phase/v1.py", line 131, in post_update print_egg_versions() File "/var/lib/insights/last_stable.egg/insights/client/utilities.py", line 262, in print_egg_versions env={'PYTHONPATH': egg, 'PATH': os.getenv('PATH')}, stdout=PIPE, stderr=STDOUT) File "/usr/lib64/python3.6/subprocess.py", line 729, in __init__ restore_signals, start_new_session) File "/usr/lib64/python3.6/subprocess.py", line 1364, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'python': 'python' Starting to collect Insights data for my-rhel8-system-without-python Expected results: same, but with less tracebacking because no one wants to see that. Also the version isn't being logged, which was the motivation when introducing this bug. Additional info: The quality engineering group is sorry that we let this bug escape and will do better in the future.
*** Bug 1733959 has been marked as a duplicate of this bug. ***
*** Bug 1734404 has been marked as a duplicate of this bug. ***
The correct path can be obtained with: import sys interpreter_path = sys.executable Please use that when launching Python from Python's subprocess, rather than hardcoding the path.
*** Bug 1734739 has been marked as a duplicate of this bug. ***
This was fixed in core version 3.0.115-1, which is currently available.
Thanks. Just to confirm, it works as expected on my systems.