Bug 1508733 - yum module bug in ansible 2.4.0.0
Summary: yum module bug in ansible 2.4.0.0
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ansible Engine
Classification: Red Hat
Component: ansible
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
Assignee: Pavel Cahyna
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On: 1509360
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-02 06:15 UTC by Chen Li Zhong
Modified: 2018-04-18 14:59 UTC (History)
2 users (show)

Fixed In Version: ansible-2.4.1.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-14 10:02:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ansible ansible issues 31412 0 None None None 2017-11-02 16:15:31 UTC
Github ansible ansible issues 31859 0 None None None 2017-11-10 18:04:32 UTC
Red Hat Product Errata RHBA-2017:3196 0 normal SHIPPED_LIVE ansible bug fix update 2017-11-14 15:00:58 UTC

Description Chen Li Zhong 2017-11-02 06:15:08 UTC
Description of problem:

In RHEL 7 extra rpms repo, Ansible 2.4.0.0 is provided. But there is bug of yum module. Yum module is frequently used module for Redhat, please update ansible rpm in redhat channel or release the 2.4.1.

yum module doesn't detect package updates anymore 
https://github.com/ansible/ansible/issues/31412 



Version-Release number of selected component (if applicable):
Ansible 2.4.0.0

How reproducible:

Below command always return "all packages are up to date".

ansible localhost -m yum -a "name=irqbalance state=latest"

Steps to Reproduce:


[root@mariadb_host ~]# uname -a
Linux mariadb_host 3.10.0-327.el7.x86_64 #1 SMP Thu Oct 29 17:29:29 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux


[root@mariadb_host ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.2 (Maipo)


[root@mariadb_host ~]# ansible --version
ansible 2.4.0.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.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, Oct 11 2015, 17:47:16) [GCC 4.8.3 20140911 (Red Hat 4.8.3-9)]


[root@mariadb_host ~]# rpm -qa|grep irqbalance
irqbalance-1.0.7-5.el7.x86_64


[root@mariadb_host ~]# ansible localhost -m yum -a "name=irqbalance state=latest"
localhost | SUCCESS => {
    "changed": false, 
    "failed": false, 
    "msg": "", 
    "rc": 0, 
    "results": [
        "All packages providing irqbalance are up to date", 
        ""
    ]
}


[root@mariadb_host ~]# yum install irqbalance
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Resolving Dependencies
--> Running transaction check
---> Package irqbalance.x86_64 3:1.0.7-5.el7 will be updated
---> Package irqbalance.x86_64 3:1.0.7-10.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================================================================================================================================
 Package                                          Arch                                         Version                                              Repository                                                Size
===================================================================================================================================================================================================================
Updating:
 irqbalance                                       x86_64                                       3:1.0.7-10.el7                                       rhel-7-server-rpms                                        45 k

Transaction Summary
===================================================================================================================================================================================================================
Upgrade  1 Package

Total download size: 45 k
Is this ok [y/d/N]: 



Actual results:


Expected results:

Please release the ansible 2.4.1.0 ASAP

Additional info:

Comment 4 Pavel Cahyna 2017-11-10 17:52:54 UTC
Note for testing: I was able to reproduce the bug only with packages with a nonzero epoch.

# ansible -C -c local -i localhost, -m yum -a 'name=NetworkManager state=latest' localhost
localhost | SUCCESS => {
    "changed": false, 
    "changes": {
        "installed": [], 
        "updated": []
    }, 
    "failed": false, 
    "msg": "", 
    "rc": 0, 
    "results": [
        "All packages providing NetworkManager are up to date"
    ]
}

(NetworkManager is at version 1:1.8.0-9.el7)

but

# ansible -C -c local -i localhost, -m yum -a 'name=tzdata state=latest' localhost
localhost | SUCCESS => {
    "changed": true, 
    "changes": {
        "installed": [], 
        "updated": [
            [
                "tzdata", 
                "2017c-1.el7.noarch from rhel-7-server-rpms"
            ]
        ]
    }, 
    "failed": false, 
    "msg": "", 
    "rc": 0, 
    "results": []
}

(tzdata is at version 0:2017b-1.el7)

Comment 7 errata-xmlrpc 2017-11-14 10:02:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:3196


Note You need to log in before you can comment on or make changes to this bug.