See https://github.com/ansible/ansible/issues/84206 . Since Fedora 41, ansible can no longer assume that all the packages it needs to do 'package stuff' are present on a typical Fedora install.
Up till Fedora 40, dnf depended on python3-dnf, ansible could use that, and all was fine. In Fedora 41, dnf (which is now dnf 5) does not depend on any python stuff at all, and so on an OOTB F41, ansible can't manage packages.
ansible < 2.15 didn't have dnf 5 support, so it always needs python3-dnf. ansible > 2.15 has dnf 5 support, so on f41+ hosts it will try and use dnf 5, and that needs python3-libdnf5.
ansible 2.19 solves this by having a mechanism to automatically install the packages it needs. But we don't have ansible 2.19. Fedora zuul jobs appear to be run with ansible 2.15 (which is the current version on RHEL 8). That means we ought to install python3-libdnf5 on F41+ workers (whether VM or container), so that jobs can install package successfully.
I can work around this in each individual project's repo with something like this:
- name: Ensure that python3-libdnf5 is installed block: - name: Check whether python3-libdnf5 is installed ansible.builtin.command: "rpm -q python3-libdnf5" register: p3dnf5 failed_when: "1 != 1" changed_when: "1 != 1" check_mode: no - name: Install python3-libdnf5 with direct dnf command ansible.builtin.command: "dnf -y install python3-libdnf5" when: "p3dnf5.rc != 0"
but it's kinda ugly. It'd be much nicer if this was just handled by the system.
I can't figure out exactly where or how to do this, so I'm filing this ticket.
Hi Adam,
Thanks for the report and sorry for the late reply.
The cloud workers have python-libdnf5:
ssh zuul-worker@38.102.83.47 "cat /etc/redhat-release; rpm -qa | grep python3-libdnf5" Fedora release 41 (Forty One) python3-libdnf5-5.2.11.0-1.fc41.x86_64
ssh zuul-worker@38.102.83.153 "cat /etc/redhat-release; rpm -qa | grep python3-libdnf5" Fedora release 42 (Adams) python3-libdnf5-5.2.11.0-1.fc42.x86_64
ssh zuul-worker@38.129.56.34 "cat /etc/redhat-release; rpm -qa | grep python3-libdnf5" Fedora release 43 (Rawhide) python3-libdnf5-5.2.11.0-1.fc43.x86_64
The container worker f41 does not have the package python-libdnf5:
podman run -it --rm ab96860d0caa bash-5.2# cat /etc/redhat-release Fedora release 41 (Forty One) bash-5.2# rpm -qa | grep libdnf5 libdnf5-5.2.10.0-2.fc41.x86_64 libdnf5-cli-5.2.10.0-2.fc41.x86_64
The Zuul current version we are running for Fedora is Zuul 11.0 and have not scheduled to update that version because we are working on moving the infra on OpenShift, this new infra will get the latest Zuul > 11.3 based on Ansible 9 (https://zuul-ci.org/docs/zuul/latest/releasenotes.html#relnotes-11-2-0-upgrade-notes) .
So AFAIU, we need the f41 container to get the python-libdnf5 installed. So here is the change: https://softwarefactory-project.io/r/c/containers/+/33283
Great. When will that be 'deployed'? If you let me know, I can take the workaround out of my projects and check that CI still works.
Hi, this is merged so that should have been deployed already. Please try to remove the workaround and let me know.
Looks good. Thanks!
Cool, then let me close that issue. Please re-open if needed.
Metadata Update from @fbo: - Issue status updated to: Closed (was: Open)