Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1387621 - dnf module doesn't work with a rawhide host
Summary: dnf module doesn't work with a rawhide host
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ansible
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-21 11:52 UTC by Vratislav Podzimek
Modified: 2016-11-19 21:12 UTC (History)
10 users (show)

Fixed In Version: ansible-2.2.0.0-3.fc24 ansible-2.2.0.0-3.fc25
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-07 23:27:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Vratislav Podzimek 2016-10-21 11:52:21 UTC
Description of problem:
When trying to use the 'dnf' module in one of my tasks, I'm getting errors like this:

fatal: [IP_ADDRESS_REMOVED]: FAILED! => {"changed": false, "failed": true, "module_stderr": "", "module_stdout": "No handlers could be found for logger \"dnf\"\r\nTraceback (most recent call last):\r\n  File \"/tmp/ansible_LDnNIF/ansible_module_dnf.py\", line 355, in <module>\r\n    main()\r\n  File \"/tmp/ansible_LDnNIF/ansible_module_dnf.py\", line 349, in main\r\n    ensure(module, base, params['state'], params['name'])\r\n  File \"/tmp/ansible_LDnNIF/ansible_module_dnf.py\", line 240, in ensure\r\n    pkg_specs, group_specs, filenames = cli.commands.parse_spec_group_file(\r\nAttributeError: 'module' object has no attribute 'parse_spec_group_file'\r\n", "msg": "MODULE FAILURE"}


Version-Release number of selected component (if applicable):
ansible-2.1.2.0-1.fc24.noarch
python2-dnf-2.0.0-0.rc1.4.fc26.noarch (on the managed host)

How reproducible:
100%

Steps to Reproduce:
1. try to use the 'dnf' module (e.g to install a package) on a rawhide host

Actual results:
an error

Expected results:
packages installed/checked as installed

Additional info:
This is probably related to the change that introduced DNF 2.0 (API) in Rawhide. DNF developers (CC'd) say that the ansible module is using something that has never been part of the API (in the above traceback).

Also please note that this makes a lot of ansible playbooks unusable with Rawhide hosts and may result in people going back to 'cmd: dnf install SOMETHING' instead of using the 'dnf' module.

Comment 1 Toshio Ernie Kuratomi 2016-10-21 14:28:59 UTC
Do you have a github login?  Would you be willing to file a bug upstream? https://github.com/ansible/ansible-modules-extras/issues/new

We, upstream, are in the late stages of the 2.2.0 release candidate process... not sure if a fix for this will get into 2.2.0 or will have to wait for 2.2.1.  Pinging others about whether this is a blocker for 2.2.0 or not.  On the one hand package managers are always important modules.  On the other hand, dnf is an extras module so it depends on getting the community maintainers involved (I don't see ignatenkobrain CC'd above; he's the one that got the ball rolling on rewriting dnf to use the API so he'll probably be the community maintainer we rely upon to write a fix that works with both dnf-1.x and dnf-2.x), there's workarounds (command module or yum module), and since rawhide is still early stages as well we'll probably have 2.2.1 out before rawhide becomes Fedora 26.

I'll add more about the status of fixing this in 2.2.0 vs 2.2.1 once more of the team has replied.

Comment 2 Kevin Fenzi 2016-10-21 14:47:18 UTC
I don't think this needs to block the 2.2.0 release. We can add a patch when we have one to fix this in rawhide either way.

Comment 3 Toshio Ernie Kuratomi 2016-10-21 16:17:50 UTC
Cool.  ignatenkobrain also said (on irc) that he thinks he can work on a patch in a few days.  So we'll probably get it into our upstream devel branch sometime next week.  Then it can be applied as a backport to the Fedora package and queued up for the upstream 2.2.1 release.

Comment 4 Toshio Ernie Kuratomi 2016-10-27 20:03:06 UTC
Opened a bug upstream: https://github.com/ansible/ansible-modules-extras/issues/3310

Comment 5 Fedora Update System 2016-11-02 17:30:45 UTC
ansible-2.2.0.0-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-e348c4e0e3

Comment 6 Fedora Update System 2016-11-02 17:31:35 UTC
ansible-2.2.0.0-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-a5f9956e38

Comment 7 Fedora Update System 2016-11-05 03:33:07 UTC
ansible-2.2.0.0-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-e348c4e0e3

Comment 8 Fedora Update System 2016-11-05 16:01:23 UTC
ansible-2.2.0.0-3.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-3113e71193

Comment 9 Fedora Update System 2016-11-05 16:02:05 UTC
ansible-2.2.0.0-3.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-3ccb098630

Comment 10 Fedora Update System 2016-11-05 19:01:20 UTC
ansible-2.2.0.0-3.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-3ccb098630

Comment 11 Fedora Update System 2016-11-06 01:53:27 UTC
ansible-2.2.0.0-3.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-3113e71193

Comment 12 Fedora Update System 2016-11-07 23:27:48 UTC
ansible-2.2.0.0-3.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2016-11-19 21:12:21 UTC
ansible-2.2.0.0-3.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.


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