Bug 1420855

Summary: ceph-ansible installs six and docker-py from PyPI with pip
Product: [Red Hat Storage] Red Hat Storage Console Reporter: Ken Dreyer (Red Hat) <kdreyer>
Component: ceph-ansibleAssignee: Sébastien Han <shan>
Status: CLOSED ERRATA QA Contact: Rachana Patel <racpatel>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3CC: adeza, aschoen, ceph-eng-bugs, gmeno, hnallurv, nthomas, sankarshan, seb
Target Milestone: ---   
Target Release: 2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ceph-ansible-2.2.1-1.el7scon Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-19 13:16:50 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 Ken Dreyer (Red Hat) 2017-02-09 16:07:39 UTC
Description of problem:
roles/ceph-osd/tasks/docker/pre_requisite.yml contains the following:

 - name: install docker-py
    pip:
      name: docker-py
     state: latest
   tags:
     with_pkg
   when: ansible_version['full'] | version_compare('2.1.0.0', '>=')

Version-Release number of selected component (if applicable):
ceph-ansible master

How reproducible:
always

Steps to Reproduce:
1. Enable docker support in ceph-ansible config as documented at https://docs.google.com/document/d/1Ef5a_-Yjozy5Ue3C0M7mMQNn6zWZe0-514bhxKwFHI8/edit?ts=576a3d95
2. Run ceph-ansible

Actual results:
Ansible tries to install docker-py from PyPI

Expected results:
Ansible should use an RPM-packaged version of docker-py that Red Hat ships and GPG-signs for security and stability. Third party libraries are not installed on a customer's system.

Additional info:

Comment 2 Ken Dreyer (Red Hat) 2017-02-09 16:10:30 UTC
The "six" module is also installed from PyPI.

 # NOTE (jimcurtis): need at least version 1.9.0 of six or we get:
 # re:NameError: global name 'DEFAULT_DOCKER_API_VERSION' is not defined
 - name: install six
   pip:
     name: six
     version: 1.9.0
   tags:
     with_pkg

Comment 3 seb 2017-02-09 17:51:28 UTC
Ken, just to make sure I understand, getting python package from pip is not something we allow?
All python packages should come from a package with a source of trust? Like our repos, right? :)

Comment 4 Ken Dreyer (Red Hat) 2017-02-09 17:59:45 UTC
Right. Currently we must not download anything directly from PyPI or other non-Red Hat locations on the internet for our downstream product.

Comment 5 Andrew Schoen 2017-03-03 17:39:46 UTC
This should be in the next version after the 2.1 series.

Upstream PR: https://github.com/ceph/ceph-ansible/pull/1328

Comment 9 errata-xmlrpc 2017-06-19 13:16:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1496