Bug 1494640
Summary: | Ansible 2.3.2 conflict with python27-jmespath | ||
---|---|---|---|
Product: | [Fedora] Fedora EPEL | Reporter: | jr.shank |
Component: | ansible | Assignee: | Kevin Fenzi <kevin> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | el6 | CC: | a.badger, adam.lewandowski, athmanem, carl, cgkades, jr.shank, j, kevin, maxim, orion, pcahyna |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-03-29 14:46:35 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
jr.shank
2017-09-22 17:39:38 UTC
Lowering the priority since this can be worked around by installing Ansible via PIP. python27-jmespath isn't from EPEL, it's from the Amazon Linux repo. Amazon Linux isn't 100% compatible with RHEL or EPEL. That said, I was able to get ansible installed in a clean docker container. http://pastebin.centos.org/276426/ So I think if you just uninstall python27-jmespath it will work for you. Indeed uninstalling python27-jmespath allows ansible to be installed. Unfortunately it results in packages that rely on python27-jmespath to be uninstalled as well. One such package is aws-cli. I understand that EPEL and the Amazon Linux repo are not 100% compatible. Is there anything that can be done with the ansible 2.3.2 package dependencies to restore compatibility in this case? There was no such incompatibility in the ansible 2.3.1 package, but that was apparently removed from the EPEL repository recently. Amazon's attempt at "compatibility" is to have their python26-* packages provides the stock names. # repoquery --provides python26-jmespath python-jmespath = 0.9.2-1.12.amzn1 python26-jmespath = 0.9.2-1.12.amzn1 That still works for stock RHEL packages, but many EPEL packages are getting renamed to python2-$name (providing python-$name) to match Fedora policy. Thus, other EPEL packages are getting updated to require the python2-$name, as you noticed with ansible. There are even some stock RHEL packages that are beginning to provide the python2-$name (see python-devel and python-setuptools) I think it's fair to say that the goal is to make Amazon Linux compatible with RHEL and EPEL, not the other way around. I would recommend asking Amazon to update their python26-jmespath package to provide python2-jmespath. Alternatively (additionally?), if the ansible maintainer (not me) wishes, they could make this change to the ansible spec file: -Requires: python2-jmespath +Requires: python%{?fedora:2}-jmespath It sounds to me like amazon linux is pretty divergent here... We could do the requires Carl mentions there I suppose, but not sure how worth it it will be... as probibly ansible is going to drop out of epel6 before long anyhow (upstream has switched to needing python-cryptography for vault, and thats not available in rhel6). For vault, note that unless someone has broken this, we still fallback to pycrypto (precisely for running on rhel6). I don't know if anyone's looked at whether python-cryptography could be built into epel6 either? I've created a request with AWS Support to update their python26-jmespath package to provide python2-jmespath. I'll update this bug when I get a response from them. It would be greatly appreciated if the ansible maintainer could tweak the spec file as described by Carl. (In reply to Toshio Kuratomi from comment #6) > For vault, note that unless someone has broken this, we still fallback to > pycrypto (precisely for running on rhel6). I don't know if anyone's looked > at whether python-cryptography could be built into epel6 either? Huh, well, vault fails here with a: Traceback (most recent call last): File "/usr/bin/ansible-vault", line 85, in <module> mycli = getattr(__import__("ansible.cli.%s" % sub, fromlist=[myclass]), myclass) File "/usr/lib/python2.6/site-packages/ansible/cli/__init__.py", line 45, in <module> from ansible.vars.manager import VariableManager File "/usr/lib/python2.6/site-packages/ansible/vars/manager.py", line 32, in <module> from jinja2.exceptions import UndefinedError ImportError: No module named jinja2.exceptions Can sort that out with you out of bug when you have time... (In reply to jr.shank from comment #7) > I've created a request with AWS Support to update their python26-jmespath > package to provide python2-jmespath. I'll update this bug when I get a > response from them. > > It would be greatly appreciated if the ansible maintainer could tweak the > spec file as described by Carl. I can, as soon as we sort out the vault issue... I was able to work around the issue using the RPMs provided by Ansible. The python-jmespath package is not in the spec file that they are using, so I'm not sure why the one in EPEL has that requirement. The root issue is, I believe, the unneeded requirement for jmespath. Although the AWS package will always conflict since their 2.7 package has a file provided by the 2.6 package (jp.py) http://releases.ansible.com/ansible/rpm/release/epel-6-x86_64/ I added that in the last update. See: https://bugzilla.redhat.com/show_bug.cgi?id=1465586 basically its needed for the json_query filter. It's difficult for me to see how best to work around this without access to the amazon repos (are they public anywhere?) I was working on the assumption that their python27-jmespath didn't provide python-jmespath, but I am not sure thats the case, can someone attach: repoquery --whatprovides python-jmespath --qf '%{name}\n' from one of the affected amazon linux instances? I see that in the change log, however it is not needed for Ansible to function as there is a try catch block protecting it. It can safely be removed without breaking Ansible itself, and the error message it provides will instruct the user to install the correct package. ... try: import jmespath HAS_LIB = True except ImportError: HAS_LIB = False ... if not HAS_LIB: raise AnsibleError('You need to install "jmespath" prior to running ' 'json_query filter') I'll work on providing you the info you are looking for. But essentially their python27 package and the one provided by EPEL conflict on /usr/bin/jp.py On an AWS instance: Without EPEL enabled $ repoquery --whatprovides python-jmespath --qf '%{name}\n' python26-jmespath python26-jmespath With EPEL enabled repoquery --whatprovides python-jmespath --qf '%{name}\n' python26-jmespath python26-jmespath python2-jmespath Hum, so I am not sure how the suggestion in comment#4 is going to help here. The problem is the conflict of the python27-jmespath with the python-jmespath. (Both amazon packages). If you need python27-jmespath then you cannot have the other one(s) installed or they conflict. For now, I will just remove the jmespath requirement on epel6. Kevin, there are Amazon Linux images on docker.io that I've found useful to explore issues like this. docker run -it --rm docker.io/amazonlinux:2017.03 ansible-2.4.0.0-2.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2017-c64e477a67 ansible-2.4.0.0-2.el6 has been pushed to the Fedora EPEL 6 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-EPEL-2017-c64e477a67 This appears to have been resolved. |