Bug 1330979 - Ansible 2.0 is not backwards compatible with 1.9
Summary: Ansible 2.0 is not backwards compatible with 1.9
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ansible
Version: 23
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-27 11:49 UTC by Christos Triantafyllidis
Modified: 2016-05-15 03:04 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-06 19:24:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Christos Triantafyllidis 2016-04-27 11:49:42 UTC
Description of problem:
Within one major release (fedora 23) the ansible package has been upgraded from version 1.9.x to 2.0.x.

This upgrade introduces backward compatibility issues and it is against the updates policy:
https://fedoraproject.org/wiki/Updates_Policy#Stable_Releases
where it is stated:
- Avoid Major version updates, ABI breakage or API changes if at all possible. 

Version-Release number of selected component (if applicable):
2.0.1.0-2.fc23

How reproducible:
Every time

Steps to Reproduce:
1. Start with a system with ansible 1.9 installed (i.e. the one from the f23 base repo).

2. Confirm that importing ansible.callbacks works:
# python -c 'import ansible.utils,ansible.callbacks'; echo $?
0

3. Update ansible (dnf update ansible)

4. Check if importing ansible.callbacks works:
# python -c 'import ansible.utils,ansible.callbacks'; echo $?

Actual results:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named callbacks
1

Expected results:
0


Additional info:
There is a package called "ansible1.9" but:
a) this is not an update of the ansible package for those who had 1.9 installed
b) doesn't install cleanly if as it shares paths with the ansible package so even if someone knows that from ansible (1.9 version) he should upgrade to ansible1.9 package to maintain the compatibility that won't be possible without removing the current ansible package.

Comment 1 Kevin Fenzi 2016-04-27 15:05:27 UTC
So, the thing here is that the python API interface to ansible is not something that is stable and supported by ansible. From the docs: 

"Please note that while we make this API available it is not intended for direct consumption, it is here for the support of the Ansible command line tools. We try not to make breaking changes but we reserve the right to do so at any time if it makes sense for the Ansible toolset.

The following documentation is provided for those that still want to use the API directly, but be mindful this is not something the Ansible team supports."

So, this API can (and in fact has) changed in other releases. 

Aside from a pretty small number of cases ansible 2.0 handles playbooks written for 1.9.x just fine. For those small numbers of folks, we have provided the ansible1.9 package, but note that it will go away once upstream stops supporting 1.9.x updates.

Comment 2 Christos Triantafyllidis 2016-04-27 15:25:42 UTC
As discussed on IRC the main problem is that --allowerasing doesn't help on the migration from ansible to ansible1.9:

# rpm -qa  ansible
ansible-2.0.1.0-2.fc23.noarch
# dnf install ansible1.9 --allowerasing
Last metadata expiration check: 0:35:24 ago on Wed Apr 27 15:41:53 2016.
Dependencies resolved.
====================================================================================================================================================
 Package                             Arch                            Version                                 Repository                        Size
====================================================================================================================================================
Installing:
 ansible1.9                          noarch                          1.9.6-1.fc23                            updates                          1.7 M
Downgrading:
 ansible                             noarch                          1.9.3-2.fc23                            fedora                           1.7 M

Transaction Summary
====================================================================================================================================================
Install    1 Package
Downgrade  1 Package

Total size: 3.4 M
Is this ok [y/N]: n
Operation aborted.

AND:
# rpm -qa  ansible
ansible-1.9.3-2.fc23.noarch
# dnf install ansible1.9 --allowerasing
Last metadata expiration check: 0:40:11 ago on Wed Apr 27 15:41:53 2016.
Dependencies resolved.
======================================================================================================================================================
 Package                              Arch                             Version                                Repository                         Size
======================================================================================================================================================
Installing:
 ansible1.9                           noarch                           1.9.6-1.fc23                           updates                           1.7 M

Transaction Summary
======================================================================================================================================================
Install  1 Package

Total download size: 1.7 M
Installed size: 7.2 M
Is this ok [y/N]: 


In both cases we end up with a setup that tries to install ansible-1.9.3 and ansible1.9 in parallel which conflicts as they share path location.

Looking at the 1.9 spec file it MIGHT help to change:
Conflicts: ansible >= 2
To:
Conflicts: ansible

But i'm not sure if a package can Provide and Conflict with the same name.

Cheers,
Christos

Comment 3 Fedora Update System 2016-04-27 19:02:41 UTC
ansible1.9-1.9.6-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-f392541f73

Comment 4 Fedora Update System 2016-04-27 19:02:54 UTC
ansible1.9-1.9.6-2.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-af216d3233

Comment 5 Fedora Update System 2016-04-27 19:03:12 UTC
ansible1.9-1.9.6-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-48b827a9d9

Comment 6 Fedora Update System 2016-04-27 19:03:18 UTC
ansible1.9-1.9.6-2.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-5c482c7c47

Comment 7 Fedora Update System 2016-04-28 22:20:42 UTC
ansible1.9-1.9.6-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-2016-5c482c7c47

Comment 8 Fedora Update System 2016-04-28 22:23:21 UTC
ansible1.9-1.9.6-2.el7 has been pushed to the Fedora EPEL 7 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-2016-af216d3233

Comment 9 Fedora Update System 2016-04-28 22:53:17 UTC
ansible1.9-1.9.6-2.fc22 has been pushed to the Fedora 22 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-48b827a9d9

Comment 10 Fedora Update System 2016-04-28 22:55:34 UTC
ansible1.9-1.9.6-2.fc23 has been pushed to the Fedora 23 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-f392541f73

Comment 11 Fedora Update System 2016-05-06 19:24:50 UTC
ansible1.9-1.9.6-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2016-05-06 19:51:32 UTC
ansible1.9-1.9.6-2.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2016-05-15 02:41:45 UTC
ansible1.9-1.9.6-2.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2016-05-15 03:04:18 UTC
ansible1.9-1.9.6-2.el6 has been pushed to the Fedora EPEL 6 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.