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

Upgrade ansible from 9 to 10 (ansible-core from 2.16 to 2.17) #11519

Open
tico88612 opened this issue Sep 9, 2024 · 13 comments · May be fixed by #11924
Open

Upgrade ansible from 9 to 10 (ansible-core from 2.16 to 2.17) #11519

tico88612 opened this issue Sep 9, 2024 · 13 comments · May be fixed by #11924
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.

Comments

@tico88612
Copy link
Member

tico88612 commented Sep 9, 2024

What would you like to be added

We would need to manually upgrade ansible to 10 (ansible-core 2.17).

Why is this needed

Our CI would fail the playbooks/ansible_version.yml check and ansible 9 will deprecated at Nov. 2024.

PR #11462

FYI: https://endoflife.date/ansible

@tico88612 tico88612 added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 9, 2024
@tico88612
Copy link
Member Author

tico88612 commented Sep 9, 2024

Unfortunately, if we upgrade ansible-core to 2.17, we cannot support Rocky Linux 8, openSUSE 15.5, RHEL 8, and Amazon Linux 2, which come with Python 3.6 pre-installed. However, the Managed node for ansible-core 2.17 requires Python 3.7 or higher.

ansible/ansible#83357

  • openSUSE 15.5: 31 Dec 2024
  • Amazon Linux 2: 30 Jun 2025
  • RHEL 8: (Maintenance Support) 31 May 2029
  • Rocky Linux 8: (Security EOL) 31 May 2029

@tico88612 tico88612 changed the title Upgrade ansible from 9 to 10 Upgrade ansible from 9 to 10 (ansible-core from 2.16 to 2.17) Oct 9, 2024
@NemesisRE
Copy link

Would it not be possible to allow 2.17.x as max version and still use 2.16 for the tests of those OS's

@tico88612
Copy link
Member Author

@NemesisRE Do you have a particular reason for updating the max version?

@NemesisRE
Copy link

NemesisRE commented Oct 9, 2024

I wanted to use an ansible host without the need of an extra venv just for kubespray

if kubespray wants to be compatible with RHEL 8 and Rocky Linux 8 will it use ansible 9 until 2029?

@tico88612
Copy link
Member Author

I wanted to use an ansible host without the need of an extra venv just for kubespray

Your PR would lead other users to believe this can be used with ansible-core version 2.17. Ansible 9 is based on ansible-core 2.16 and does not specify whether it is compatible with 2.17.

Creating Virtualenv is the recommended method, as it does not interfere with the original system's default version of Python.

FYI: https://kubespray.io/#/docs/ansible/ansible

if kubespray wants to be compatible with RHEL 8 and Rocky Linux 8 will it use ansible 9 until 2029?

With the current information, unfortunately, Yes.

Unless there comes a time when we think it will be more difficult to maintain (10 years is not a short time), we will consider removing support for systems that come with Python 3.6 pre-installed.

@NemesisRE
Copy link

so realistically we would need a matrix check to make sure the project is future proof

ansible version ansible-core version
9 >=2.16.0 <2.17.0
10 >=2.17.0 <2.18.0
11 >=2.18.0 <2.19.0

@NemesisRE
Copy link

exactly that's what I ment

@tico88612
Copy link
Member Author

/lifecycle frozen

@k8s-ci-robot k8s-ci-robot added the lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. label Oct 10, 2024
@yankay
Copy link
Member

yankay commented Jan 10, 2025

Hi @tico88612

If we use Conda to install the kubespray(not only the pip), would that resolve the issue?
Currently, some popular Python-based open-source projects are using similar approaches, such as

This way, Kubespray would no longer depend on the Python version installed on the server, allowing for broader usage.

@tico88612
Copy link
Member Author

If we use Conda to install the kubespray(not only the pip), would that resolve the issue?

No, this is related to the remote host's Python pre-install version, not for the control host's.

We need to first upgrade the Python version of the remote host before the remote host can be controlled by the new version of Ansible.

@yankay
Copy link
Member

yankay commented Jan 11, 2025

If we use Conda to install the kubespray(not only the pip), would that resolve the issue?

No, this is related to the remote host's Python pre-install version, not for the control host's.

We need to first upgrade the Python version of the remote host before the remote host can be controlled by the new version of Ansible.

Got it, Thanks @tico88612 .

@yankay
Copy link
Member

yankay commented Jan 13, 2025

There is a similar issue for the openshift-ansible openshift/openshift-ansible@a6bd995 .
It fixes the ansible version for rhel 8

There is also a blog about that https://www.jeffgeerling.com/blog/2024/newer-versions-ansible-dont-work-rhel-8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Projects
None yet
4 participants