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

yum fails building wrong repoquery command on CentOS 7 #46603

Closed
DSpeichert opened this issue Oct 7, 2018 · 5 comments · Fixed by #46641
Closed

yum fails building wrong repoquery command on CentOS 7 #46603

DSpeichert opened this issue Oct 7, 2018 · 5 comments · Fixed by #46641
Assignees
Labels
affects_2.7 This issue/PR affects Ansible v2.7 bug This issue/PR relates to a bug. module This issue/PR relates to a module. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team.

Comments

@DSpeichert
Copy link
Contributor

SUMMARY

The repoquery command is wrong - it has missing parameter value for. -c when running any yum module action.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

yum

ANSIBLE VERSION
ansible 2.7.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 3.7.0 (default, Sep 15 2018, 19:13:07) [GCC 8.2.1 20180831]
CONFIGURATION
ANSIBLE_PIPELINING(/etc/ansible/ansible.cfg) = True
ANSIBLE_SSH_CONTROL_PATH(/etc/ansible/ansible.cfg) = /tmp/ansible-ssh-%%h-%%p-%%r
DEFAULT_BECOME_METHOD(/etc/ansible/ansible.cfg) = su
DEFAULT_FORCE_HANDLERS(/etc/ansible/ansible.cfg) = True
DEFAULT_HOST_LIST(/etc/ansible/ansible.cfg) = ['/etc/ansible/hosts']
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False
RETRY_FILES_ENABLED(/etc/ansible/ansible.cfg) = False
OS / ENVIRONMENT

CloudLinux 7 / CentOS 7

STEPS TO REPRODUCE

Any call to yum module fails, e.g.:

- yum:
    name: epel-release
    state: latest
EXPECTED RESULTS

Should work as on 2.6.

ACTUAL RESULTS

The repoquery command is wrong - it has missing parameter value for. -c

FAILED! => {"changed": false, "msg": "Error from repoquery: ['/usr/bin/repoquery', '--show-duplicates', '--plugins', '--quiet', '-c', None, '--disablerepo', '', '--enablerepo', '', '--qf', '%{epoch}:%{name}-%{version}-%{release}.%{arch}', 'epel-release']: Error accessing file for config file:///root/--disablerepo\nError accessing file for config file:///root/--disablerepo\n"}
@ansibot
Copy link
Contributor

ansibot commented Oct 7, 2018

Files identified in the description:

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

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Oct 7, 2018

@ansibot ansibot added affects_2.7 This issue/PR affects Ansible v2.7 bug This issue/PR relates to a bug. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Oct 7, 2018
@maxamillion maxamillion self-assigned this Oct 8, 2018
@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Oct 8, 2018
@bayrambayramli
Copy link

bayrambayramli commented Oct 8, 2018

Adding conf_file: '/etc/yum.conf' could be a workaround while it is fixed in the release:

- yum:
    name: epel-release
    state: latest
    conf_file: '/etc/yum.conf'

@maxamillion
Copy link
Contributor

This is definitely a bug, but I'm curious how you hit it with the playbook task you provided because I'm unable to reproduce using that and we have a lot of integration tests that perform simple installs/updates that all work as well.

@DSpeichert
Copy link
Contributor Author

I have 3 machines that are almost the same. The 2 on which it works properly use the RHEL-like subscription-based update server and the one where it fails uses a regular tym HTTP plain repository.

This doesn't really explain the issue. I'm unable to find the cause of the problem but I haven't tried to dig deep into yum module's source code yet.

@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.7 This issue/PR affects Ansible v2.7 bug This issue/PR relates to a bug. module This issue/PR relates to a module. python3 support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants