Uploaded image for project: 'OpenShift Service Mesh'
  1. OpenShift Service Mesh
  2. OSSM-8022

Cypress test fails when Kiali pod is restarted on OCP 4.16+

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • Kiali
    • None
    • False
    • None
    • False
    • Hide
      • Install the latest OSSM and Kiali operators from OperatorHub
      • Create `istio-system` project and create basic SMCP
        oc new-project istio-system
        oc create -f - <<EOF
        apiVersion: maistra.io/v2
        kind: ServiceMeshControlPlane
        metadata:
          name: basic
        spec:
          addons:
            kiali:
              enabled: true
          version: v2.6
        EOF
        oc wait -n istio-system --for condition=Ready smcp/basic --timeout 300s
        oc wait -n istio-system --for=condition=Successful kiali/kiali --timeout=300s
        oc wait -n istio-system --for=condition=available deployment/kiali --timeout=300s
      • Clone kiali with the reproducer
        mkdir /tmp/reproducer && cd /tmp/reproducer
        git clone -b reproducerOCP416 https://github.com/mkralik3/kiali.git && cd kiali/frontend/cypress/
        
      • Set up required ENVs ( you need to set up OCP_CRED_PSW and OCP_CRED_USERNAME before )
        KIALI_ROUTE=$(oc get route kiali -n istio-system -o=jsonpath='{.spec.host}')
        export CYPRESS_BASE_URL="https://${KIALI_ROUTE}"
        export CYPRESS_PASSWD=${OCP_CRED_PSW}
        export CYPRESS_USERNAME=${OCP_CRED_USERNAME}
        
      • Run cypress and run reproducer reproducer.features ( you will see an error with OCP 4.16 after kiali pod is restarted... you can see that it is working on OCP 4.15 )
        yarn install
        yarn cypress
        
      Show
      Install the latest OSSM and Kiali operators from OperatorHub Create `istio-system` project and create basic SMCP oc new -project istio-system oc create -f - <<EOF apiVersion: maistra.io/v2 kind: ServiceMeshControlPlane metadata: name: basic spec: addons: kiali: enabled: true version: v2.6 EOF oc wait -n istio-system -- for condition=Ready smcp/basic --timeout 300s oc wait -n istio-system -- for =condition=Successful kiali/kiali --timeout=300s oc wait -n istio-system -- for =condition=available deployment/kiali --timeout=300s Clone kiali with the reproducer mkdir /tmp/reproducer && cd /tmp/reproducer git clone -b reproducerOCP416 https: //github.com/mkralik3/kiali.git && cd kiali/frontend/cypress/ Set up required ENVs ( you need to set up OCP_CRED_PSW and OCP_CRED_USERNAME before ) KIALI_ROUTE=$(oc get route kiali -n istio-system -o=jsonpath= '{.spec.host}' ) export CYPRESS_BASE_URL= "https: //${KIALI_ROUTE}" export CYPRESS_PASSWD=${OCP_CRED_PSW} export CYPRESS_USERNAME=${OCP_CRED_USERNAME} Run cypress and run reproducer reproducer.features ( you will see an error with OCP 4.16 after kiali pod is restarted... you can see that it is working on OCP 4.15 ) yarn install yarn cypress

      When the Kiali pod is restarted during the test execution ( e.g. SMCP member is added to the mesh, e.g. when before test hooks reinstall the demo application ) the next UI step in a test always fails on

           CypressError: `cy.visit()` failed trying to load:
      
      https://kiali-istio-system.apps.user-rhos-d-08.servicemesh.rhqeaws.com/console/services?refresh=0
      
      We attempted to make an http request to this URL but the request failed without a response.
      
      We received this error at the network level:
      
        > Error: ESOCKETTIMEDOUT
      


      It happens only on OCP 4.16+.
      Maybe the session cookie is being invalidated after Kiali pod is restarted. (IDK)
      It doesn't happen on OCP 4.15.

      I have prepared a simple reproducer for that https://github.com/mkralik3/kiali/commit/d7823c9ca01af98f24db35fb85ed6a2e9abb68ab (see Steps to Reproduce section in JIRA with step-by-step reproducer)

      Video with reproducer on OCP 4.16 (fail): ocp4.16.webm
      Video with reproducer on OCP 4.15 (pass): ocp415.webm

        1. image.png
          91 kB
          Matej Kralik
        2. ocp4.16.webm
          8.22 MB
          Matej Kralik
        3. ocp415.webm
          9.34 MB
          Matej Kralik

              rhn-support-pmarek Pavel Marek
              mkralik@redhat.com Matej Kralik
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: