kubernetes-sigs / kubespray

Deploy a Production Ready Kubernetes Cluster
Apache License 2.0
16.15k stars 6.47k forks source link

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

Open tico88612 opened 1 month ago

tico88612 commented 1 month ago

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 commented 1 month ago

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.

https://github.com/ansible/ansible/issues/83357

NemesisRE commented 4 weeks ago

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 commented 4 weeks ago

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

NemesisRE commented 4 weeks ago

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 commented 4 weeks ago

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 commented 4 weeks ago

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
tico88612 commented 4 weeks ago
image

Ref: https://docs.ansible.com/ansible/latest/reference_appendices/release_and_maintenance.html#ansible-community-changelogs

NemesisRE commented 4 weeks ago

exactly that's what I ment

tico88612 commented 3 weeks ago

/lifecycle frozen