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

TASK: add python3-libdnf5 to default install for ansible? #211

Open
yselkowitz opened this issue Nov 26, 2024 · 9 comments
Open

TASK: add python3-libdnf5 to default install for ansible? #211

yselkowitz opened this issue Nov 26, 2024 · 9 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@yselkowitz
Copy link
Member

What does the ELN SIG need to do?

Following up to the switch to dnf5 (#201), it may be necessary to explicitly add python3 and python3-libdnf5[1] to the ELN installation set, with the exception of -minimal containers (or the like), for the purposes of allowing ansible-driven management in general, as well as package installation in particular, out of the box. While with dnf-4 the presence of python3 and python3-dnf was a given (and similarly with yum before that), with dnf5 (whose implementation is C++) neither can be assumed.

To that end, we need to determine, and then implement as appropriate:

  • Which types of images should contain python3 and python3-libdnf5 by default for the purposes of ansible management?
  • The ansible.default.dnf5 module was added in ansible-core 2.15. It looks like all supported Fedora versions as well as RHEL/CS 8 and 10 would cover this, but RHEL 9 is still on 2.14. Do we need to include python3-dnf to support that case (or anything else with an old ansible-core)?
  • Are there other Python modules that should be present on such images for commonly-used ansible modules?

[1] https://docs.ansible.com/ansible/latest/collections/ansible/builtin/dnf5_module.html

@yselkowitz yselkowitz added question Further information is requested Meeting Topics for discussion at the weekly meeting labels Nov 26, 2024
@sgallagher
Copy link
Member

@dcantrell Could you help answer some of these questions?

@yselkowitz
Copy link
Member Author

Data:

  • The ELN base container image does not even include python3
  • The ELN generic cloud image includes python3 but not python3-libdnf5 (nor python3-dnf)
  • The "default" custom installation option of ELN with Anaconda includes python3 and python3-dnf (because of subscription-manager, see TASK: Drop remnants of dnf-4 #206) but not python3-libdnf5

@yselkowitz yselkowitz added help wanted Extra attention is needed and removed Meeting Topics for discussion at the weekly meeting labels Jan 10, 2025
@dcantrell
Copy link

At this point RHEL 9 will continue with dnf4 and RHEL 10 is slated to have dnf4. RHEL will not gain dnf5 until RHEL 11.

Some people have asked about dnf5 in EPEL-10, but I don't know if we want to go down that path or not.

IMHO, dnf5 needs a bit more stabilization time before it's ready for the EL crowd.

@yselkowitz
Copy link
Member Author

@dcantrell this is regarding ELN (the future RHEL 11). Based on the assumption that dnf5 will replace dnf4 in RHEL 11, could you please advise on the above?

@dcantrell
Copy link

dnf5 will replace dnf4 in RHEL 11, yes. So ELN should have that. We already made that change in Fedora, so if ELN has dnf now then it would be dnf5 (or at least should be).

@yselkowitz
Copy link
Member Author

@dcantrell Right, but based on that, could you please review the questions in the ticket itself and advice accordingly?

@dcantrell
Copy link

I probably don't know enough about ansible. Is ansible written in Python? If so, you will likely need python3-libdnf5 if you want to use dnf5 in ansible.

With dnf5 being rewritten in C++, there are other language binding options. You can use the C++ library directly and remove the need for Python on the system entirely. But again, I don't know much about ansible.

@sgallagher
Copy link
Member

I probably don't know enough about ansible. Is ansible written in Python? If so, you will likely need python3-libdnf5 if you want to use dnf5 in ansible.

Yes, Ansible is written in Python.

With dnf5 being rewritten in C++, there are other language binding options. You can use the C++ library directly and remove the need for Python on the system entirely. But again, I don't know much about ansible.

Everything Ansible does relies on Python on the target system.

@dcantrell
Copy link

So then any ELN system with ansible will need python3-libdnf5 and its requirements for dnf5 functionality in ansible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants