Bug 1500754 - ansible-python3 is broken
Summary: ansible-python3 is broken
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ansible
Version: 27
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Kevin Fenzi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-11 12:11 UTC by Simon
Modified: 2017-11-11 03:10 UTC (History)
7 users (show)

Fixed In Version: ansible-2.4.1.0-2.fc26 ansible-2.4.1.0-2.fc25 ansible-2.4.1.0-2.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-08 23:27:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1505899 0 unspecified CLOSED ansible-python3 reverts to libselinux-python(2) when playbook hosts is not localhost 2021-02-22 00:41:40 UTC

Internal Links: 1505899

Description Simon 2017-10-11 12:11:47 UTC
Description of problem:
ansible-3 2.4.0.0 is broken. With an exception of ansible-3 <command> the rest of the submodules appears to have broken links/path

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

How reproducible:
100%

Steps to Reproduce:
1. command line -> ansible-galaxy-3
or
2. command line -> ansible-playbook-3
or
3. command line -> ansible-pull-3
...

Actual results:
bash: ansible-galaxy-3: command not found...
Install package 'ansible-python3' to provide command 'ansible-galaxy-3'? [N/y] y
 * Waiting in queue... Failed to install packages: ansible-python3-2.4.0.0-1.fc27.noarch is already installed

Comment 1 Kevin Fenzi 2017-10-11 23:39:28 UTC
I can't duplicate this here. 

What happens if you give the full path to those commands? 

ie, 

/usr/bin/ansible-galaxy-3 --help

Comment 2 Simon 2017-10-12 09:50:48 UTC
(In reply to Kevin Fenzi from comment #1)

I spin up a fresh install, same results, attempting full path resulted in ->

$ /usr/bin/ansible-galaxy-3 --help
bash: /usr/bin/ansible-galaxy-3: No such file or directory

After digging around
/usr/bin/ansible-galaxy-3 -> Link target : /usr/bin/ansible-galaxy-3.6 Type: Link (broken) (inode/symlink)
/usr/bin/ansible-galaxy-3.6 -> Link target: ansible Type: Link (broken) (inode/symlink)

Install log:

dnf install ansible-python3
Dependencies resolved.

Package                           Arch             Version                                                          Repository                  Size
Installing:
ansible-python3             noarch          2.4.0.0-1.fc27                                            updates-testing         7.5 M
Installing dependencies:
libsodium                         x86_64         1.0.14-1.fc27                                             updates-testing         186 k
libtomcrypt                      x86_64         1.17-34.20170720gitab8c5b8.fc27      fedora                         372 k
libtommath                     x86_64         1.0-8.fc27                                                    fedora                           55 k
libyaml                             x86_64          0.1.7-4.fc27                                                fedora                          58 k
python3-PyYAML          x86_64          3.12-5.fc27                                                  fedora                         182 k
python3-bcrypt              x86_64           3.1.3-4.fc27                                                fedora                           41 k
python3-crypto              x86_64           2.6.1-17.fc27                                             fedora                         495 k
python3-jinja2               noarch            2.9.6-2.fc27                                               fedora                         548 k
python3-jmespath        noarch            0.9.0-8.fc27                                               fedora                           44 k
python3-paramiko        noarch            2.3.1-2.fc27                                               updates-testing        284 k
python3-pyasn1            noarch            0.3.2-2.fc27                                               fedora                         122 k
python3-pynacl             x86_64           1.1.2-1.fc27                                               fedora                           63 k

Transaction Summary
Install  13 Packages
 
It's clear from above, that ansible-python3 can be installed without ansible(2) as a dependency, hence the broken symlinks. After installing ansible(2), the problem has been solved.

Solution -> add ansible(2) as a dependency for ansible-python3

Comment 3 Simon 2017-10-13 12:51:37 UTC
If ansible is run exclusively in python3, redundant python2 dependencies are pulled in with ansible package. As  ansible-python3 appears as a convenient wrapper to shared python2-3 ansible codebase, the ansible-python3 should be an indicator of python3 exclusivity and skip the python 2 dependencies.

Comment 4 Kevin Fenzi 2017-10-15 21:42:42 UTC
Toshio was able to track this down and pushed a fix to rawhide. 

Here is a f27 scratch build: 
https://koji.fedoraproject.org/koji/taskinfo?taskID=22472912

Let us know if that fixes things. We could push this out, but I hope 2.4.1 will be out very soon and we can just add it to that if it's not already merged.

Comment 5 Simon 2017-10-16 18:44:33 UTC
(In reply to Kevin Fenzi from comment #4)

I've installed the rawhide package, I can confirm the functionality seems to be as intended.
 
As far as the release is concerned, it's a de facto broken package in a beta release, hard to apply the conventional fedora guidelines. For me it would be convenient to have it in repo, but can live with installing from command line the rawhide rpm every time I spin up a new box for testing. I leave the decision to you.

We can keep this bug open until 2.4.1 is pushed out, as a workaround is clearly documented, in the meantime.

Comment 6 Vinay S Shastry 2017-10-18 03:26:37 UTC
This is broken on Fedora 26 too.

The /usr/bin/ansible*3.6 symlinks point to /usr/bin/ansible instead of /usr/bin/ansible3.

Comment 7 Vinay S Shastry 2017-10-18 03:28:33 UTC
Workaround: ln -s /usr/bin/ansible3 /usr/bin/ansible

Comment 8 Fedora Update System 2017-10-31 15:37:58 UTC
ansible-2.4.1.0-2.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-8bf1b0c692

Comment 9 Fedora Update System 2017-10-31 15:38:38 UTC
ansible-2.4.1.0-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-008017c9fe

Comment 10 Fedora Update System 2017-10-31 15:38:57 UTC
ansible-2.4.1.0-2.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-c2729c23b0

Comment 11 Fedora Update System 2017-10-31 19:10:49 UTC
ansible-2.4.1.0-2.fc27 has been pushed to the Fedora 27 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-2017-c2729c23b0

Comment 12 Fedora Update System 2017-11-01 16:57:53 UTC
ansible-2.4.1.0-2.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-2017-008017c9fe

Comment 13 Fedora Update System 2017-11-01 17:22:47 UTC
ansible-2.4.1.0-2.fc26 has been pushed to the Fedora 26 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-2017-8bf1b0c692

Comment 14 Fedora Update System 2017-11-08 23:27:55 UTC
ansible-2.4.1.0-2.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 15 Fedora Update System 2017-11-08 23:30:37 UTC
ansible-2.4.1.0-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2017-11-11 03:10:13 UTC
ansible-2.4.1.0-2.fc27 has been pushed to the Fedora 27 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.