Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-37359

Simple curl localhost:<port> within hypershift guest cluster's pods fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • 4.16.z
    • HyperShift
    • None
    • Moderate
    • None
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      While debugging some issue, tried curl localhost:<port> within hypershift guest cluster's pods, found it failed. It only succeeded when manually unsetting the proxy env vars which are konnectivity socks5 proxy. This is confusing, because here it was to only curl localhost, it was not external traffic that needed the konnectivity socks5 proxy.

      Version-Release number of selected component (if applicable):

      4.16.0-0.nightly-2024-07-21-201123

      How reproducible:

      Always

      Steps to Reproduce:

      1. curl 127.0.0.1:6443 within below pod (oauth-openshift-84db455cb-cb6rs) of hypershift guest cluster:
      
      $ oc rsh -c oauth-server -n clusters-hypershift-ci-298393 oauth-openshift-84db455cb-cb6rs curl -k https://127.0.0.1:6443/healthz
      curl: (35) error:0A00010B:SSL routines::wrong version number
      command terminated with exit code 35
      
      $ oc rsh -c oauth-server -n clusters-hypershift-ci-298393 oauth-openshift-84db455cb-cb6rs
      sh-5.1$ curl -k https://127.0.0.1:6443/healthz
      curl: (35) error:0A00010B:SSL routines::wrong version number
      
      2. Unset the env variables as below, curl again:
      sh-5.1$ env | grep -i "proxy\b"
      NO_PROXY=kube-apiserver
      HTTPS_PROXY=socks5://127.0.0.1:8090
      HTTP_PROXY=socks5://127.0.0.1:8090
      ALL_PROXY=socks5://127.0.0.1:8090
      
      sh-5.1$ unset HTTPS_PROXY
      sh-5.1$ curl -k https://127.0.0.1:6443/healthz
      curl: (35) error:0A00010B:SSL routines::wrong version number
      
      sh-5.1$ unset ALL_PROXY
      sh-5.1$ curl -k https://127.0.0.1:6443/healthz
      ok
      

      Actual results:

      Simple "curl localhost:<port>" fails. Only succeeds after unsetting related env vars. This is confusing, because curl localhost is not external traffic.

      Expected results:

      Simple curl localhost should succeed without the need of checking and unsetting proxy.

      Additional info:

          

            cewong@redhat.com Cesar Wong
            xxia-1 Xingxing Xia
            Jie Zhao Jie Zhao
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: