Bug 1574223

Summary: Wrong dependency on python2-kubernetes
Product: Red Hat OpenStack Reporter: Dimitri Savineau <dsavinea>
Component: python-kuryr-tests-tempestAssignee: Jon Schlueter <jschluet>
Status: CLOSED ERRATA QA Contact: Jon Uriarte <juriarte>
Severity: high Docs Contact:
Priority: high    
Version: 13.0 (Queens)CC: dmellado, jschluet, lhh, racedoro
Target Milestone: betaKeywords: Rebase, Triaged
Target Release: 13.0 (Queens)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: python-kuryr-tests-tempest-0.1.1-1.0.22a7992git.el7ost python-kubernetes-5.0.0-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-27 13:54:52 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 Dimitri Savineau 2018-05-02 20:20:58 UTC
Description of problem:
Running tempest with kuryr tests installed results with a python stacktrace

Version-Release number of selected component (if applicable):
OSP13 latest puddle (20180501.6)
$ rpm -q python2-kuryr-tests-tempest
python2-kuryr-tests-tempest-0.1.1-0.20180424160333.22a7992.el7ost.noarch

How reproducible:
100%

Steps to Reproduce:
1. Install openstack-tempest
2. Install python2-kuryr-tests-tempest plugin (or the metapackage openstack-tempest-all)
3. Run tempest

Actual results:

=========================
Failures during discovery
=========================
--- import errors ---
Failed to import test module: kuryr_tempest_plugin.tests.scenario.test_cross_ping
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/unittest2/loader.py", line 445, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python2.7/site-packages/unittest2/loader.py", line 384, in _get_module_from_name
    __import__(name)
  File "/usr/lib/python2.7/site-packages/kuryr_tempest_plugin/tests/scenario/test_cross_ping.py", line 23, in <module>
    from kuryr_tempest_plugin.tests.scenario import base
  File "/usr/lib/python2.7/site-packages/kuryr_tempest_plugin/tests/scenario/base.py", line 23, in <module>
    from kubernetes.stream import stream
ImportError: No module named stream

Failed to import test module: kuryr_tempest_plugin.tests.scenario.test_port_pool
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/unittest2/loader.py", line 445, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python2.7/site-packages/unittest2/loader.py", line 384, in _get_module_from_name
    __import__(name)
  File "/usr/lib/python2.7/site-packages/kuryr_tempest_plugin/tests/scenario/test_port_pool.py", line 20, in <module>
    from kuryr_tempest_plugin.tests.scenario import base
  File "/usr/lib/python2.7/site-packages/kuryr_tempest_plugin/tests/scenario/base.py", line 23, in <module>
    from kubernetes.stream import stream
ImportError: No module named stream

Failed to import test module: kuryr_tempest_plugin.tests.scenario.test_service
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/unittest2/loader.py", line 445, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python2.7/site-packages/unittest2/loader.py", line 384, in _get_module_from_name
    __import__(name)
  File "/usr/lib/python2.7/site-packages/kuryr_tempest_plugin/tests/scenario/test_service.py", line 23, in <module>
    from kuryr_tempest_plugin.tests.scenario import base
  File "/usr/lib/python2.7/site-packages/kuryr_tempest_plugin/tests/scenario/base.py", line 23, in <module>
    from kubernetes.stream import stream
ImportError: No module named stream

Expected results:
Tempest runs successfully

Additional info:
The stream module in python2-kubernetes isn't present in 3.0.0 (current version present is OSP13) but in 4.0.0

$ rpm -q python2-kubernetes
python2-kubernetes-3.0.0-1.el7.noarch

In upstream RDO queens, the dependency is correctly handled (>= 4.0.0) :
$ sudo yum info python2-kubernetes
Name        : python2-kubernetes
Arch        : noarch
Version     : 4.0.0
Release     : 1.el7
Size        : 834 k
Repo        : centos-openstack-queens/x86_64
Summary     : Kubernetes Python Client
URL         : https://pypi.python.org/pypi/kubernetes
License     : ASL 2.0
Description : Python client for the kubernetes API.

https://review.rdoproject.org/r/gitweb?p=openstack/kuryr-tempest-plugin-distgit.git;a=blob;f=python-kuryr-tests-tempest.spec;hb=HEAD#l48

Comment 14 Jon Schlueter 2018-05-08 14:54:39 UTC
this is in for OSP 13 Beta and should be in right shape after discussions with devs

Comment 15 Daniel Mellado 2018-05-08 16:14:39 UTC
Fixed on 0.2.0, this version no longer relies on those libraries and it's the on which matches with stable/queens and OSP13. Service tests will be released on 0.3.0.

Please do note that in order for the test to run properly, further work will need to be done on openshift-ansible and/or python-tempestconfig, related to .kube/config and dns as otherwise k8s client won't be able to reach openshift cluster api, but the dependency issue is fixed within this release.

Comment 17 errata-xmlrpc 2018-06-27 13:54:52 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/RHEA-2018:2086