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 module doing update takes much, much longer than command line equivalent #64609

Closed
jswindle-rtn opened this issue Nov 8, 2019 · 3 comments
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. packaging Packaging category support:core This issue/PR relates to code supported by the Ansible Engineering Team.

Comments

@jswindle-rtn
Copy link

SUMMARY

Yum update using yum module takes much longer to execute than command line equivalent.
Running playbook with '-v' or '-vvv' brings execution times to similar of command line equivalent.
Ansible v2.7.8 and v2.8.5 exhibit same behavior. Not able to test against latest or devel.
Possibly related to #51284 but not strictly related to "name: '*'" as argument because "name: kernel" has long execution times too.
See attached file for timings. ansible-yum-module-compare.docx

ISSUE TYPE
  • Bug Report
COMPONENT NAME

yum module

ANSIBLE VERSION
ansible 2.7.8
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/ansible/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /bin/ansible
  python version = 2.7.5 (default, Jun 11 2019, 14:33:56) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]


ansible 2.8.5
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/ansible/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Jun 11 2019, 14:33:56) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]

CONFIGURATION
ANSIBLE_PIPELINING(/etc/ansible/ansible.cfg) = True
ANSIBLE_SSH_ARGS(/etc/ansible/ansible.cfg) = -C -o ControlMaster=auto -o Control
ANSIBLE_SSH_RETRIES(/etc/ansible/ansible.cfg) = 10
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 20
DEFAULT_LOCAL_TMP(/etc/ansible/ansible.cfg) = /tmp/.ansible/tmp/ansible-local-10
DEFAULT_LOG_PATH(/etc/ansible/ansible.cfg) = /var/log/ansible/ansible.log
DEFAULT_ROLES_PATH(/etc/ansible/ansible.cfg) = [u'/etc/ansible/roles', u'/usr/sh
DEFAULT_STDOUT_CALLBACK(/etc/ansible/ansible.cfg) = debug

OS / ENVIRONMENT

RHEL 7.6
VM running on ESXI 6.7
ESXI 6.7 installed on Dell R430

STEPS TO REPRODUCE
- name: "Install RHEL 7 kernel patch (This can take a while, so be patient)"
  yum:
    name: "kernel"
    state: latest
    update_cache: yes
  tags: patches

- name: "Install RHEL 7 patches (This can take a while, so be patient)"
  yum:
    name: "*"
    state: latest
    update_cache: no
  tags: patches


ansible-playbook playbook.yml –l laptop

Local yum repo hosted on ansible command host. Repo contains RHEL 7 bugfix and security patches since RHEL 7.6 release.

ansible-yum-module-compare.docx

EXPECTED RESULTS

Expect the yum update kernel and yum update '*' execution times to be similar to yum update command line execution time plus small overhead.
ansible-playbook -v or -vvv does as expected.

ACTUAL RESULTS
ansible-playbook without -v or -vvv
2019-10-29 19:09:13,716 p=31864 u=ansible |  TASK [rhel7_all : Install RHEL 7 kernel patch (This can take a while, so be patient)] ***
2019-10-29 19:32:16,186 p=31864 u=ansible |  changed: [laptop]
2019-10-29 19:32:16,215 p=31864 u=ansible |  TASK [rhel7_all : Install RHEL 7 patches (This can take a while, so be patient)] ***
2019-10-29 22:56:39,231 p=31864 u=ansible |  changed: [laptop]
2019-10-29 22:56:39,259 p=31864 u=ansible |  TASK [rhel7_all : Remove old kernels] ******************************************

ansible-playbook with -v  (abbreviated output just to show timing)
2019-10-30 16:12:52,480 p=15474 u=ansible |  TASK [rhel7_all : Install RHEL 7 kernel patch (This can take a while, so be patient)] ***
2019-10-30 16:14:31,403 p=15474 u=ansible |  changed: [laptop] => {
    "changed": true,
    "obsoletes": {
. . .
2019-10-30 16:14:31,431 p=15474 u=ansible |  TASK [rhel7_all : Install RHEL 7 patches (This can take a while, so be patient)] ***
2019-10-30 16:35:13,995 p=15474 u=ansible |  changed: [laptop] => {
    "changed": true,
    "obsoletes": {

@ansibot
Copy link
Contributor

ansibot commented Nov 8, 2019

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 Nov 8, 2019

@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. packaging Packaging category support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Nov 8, 2019
@maxamillion
Copy link
Contributor

resolved_by_pr #63713

@ansibot ansibot closed this as completed Nov 8, 2019
@s-hertel s-hertel removed the needs_triage Needs a first human triage before being processed. label Nov 12, 2019
@ansible ansible locked and limited conversation to collaborators Dec 6, 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. packaging Packaging category support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

No branches or pull requests

4 participants