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

Multiple MachineConfigs in one CM

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 4.15.z
    • HyperShift
    • Important
    • No
    • Rejected
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      When Hypershift runs large number of hosted clusters (> 370), the management cluster ETCD fills up and Hypershift begins to fail. One way to reduce the ETCD size while improving its performance is to reduce the number of stored objects, like config-maps.
      
      Currently if a hosted cluster's NodePool needs to reference multiple MachineConfig objects, each of those MachineConfigs has to be in its own config-map (referenced in NodePool spec.config). To reduce the number of config-maps Hypertshift needs ability to extract multiple MachineConfig objects from a single config-map.
      
      Currently if multiple MachineConfig objects is placed into a config-map, only the first one is recognized by the Nodepool Controller, all others are ignored.
      
      Nodepool controller code fix is required to support multiple MachineConfig objects in ignition-config config-maps.

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

          

      How reproducible:

      Always    

      Steps to Reproduce:

          1. Create Hypershift-hosted cluster
          2. Patch the cluster's default NodePool's spec.config to reference a single config-map that has multiple MachineConfig yamls inside it.
          3. Obtain ignition data from the ignition server.

      Actual results:

          The ignition has data from the first MachineConfig object inside the config-map, but all other MachineConfig objects are not there.

      Expected results:

          The ignition should have all MachineConfig object inside the config-map. 

      Additional info:

      Example of NodePool:
      ```
      apiVersion: hypershift.openshift.io/v1beta1
      kind: NodePool
      ...
      spec:
        arch: amd64
        clusterName: cg319sf10ghnddkvo8j0
        config:
        - name: ignition-config-98-ibm-machineconfig-cg319sf10ghnddkvo8j0    
      ...
      ```
      
      The ignition-config-98-ibm-machineconfig-cg319sf10ghnddkvo8j0 config-map has multiple MachineConfig yamls inside it separated by "---":
      ```
      apiVersion: v1
      data:
        config: |+
          ---
          apiVersion: machineconfiguration.openshift.io/v1
          kind: MachineConfig
          metadata:
            labels:
              machineconfiguration.openshift.io/role: worker
            name: 97-ibm-machineconfig-base
          spec:
            config:
              ignition:
                version: 2.2.0
              storage:
                files:
                - contents:
      ...
          ---
          apiVersion: machineconfiguration.openshift.io/v1
          kind: MachineConfig
          metadata:
            labels:
              machineconfiguration.openshift.io/role: worker
            name: 98-ibm-machineconfig-satellite
          spec:
            config:
              ignition:
                version: 2.2.0
              storage:
      ...
      ```
      
      Currently only the first MachineConfig "97-ibm-machineconfig-base" is processed, the other one "98-ibm-machineconfig-satellite" is skipped.

       

            agarcial@redhat.com Alberto Garcia Lamela
            michael.topchiev@ibm.com Michael Topchiev
            Jie Zhao Jie Zhao
            IBM Employee
            Michael Topchiev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: