pyOpenSSL missing: cause 'git review' failed 05/49605/3
authorJingLu5 <lvjing5@huawei.com>
Wed, 10 Jan 2018 02:42:56 +0000 (02:42 +0000)
committerJingLu5 <lvjing5@huawei.com>
Thu, 11 Jan 2018 02:02:48 +0000 (02:02 +0000)
JIRA: YARDSTICK-905

In the latest Yardstick container, when use git review to upload patches, an Attribute Error will cause failure.

root@a80081a4dccd:/home/opnfv/repos/yardstick# git review
Traceback (most recent call last):
  File "/usr/bin/git-review", line 6, in <module>
    from git_review.cmd import main
  File "/usr/lib/python2.7/dist-packages/git_review/cmd.py", line 32, in <module>
    import requests
  File "/usr/local/lib/python2.7/dist-packages/requests/_init_.py", line 52, in <module>
    from .packages.urllib3.contrib import pyopenssl
  File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/contrib/pyopenssl.py", line 46, in <module>
    import OpenSSL.SSL
  File "/usr/lib/python2.7/dist-packages/OpenSSL/_init_.py", line 8, in <module>
    from OpenSSL import rand, crypto, SSL
  File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 118, in <module>
    SSL_ST_INIT = _lib.SSL_ST_INIT
AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

pyOpenSSL is required.

Change-Id: I88a4916c9c2dfcdee45320f6b1a37eaae0803671
Signed-off-by: JingLu5 <lvjing5@huawei.com>
docker/Dockerfile

index b1eb505..2ee5b4c 100644 (file)
@@ -26,7 +26,7 @@ ENV YARDSTICK_REPO_DIR="${REPOS_DIR}/yardstick" \
 
 RUN apt-get update && apt-get install -y git python-setuptools python-pip && apt-get -y autoremove && apt-get clean
 RUN easy_install -U setuptools==30.0.0
-RUN pip install appdirs==1.4.0
+RUN pip install appdirs==1.4.0 pyopenssl==17.5.0
 
 RUN mkdir -p ${REPOS_DIR}