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

Cluster setup fails for ubuntu 20.04 #683

Open
a1an77 opened this issue Aug 4, 2020 · 2 comments
Open

Cluster setup fails for ubuntu 20.04 #683

a1an77 opened this issue Aug 4, 2020 · 2 comments

Comments

@a1an77
Copy link

a1an77 commented Aug 4, 2020

I tried setting up a cluster with ubuntu 20.04 images and the play fails at step "Ensure Python is installed" with the following error:

"install-py2.sh: ERROR: Python interpreter '/usr/bin/python' not found, even after installation. Aborting."

@a1an77
Copy link
Author

a1an77 commented May 12, 2021

Just retried with the latest elasticluster version and the problem is still there, here follows an excerpt of the error message:

[...]
python2 (2.7.17-2ubuntu4) ...", "Selecting previously unselected package python-simplejson.", "Preparing to unpack .../python-simplejson_3.16.0-2ubuntu2_amd64.deb ...", "Unpacking python-simplejson (3.16.0-2ubuntu2) ...", "Setting up libpython2.7-stdlib:amd64 (2.7.18-120.04.1) ...", "Setting up python2.7 (2.7.18-120.04.1) ...", "Setting up libpython2-stdlib:amd64 (2.7.17-2ubuntu4) ...", "Setting up python2 (2.7.17-2ubuntu4) ...", "Setting up python-simplejson (3.16.0-2ubuntu2) ...", "Processing triggers for mime-support (3.64ubuntu1) ...", "Processing triggers for man-db (2.9.1-1) ...", "Reading package lists...", "Building dependency tree...", "Reading state information...", "eatmydata is already the newest version (105-7).", "0 upgraded, 0 newly installed, 0 to remove and 111 not upgraded.", "install-py2.sh: ERROR: Python interpreter '/usr/bin/python' not found, even after installation. Aborting."]}

In the generated inventory, the ansible python interpreter is set to /usr/bin/python+eatmydata which is present with the following content:
"""
#! /bin/sh

exec /usr/bin/eatmydata -- '/usr/bin/python' "$@"
"""

But /usr/bin/python does not exist on the system hence the following error when re-running setup:

TASK [Gathering Facts] **********************************************************************************************
fatal: [frontend001]: FAILED! => {"ansible_facts": {}, "changed": false, "failed_modules": {"setup": {"failed": true, "module_stderr": "/usr/bin/eatmydata: 83: exec: /usr/bin/python: not found\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 127}}, "msg": "The following modules failed to execute: setup\n"}


$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal

@a1an77
Copy link
Author

a1an77 commented May 12, 2021

The use of python3 by default and removed support for python2 are likely the cause.


Python3 by default

In 20.04 LTS, the python included in the base system is Python 3.8. Python 2.7 has been moved to universe and is not included by default in any new installs.

Remaining packages in Ubuntu which require Python 2.7 have been updated to use /usr/bin/python2 as their interpreter, and /usr/bin/python is not present by default on any new installs. On systems upgraded from previous releases, /usr/bin/python will continue to point to python2 for compatibility. Users who require /usr/bin/python for compatibility on newly-installed systems are encouraged to install the python-is-python3 package, for a /usr/bin/python pointing to python3 instead.

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

No branches or pull requests

1 participant