Uploaded image for project: 'Red Hat OpenStack Services on OpenShift'
  1. Red Hat OpenStack Services on OpenShift
  2. OSPRH-10381

octavia tls tests fail with TypeError expected str, bytes or os.PathLike object, not SSLContext

XMLWordPrintable

    • 1
    • False
    • Hide

      None

      Show
      None
    • False
    • ?
    • ?
    • python-octavia-tests-tempest-2.6.0-18.0.20241010104715.a1a2bed.el9ost
    • ?
    • ?
    • None
    • Moderate

      Some tls tests
      octavia_tempest_plugin.tests.barbican_scenario.v2.test_tls_barbican.TLSWithBarbicanTest * test_http_1_1_tls_traffic[id-a0dff0f2-d53e-497c-9ded-dca64e82991f]

      • test_http_2_tls_traffic[id-9965828d-24af-4fa0-91ae-21c6bc47ab4c]

      fail with an error:

      Traceback (most recent call last):
        File "/usr/lib/python3.9/site-packages/octavia_tempest_plugin/tests/barbican_scenario/v2/test_tls_barbican.py", line 1264, in test_http_2_tls_traffic
          self._test_http_versions_tls_traffic('HTTP/2', ['h2', 'http/1.1'])
        File "/usr/lib/python3.9/site-packages/octavia_tempest_plugin/tests/barbican_scenario/v2/test_tls_barbican.py", line 1258, in _test_http_versions_tls_traffic
          client = httpx.Client(http2=(http_version == 'HTTP/2'), verify=context)
        File "/usr/lib/python3.9/site-packages/httpx/_client.py", line 673, in __init__
          self._transport = self._init_transport(
        File "/usr/lib/python3.9/site-packages/httpx/_client.py", line 721, in _init_transport
          return HTTPTransport(
        File "/usr/lib/python3.9/site-packages/httpx/_transports/default.py", line 126, in __init__
          ssl_context = create_ssl_context(verify=verify, cert=cert, trust_env=trust_env)
        File "/usr/lib/python3.9/site-packages/httpx/_config.py", line 49, in create_ssl_context
          return SSLConfig(
        File "/usr/lib/python3.9/site-packages/httpx/_config.py", line 73, in __init__
          self.ssl_context = self.load_ssl_context()
        File "/usr/lib/python3.9/site-packages/httpx/_config.py", line 85, in load_ssl_context
          return self.load_ssl_context_verify()
        File "/usr/lib/python3.9/site-packages/httpx/_config.py", line 114, in load_ssl_context_verify
          elif Path(self.verify).exists():
        File "/usr/lib64/python3.9/pathlib.py", line 1082, in __new__
          self = cls._from_parts(args, init=False)
        File "/usr/lib64/python3.9/pathlib.py", line 707, in _from_parts
          drv, root, parts = self._parse_args(args)
        File "/usr/lib64/python3.9/pathlib.py", line 691, in _parse_args
          a = os.fspath(a)
      TypeError: expected str, bytes or os.PathLike object, not SSLContext 

      It was already reported upstream:

      https://storyboard.openstack.org/#!/story/2010902

      Patch still in review

      https://review.opendev.org/c/openstack/octavia-tempest-plugin/+/893607

       

            rhn-support-gthiemon Gregory Thiemonge
            rhn-support-gthiemon Gregory Thiemonge
            rhos-dfg-networking-squad-vans
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: