All package related tasks fail in Rawhide cloud images:
Could not import the libdnf5 python module using /usr/bin/python3 (3.12.3 (main, Apr 17 2024, 00:00:00) [GCC 14.0.1 20240411 (Red Hat 14.0.1-0)]). Please install python3-libdnf5 package or ensure you have specified the correct ansible_python_interpreter. (attempted ['/usr/libexec/platform-python', '/usr/bin/python3', '/usr/bin/python2', '/usr/bin/python'])
See: - https://fedora.softwarefactory-project.io/zuul/build/366bf54c2f8e47679e58529c42f1ef4d - https://pagure.io/workstation-ostree-config/pull-request/525
Looks like it's dnf5 that is broken in those images. Switching back to F40 & dnf4 works.
This might be Python 3.13 related.
This also seems to have borked STI tests (Zuul and non-Zuul).
See e.g. https://src.fedoraproject.org/rpms/python-packaging/pull-request/32
STI worked at https://src.fedoraproject.org/rpms/python3.13/pull-request/66
Some notes:
rpm-test-install runs the following playbook:
https://pagure.io/zuul-distro-jobs/blob/master/f/roles/repo-install-rpm/tasks/main.yaml
And fails on the first task:
- name: Install system dependencies yum: name: - dnf-utils - curl
I can reproduce the original error in fedora:rawhide container by installing packaged ansible without weak deps and running ansible localhost -m yum -a "name=dnf-utils,curl"
ansible localhost -m yum -a "name=dnf-utils,curl"
Now if we install ansible with weak deps, python3-libdnf5 is installed and the task runs correctly.
=> Therefore I am trying to adjust the Zuul job to install python3-libdnf5 before running the task.
I created a PR, so that we use simple shell module to call dnf install command and install python3-libdnf5 package:
https://pagure.io/fedora-zuul-jobs/pull-request/188#request_diff
I am triggering test pull request with Depends-On on that change in
https://src.fedoraproject.org/rpms/rust-afterburn/pull-request/35
The dependency is installed correctly, and import works, but now the same Ansible task fails with a different error:
2024-06-21 21:47:29.357466 | 2024-06-21 21:47:29.357674 | TASK [repo-install-rpm : Install system dependencies] 2024-06-21 21:47:30.032313 | cloud-host | MODULE FAILURE: 2024-06-21 21:47:30.032502 | cloud-host | Traceback (most recent call last): 2024-06-21 21:47:30.032537 | cloud-host | File "<stdin>", line 107, in <module> 2024-06-21 21:47:30.032563 | cloud-host | File "<stdin>", line 99, in _ansiballz_main 2024-06-21 21:47:30.032591 | cloud-host | File "<stdin>", line 47, in invoke_module 2024-06-21 21:47:30.032616 | cloud-host | File "<frozen runpy>", line 226, in run_module 2024-06-21 21:47:30.032643 | cloud-host | File "<frozen runpy>", line 98, in _run_module_code 2024-06-21 21:47:30.032667 | cloud-host | File "<frozen runpy>", line 88, in _run_code 2024-06-21 21:47:30.032690 | cloud-host | File "/tmp/ansible_ansible.legacy.dnf5_payload_1fu43rku/ansible_ansible.legacy.dnf5_payload.zip/ansible/modules/dnf5.py", line 708, in <module> 2024-06-21 21:47:30.032714 | cloud-host | File "/tmp/ansible_ansible.legacy.dnf5_payload_1fu43rku/ansible_ansible.legacy.dnf5_payload.zip/ansible/modules/dnf5.py", line 704, in main 2024-06-21 21:47:30.032736 | cloud-host | File "/tmp/ansible_ansible.legacy.dnf5_payload_1fu43rku/ansible_ansible.legacy.dnf5_payload.zip/ansible/modules/dnf5.py", line 487, in run 2024-06-21 21:47:30.032758 | cloud-host | AttributeError: 'Base' object has no attribute 'load_config_from_file'
This error is not reproducible in the standard rawhide container, so it seems to be caused by a specific ansible setup in the image used by Zuul.
One option is just not use ansible module and rather run a shell command https://pagure.io/zuul-distro-jobs/pull-request/147
Test with this PR applied passed
https://fedora.softwarefactory-project.io/zuul/status/change/35,7dfd7607e8218a3189cb9a12bcffbcfeb3f30ffd
After re-reading, I think I have mixed a couple of issues here, which are similar but not the same.
From what I can see all three are fixed now.
Metadata Update from @bookwar: - Issue status updated to: Closed (was: Open)
Thanks for looking at it. I don't know what or where the problem is but it's not fixed for me: https://pagure.io/workstation-ostree-config/pull-request/531
Metadata Update from @siosm: - Issue status updated to: Open (was: Closed)
@siosm hi, you have your own zuul job, edit with the fix:
https://pagure.io/workstation-ostree-config/blob/main/f/ci/validate.yaml
I do believe you need to install python3-libdnf5
python3-libdnf5
@bookwar Thanks.
I manually installed python3-libdnf5 and updated all packages before running another package step and I got:
Traceback (most recent call last): File "<stdin>", line 107, in <module> File "<stdin>", line 99, in _ansiballz_main File "<stdin>", line 47, in invoke_module File "<frozen runpy>", line 226, in run_module File "<frozen runpy>", line 98, in _run_module_code File "<frozen runpy>", line 88, in _run_code File "/tmp/ansible_ansible.legacy.dnf5_payload_woba1una/ansible_ansible.legacy.dnf5_payload.zip/ansible/modules/dnf5.py", line 708, in <module> File "/tmp/ansible_ansible.legacy.dnf5_payload_woba1una/ansible_ansible.legacy.dnf5_payload.zip/ansible/modules/dnf5.py", line 704, in main File "/tmp/ansible_ansible.legacy.dnf5_payload_woba1una/ansible_ansible.legacy.dnf5_payload.zip/ansible/modules/dnf5.py", line 487, in run AttributeError: 'Base' object has no attribute 'load_config_from_file'
I don't know if that's an Ansible bug or a Fedora one.
This was fixed in ansible upstream in https://github.com/ansible/ansible/commit/4e57249d594dd93f5278da16113cbadace5a51e1
I don't know if this needs to be backported to rawhide or somewhere else.
Considering this is runnign from some zip, I am afraid backporting that to the Fedora package won't help.
FWIW ansible-core 2.16.8 is in Rawhide already has that
Log in to comment on this ticket.