Silence zuul_swift_upload

At the end of gate jobs, we get warnings from zuul_swift_upload that
are not actionable for us.

Use requestsexceptions to silence these warnings. Add requestsexceptions
to the venv that is created for zuul_swift_upload to run in.

Example file
http://logs.openstack.org/48/298048/1/check/gate-ha-guide-tox-checkniceness/62e2d16/console.html

The example shows 6 warnings starting with:
/usr/zuul-swift-logs-env/local/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:315:
SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject
Name Indication) extension to TLS is not available on this platform.
This may cause the server to present an incorrect TLS certificate, which
can cause validation failures. For more information, see
https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/usr/zuul-swift-logs-env/local/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:120:
InsecurePlatformWarning: A true SSLContext object is not available. This
prevents urllib3 from configuring SSL appropriately and may cause
certain SSL connections to fail. For more information, see
https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
...

Change-Id: I02b4b6c7b426f3e9aa498941e4d75f67066d4d27
This commit is contained in:
Andreas Jaeger
2016-03-27 21:19:41 +02:00
parent 9e2d5ef91b
commit 84e76e3f72
3 changed files with 7 additions and 2 deletions

View File

@@ -27,6 +27,7 @@ import os
import Queue import Queue
import requests import requests
import requests.exceptions import requests.exceptions
import requestsexceptions
import stat import stat
import sys import sys
import tempfile import tempfile
@@ -445,6 +446,10 @@ def grab_args():
if __name__ == '__main__': if __name__ == '__main__':
# Avoid unactionable warnings
requestsexceptions.squelch_warnings(requestsexceptions.InsecureRequestWarning)
args = grab_args() args = grab_args()
# file_list: A list of files to push to swift (in file_detail format) # file_list: A list of files to push to swift (in file_detail format)
file_list = [] file_list = []

View File

@@ -23,4 +23,4 @@ set -e
# https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/839588 # https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/839588
sudo -H virtualenv /usr/zuul-swift-logs-env sudo -H virtualenv /usr/zuul-swift-logs-env
sudo -H /usr/zuul-swift-logs-env/bin/pip install python-magic argparse \ sudo -H /usr/zuul-swift-logs-env/bin/pip install python-magic argparse \
requests glob2 requests glob2 requestsexceptions

View File

@@ -232,7 +232,7 @@ sudo rm -fr /tmp/zuul
# https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/839588 # https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/839588
sudo -H virtualenv /usr/zuul-swift-logs-env sudo -H virtualenv /usr/zuul-swift-logs-env
sudo -H /usr/zuul-swift-logs-env/bin/pip install python-magic argparse \ sudo -H /usr/zuul-swift-logs-env/bin/pip install python-magic argparse \
requests glob2 requests glob2 requestsexceptions
# Create a virtualenv for os-testr (which contains subunit2html) # Create a virtualenv for os-testr (which contains subunit2html)
# this is in /usr instead of /usr/loca/ due to this bug on precise: # this is in /usr instead of /usr/loca/ due to this bug on precise: