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

community.general.dnf_config_manager Hangs on repolist after activating repository #8830

Open
1 task done
OrioQuezac opened this issue Sep 5, 2024 · 2 comments
Open
1 task done
Labels
bug This issue/PR relates to a bug module module plugins plugin (any type)

Comments

@OrioQuezac
Copy link

Summary

When using community.general.dnf_config_manager, the process gets stuck after activating a repository (like PGDG extras repository). The module performs the following steps:

  1. Lists existing repositories to check if the target repository is available and whether it is active. This step completes successfully.
  2. Activates the repository if necessary.
  3. Runs a second repolist to verify if the repository was activated (I think).

At this point, the process hangs, as dnf requests the import of the GPG key for the repository.

Issue Type

Bug Report

Component Name

dnf_config_manager

Ansible Version

$ ansible --version
ansible [core 2.17.3]
  config file = /home/orio/Documents/work/logs_monit/ansible.cfg
  configured module search path = ['/home/orio/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/orio/.local/pipx/venvs/ansible/lib/python3.11/site-packages/ansible
  ansible collection location = /home/orio/.ansible/collections:/usr/share/ansible/collections
  executable location = /home/orio/.local/bin/ansible
  python version = 3.11.2 (main, Aug 26 2024, 07:20:54) [GCC 12.2.0] (/home/orio/.local/pipx/venvs/ansible/bin/python)
  jinja version = 3.1.4
  libyaml = True

Community.general Version

$ ansible-galaxy collection list community.general

# /home/orio/.ansible/collections/ansible_collections
Collection        Version
----------------- -------
community.general 9.3.0  

# /home/orio/.local/pipx/venvs/ansible/lib/python3.11/site-packages/ansible_collections
Collection        Version
----------------- -------
community.general 9.3.0  

Configuration

$ ansible-config dump --only-changed

OS / Environment

No response

Steps to Reproduce

  1. Install PGDG repositories on managed nodes
  2. Run a playbook with dnf_config_manager module in it to enable pgdg-rhel9-extras :
- name: Ensure the PGDG Extra repository is enabled
  community.general.dnf_config_manager:
    name: pgdg-rhel9-extras
    state: enabled

Expected Results

The dnf_config_manager module should complete the repository activation process without blocking. After repository activation, if the GPG key needs to be imported, the module should handle this automatically (perhaps by adding --assumeyes to the repolist command).

Actual Results

Task with this module hangs.

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module module plugins plugin (any type) labels Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug module module plugins plugin (any type)
Projects
None yet
Development

No branches or pull requests

2 participants