Uploaded image for project: 'Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces) '
  1. Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces)
  2. CRW-7884

Kubeconfig token injection periodically fails with persistent storage

XMLWordPrintable

    • False
    • None
    • False

      Description of problem:

      Under certain circumstances, the injection of the kubeconfig file with a valid user token may fail, causing the user to be unable to access the API within the workspace.

      This is assumed to be related to CRW-7126, since attempting the test from this fix sometimes triggers a failure. From testing, this appears to be related to a parsing issue with the kubeconfig, as loading the workspace sometimes showed it to be stripped of newlines. In a JSON file, this would be fine, but the file would also occasionally be saved in YAML, which cannot tolerate the newlines missing.

      As of now, a hard restart on the workspace (sometimes more than once) should fix the issue.

      Prerequisites (if any, like setup, operators/versions):

      • OpenShift 4.15 or 4.16 cluster
      • OpenShift Dev Spaces 3.16.1

      Steps to Reproduce

       # Open up any workspace with persistent storage enabled (per-user, if it matters)

      1. Follow the repro steps in CRW-7126 (namely: invalidate the token with random data)
      2. Restart workspace

       

      Actual results:

      On restart, workspace may sometimes bear a malformed kubeconfig; it might in YAML or JSON, and may be missing newline characters. If its both in YAML and missing newlines, it will fail to load credentials and the user will not be able to reach API from within the workspace.

      Expected results:

      On restart, the workspace will have a properly formatted kubeconfig with a working token, that may be consistently in one format or other, but not either.

      Reproducibility (Always/Intermittent/Only Once):

      Intermittent, with no clear cause.

      Acceptance criteria: 

      The kubeconfig is output in the same way on each restart.
       

      Definition of Done:

      Build Details:

      Additional info (Such as Logs, Screenshots, etc):

       

       *

              ivinokur-1 Igor Vinokur
              rhn-support-jorbell Jordan Bell
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: