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

[enterprise-4.17] Degraded machine config

XMLWordPrintable

    • Low
    • None
    • 3
    • T&PS 2024 #13
    • 1
    • False
    • Hide

      None

      Show
      None
    • Hide
      24-12-16: Merged
      24-12-09: Verified myself and sent for review
      24-12-06: PR created https://github.com/openshift/openshift-docs/pull/85914
      Show
      24-12-16: Merged 24-12-09: Verified myself and sent for review 24-12-06: PR created https://github.com/openshift/openshift-docs/pull/85914

      Description of problem:

      Copy pasting the yaml describe in this documentation, will lead to a degraded machineconfigpool.
      
      ~~~
      Configuring MetalLB with secondary networks
      Enable forwarding for a specific secondary interface, such as bridge-net by creating and applying a MachineConfig CR.
      Save the following YAML in the enable-ip-forward.yaml file:
      
      apiVersion: machineconfiguration.openshift.io/v1
      kind: MachineConfig
      metadata:
        labels:
          machineconfiguration.openshift.io/role: <node_role> 
        name: 81-enable-global-forwarding
      spec:
        config:
          ignition:
            version: 3.2.0
          storage:
            files:
            - contents:
                source: data:text/plain;charset=utf-8;base64,`echo -e "net.ipv4.conf.bridge-net.forwarding = 1\nnet.ipv6.conf.bridge-net.forwarding = 1\nnet.ipv4.conf.bridge-net.rp_filter = 0\nnet.ipv6.conf.bridge-net.rp_filter = 0" | base64 -w0`
                 verification: {}
              filesystem: root
              mode: 644
              path: /etc/sysctl.d/enable-global-forwarding.conf
        osImageURL: ""
      ~~~
      
      The following part of the machineconfig need to be interpreted by a shell before applying the result.
      
      `echo -e "net.ipv4.conf.bridge-net.forwarding = 1\nnet.ipv6.conf.bridge-net.forwarding = 1\nnet.ipv4.conf.bridge-net.rp_filter = 0\nnet.ipv6.conf.bridge-net.rp_filter = 0" | base64 -w0`
      
      If not, you will fall into an error in the mcp.
      # oc get mcp master  -o yaml
      ...
        - lastTransitionTime: "2024-11-29T14:19:58Z"
          message: |
            Failed to render configuration for pool master: could not generate rendered MachineConfig: parsing Ignition config spec v3 failed with error: config is not valid
            Report: error at $.storage.files.0.contents.source, line 1 col 75: invalid data character
            warning at $.storage.files.0.filesystem, line 1 col 306: Unused key filesystem
      
      
      
      
      

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

      4.16, but will be the same on 4.17    

      How reproducible:

          oc apply -f mc-global-forward
      

      Steps to Reproduce:

          1.
          2.
          3.
          

      Actual results:

          machineconfigpool is in degraded

      Expected results:

          machineconfig created and machineconfigpool applied

      Additional info:

          

              rhn-support-kquinn Kevin Quinn
              rhn-support-jpeyrard Johann Peyrard
              Evgeny Levin Evgeny Levin
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: