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
Can't install groups with the dnf module on Fedora 26 #26868
Comments
I just wanted to point out that this behavior is also present in ansible 2.3.1.0, which is currently available in the Fedora repos. |
(traceback reformatted for easier reading)
|
ping @ignatenkobrain |
I'm seeing the same problem with Ansible v2.3.1.0 on Fedora 26. |
is resolved
i have opened an bug request at bugzilla.redhat.com for that as well on saturday |
Same here, also on Fedora 26.
|
I'm having similar problem after upgrading to Fedora 26
|
I did some digging into this since it's blocking my Fedora 26 rollout. I'm no expert on ansible or dnf or the dnf API or anything, really, but I did learn how to explode and tweak the code ansible runs on the remote host and came down to a couple of instances of base.group_install which are not correct. Basically Using Edit: verified with DNF upstream that using a Group object there was deprecated since dnf 1.1 and perhaps earlier, and the compatibility code was intentionally removed in 2.0.0. The compat code was added in rpm-software-management/dnf@fdacdb8 and I'm having trouble figuring out when it was removed since the blame view doesn't show that. I'll work up a PR after doing some testing. |
I can reproduce. COMPONENT NAMEdnf ANSIBLE VERSION$ ansible --version
ansible 2.3.1.0
config file = /etc/ansible/ansible.cfg
configured module search path = Default w/o overrides
python version = 2.7.13 (default, Jul 21 2017, 03:24:34) [GCC 7.1.1 20170630] CONFIGURATION
$ env | grep -i ansible
$ OS / ENVIRONMENTMy control host is an up-to-date Arch Linux system. My managed hosts are a variety of Fedora and RHEL VMs. The Fedora 26 "server spin" VMs are the only ones causing issues. Ignoring details like snapshots, clones, virt-sysprep, etc, each system is built by doing the following:
Here's the version of DNF installed on the F26 system: # dnf --version
2.6.2
Installed: dnf-0:2.6.2-1.fc26.noarch at Wed 26 Jul 2017 05:46:51 PM GMT
Built : Fedora Project at Mon 24 Jul 2017 02:08:42 PM GMT
Installed: rpm-0:4.13.0.1-5.fc26.x86_64 at Wed 26 Jul 2017 05:46:50 PM GMT
Built : Fedora Project at Tue 27 Jun 2017 08:17:41 AM GMT STEPS TO REPRODUCETo reproduce the issue, use Ansible's DNF module to install a package group. For example: EXPECTED RESULTSAnsible's DNF module should be able to install package groups. ACTUAL RESULTS$ ansible all -i fedora-26-test, -m dnf -a 'name=@LibreOffice state=present'
fedora-26-test | FAILED! => {
"changed": false,
"failed": true,
"module_stderr": "Shared connection to fedora-26-test closed.\r\n",
"module_stdout": "Traceback (most recent call last):\r\n File \"/tmp/ansible_4oGv_p/ansible_module_dnf.py\", line 493, in <module>\r\n main()\r\n File \"/tmp/ansible_4oGv_p/ansible_module_dnf.py\", line 489, in main\r\n ensure(module, base, params['state'], params['name'])\r\n File \"/tmp/ansible_4oGv_p/ansible_module_dnf.py\", line 350, in ensure\r\n base.group_install(group, dnf.const.GROUP_PACKAGE_TYPES)\r\n File \"/usr/lib/python2.7/site-packages/dnf/base.py\", line 1526, in group_install\r\n strict)\r\n File \"/usr/lib/python2.7/site-packages/dnf/comps.py\", line 90, in install_or_skip\r\n return install_fnc(grp_or_env_id, types, exclude, strict)\r\n File \"/usr/lib/python2.7/site-packages/dnf/comps.py\", line 600, in _group_install\r\n raise ValueError(_(\"Group_id '%s' does not exist.\") % ucd(group_id))\r\nValueError: Group_id '<dnf.comps.Group object at 0x7f5510c42390>' does not exist.\r\n",
"msg": "MODULE FAILURE",
"rc": 0
} Here's the prettified output of
|
@Ichimonji10 That is already fixed in #27302 and #27324. Should be in the 2.3.2 release. |
Ansible is currently unable to install package groups on Fedora 26. Work around this limitation. See: ansible/ansible#26868
ISSUE TYPE
COMPONENT NAME
dnf module
ANSIBLE VERSION
CONFIGURATION
Nothing changed
OS / ENVIRONMENT
SUMMARY
When I try to install a dnf group on Fedora 26 it fails with an error message. The same command actually works on Fedora 25. Might be the case because F25 uses python2-dnf version 1.1.10 and F26 Verson 2.5.1?
STEPS TO REPRODUCE
ansible localhost -c local -b -K -m dnf -a 'name="@RPM Development Tools"'
EXPECTED RESULTS
I expected the group to be installed. The group actually exists because the following command works:\
ACTUAL RESULTS
If there is any information necessary to resolve the issue I would happily provide it.
The text was updated successfully, but these errors were encountered: