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

'dnf' dies with dnf5-backend #1077

Open
philfry opened this issue May 16, 2024 · 0 comments
Open

'dnf' dies with dnf5-backend #1077

philfry opened this issue May 16, 2024 · 0 comments
Labels
affects-0.3 Issues related to 0.3.X Mitogen releases bug Code feature that hinders desired execution outcome

Comments

@philfry
Copy link
Contributor

philfry commented May 16, 2024

Hi,

I just ran into this problem after switching from dnf3 to dnf5 in my Fedora machines.

Preparation: install python3-dnf5 on the managed host
Playbook:

---
- hosts: ansible-test-100
  tasks:
    - dnf: use_backend=dnf5 name=bash,glibc
    - dnf: use_backend=dnf5 name=foo,bar state=absent

Backtrace:

Traceback (most recent call last):
  File "master:/.../mitogen/ansible_mitogen/runner.py", line 1056, in _run
    self._run_code(code, mod)
  File "master:/.../mitogen/ansible_mitogen/runner.py", line 1020, in _run_code
    exec(code, vars(mod))
  File "master:/usr/lib/python3.12/site-packages/ansible/modules/dnf5.py", line 717, in <module>
  File "master:/usr/lib/python3.12/site-packages/ansible/modules/dnf5.py", line 713, in main
  File "master:/usr/lib/python3.12/site-packages/ansible/modules/dnf5.py", line 521, in run
  File "/usr/lib64/python3.12/site-packages/libdnf5/logger.py", line 459, in __init__
    _logger.GlobalLogger_swiginit(self, _logger.new_GlobalLogger())
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: libdnf5/logger/global_logger.cpp:33: libdnf5::GlobalLogger::GlobalLogger(): API Assertion 'librepo_logger == nullptr' failed: Only one GlobalLogger can exist at a time

The problem doesn't show up if you have only one dnf task.

  • Which version of Ansible are you running? → 2.16.6
  • Have you tried the latest master version from Git? → yes
  • Mention your host and target OS and versions → Fedora 39
  • Mention your host and target Python versions → 3.12.3
  • If reporting a crash or hang in Ansible, please rerun with -vvv and include
    200 lines of output around the point of the error, along with a full copy of
    any traceback or error text in the log. Beware "-vvv" may include secret
    data! Edit as necessary before posting.
    dnf5.bt.txt
@philfry philfry added affects-0.3 Issues related to 0.3.X Mitogen releases bug Code feature that hinders desired execution outcome labels May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-0.3 Issues related to 0.3.X Mitogen releases bug Code feature that hinders desired execution outcome
Projects
None yet
Development

No branches or pull requests

1 participant