Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ssl_adapter.py: Properly fix order of imports
A system running RDO Kilo (on EL 7) has the following two relevant packages installed: python-requests --> /usr/lib/python2.7/site-packages/requests python-urllib3 --> /usr/lib/python2.7/site-packages/urllib3 The SSL Adapter in contrail-controller/src/config/common/ssl_adapter.py gets installed as /usr/lib/python2.7/site-packages/cfgm_common/ssl_adapter.py . When using SSL against Keystone v3 from the contrail-api, that uses this code, on a system such as the above, there will be a class loader type bug, due to a incorrect order of imports in ssl_adapter.py. The intended ImportError doesn't happen, since the native urllib3 actually exists, which leads to a mixup of name space between the Pool Manager and the requests code, when executing. The proper fix is to reverse the order of the imports, and have the fallback become the base case. Any non-RDO system will trigger the ImportError, and load the module the regular way. And an RDO-based system works, as well. Change-Id: Iba275c3521b1cdde5595fa443b449fdd962286fb Closes-Bug: 1528851
- Loading branch information