functional tests broken in ssl environment
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance Client |
Fix Released
|
Critical
|
Brian Rosmaita |
Bug Description
This happens when running the functional tests with a devstack with 'enable_service tls-proxy' in the local.conf
Here's an example traceback:
=== start ===
Traceback (most recent call last):
File "glanceclient/
out = self.glance(
File "glanceclient/
**kwargs)
File "/home/
'glance', action, flags, params, fail_ok, merge_stderr)
File "/home/
self.cli_dir, prefix=self.prefix)
File "/home/
result_err)
tempest.
stdout:
stderr:
Unable to determine the Keystone version to authenticate with using the given auth_url. Identity service may not support API version discovery. Please provide a versioned auth_url instead. error=SSL exception connecting to https:/
=== end ===
The "Unable to determine the Keystone version ..." message is ours, it's generated when the ewxception is caught. The real reason for the failure is given in the 'error=' part.
I was looking through the devstack tls-proxy code and noticed the function fix_system_ ca_bundle_ path: https:/ /github. com/openstack- dev/devstack/ blob/master/ lib/tls# L343-L369
Roughly, the python requests module uses its own CA bundle rather that the distro's bundle, where the devstack certs have been added, and during devstack install, devstack fixes this. When the functional tests are run against devstack, tox creates its own virtualenv that contains the requests module that will be used by the tests, and I think this requests module is using the wrong bundle, which is why the tests fail.
I did by hand what fix_system_ ca_bundle_ path does for the python in .tox/functional /bin/python and then ran the functional tests, and this time they passed.
I guess what we need to do is to modify the tox ini so that it calls fix_system_ ca_bundle_ path before the tests run.