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

Add type validation in installer for MTU and similar numeric fields in install-config.yaml

XMLWordPrintable

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • None
    • In Progress
    • Bug Fix
    • Hide
      *Cause*: What actions or circumstances cause this bug to present.
      *Consequence*: What happens when the bug presents.
      *Fix*: What was done to fix the bug.
      *Result*: Bug doesn’t present anymore.
      Show
      *Cause*: What actions or circumstances cause this bug to present. *Consequence*: What happens when the bug presents. *Fix*: What was done to fix the bug. *Result*: Bug doesn’t present anymore.
    • None
    • None
    • None
    • None

      This is a clone of issue OCPBUGS-60752. The following is the description of the original issue:

      Description of problem:

      When defining networkConfig inside install-config.yaml for a baremetal IPI deployment, users can specify the mtu field as a string (e.g., "1500").
      Although this is valid YAML and passes openshift-install create manifests, it fails later when nmstatectl processes the generated config, because mtu must be an integer.
      This leads to confusing runtime errors deep inside nmstate instead of failing early during installer validation.    

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

      4.18.z    

      How reproducible:

          

      Steps to Reproduce:

          1. Create an install-config.yaml with a networkConfig section containing: 
             mtu: "1500"
           
          2. Run: openshift-install create manifests
      
          3. Validate the generated config with nmstatectl:
             nmstatectl gc test.yaml
           

      Actual results:

      Installer accepts mtu: "1500" without warning.
      nmstatectl fails with error:
      
      nm_wired_setting.props.mtu = setting.mtu
      TypeError: expected int, got str    

      Expected results:

      Installer should validate mtu as an integer and reject string values.
      
      
      openshift-install create manifests should fail early with a clear error message (e.g., mtu must be an integer, not a string).    

      Additional info:

          

              jadha Jad Haj Yahya
              rhn-support-chdeshpa Chinmay Deshpande
              None
              None
              Jad Haj Yahya Jad Haj Yahya
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: