Uploaded image for project: 'MicroShift'
  1. MicroShift
  2. USHIFT-5898

Unrecognized 'type' values in config.yaml are silently ignored

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • openshift-4.20
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • 2
    • Important
    • None
    • uShift Sprint 273
    • None
    • None
    • None

      Description of problem:

      The Generic Device Plugin (GDP) configuration parsing in MicroShift, specifically when evaluating the type field for paths (e.g., path.Type), does not properly handle values that do not exactly match DevicePathType ("Device") or MountPathType ("Mount"). This includes mis-cased values (e.g., "device", "mount") or arbitrary typos. Such unrecognized values cause the specific path configuration to be silently ignored, leading to unexpected behavior without any error or warning to the user
      

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

      4.20
      

      How reproducible:

      always
      

      Steps to Reproduce:

      1. Install microshift 4.20 cluster
      2. Now create a file on the host `echo "Hello, testing gdp" > /tmp/myconfig.txt
      3. Now add below content into the microshift config.yaml and restart microshift
      4. Now create a pod with the spec below
      

      Actual results:

      I see that file is not visible inside the container as the way type: mount was configured was incorrect, instead it should have been `type: Mount`
      

      Expected results:

       If an unrecognized or invalid type value is provided, it should log an error or warning message, indicating that the configuration for that path could not be processed due to an invalid type
      (or)
      Potentially fall back to a default Type (e.g., DevicePathType) after logging a warning about the unrecognized input or normalize input 
      

      Additional info:

      https://redhat-internal.slack.com/archives/C03CJTNLKAT/p1752049186199299
      

              pmatusza@redhat.com Patryk Matuszak
              knarra@redhat.com Rama Kasturi Narra
              None
              None
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: