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

MAPO-CAPO conversion errors out on empty MAPO Machine filter

XMLWordPrintable

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • ShiftStack Sprint 278
    • 1
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      As noted in this Slack thread, the MAPO-CAPO conversion functionality in Cluster CAPI Operator does not handle MAPO machines with the following network definition:

      "networks": [
          {
              "filter": {},
              "subnets": [
                  {
                      "filter": {
                          "tags": "openshiftClusterID=mwpr8pcm-51463-bsjhz"
                      }
                  }
              ]
          }
      ],
      

      When presented with these, the converter fails with error like so:

      2025-10-08T16:26:21.119478893Z E1008 16:26:21.118085       1 controller.go:347] "Reconciler error" err="unable to ensure CAPI infra machine template: unable to ensure Cluster API infrastructure machine template: failed to apply CAPI infrastructure machine template: OpenStackMachineTemplate.infrastructure.cluster.x-k8s.io \"mwpr8pcm-51463-bsjhz-worker-0-ca77ca27\" is invalid: [spec.template.spec.ports[0].network.filter: Invalid value: 0: spec.template.spec.ports[0].network.filter in body should have at least 1 properties, spec.template.spec.ports[0].fixedIPs[0].subnet: Too many: 2: must have at most 1 items, spec.template.spec.ports[0].fixedIPs[0].subnet.id: Invalid value: \"\": spec.template.spec.ports[0].fixedIPs[0].subnet.id in body must be of type uuid: \"\", <nil>: Invalid value: \"null\": some validation rules were not checked because the object was invalid; correct the existing errors to complete validation]" controller="MachineSetSyncController" controllerGroup="machine.openshift.io" controllerKind="MachineSet" MachineSet="openshift-machine-api/mwpr8pcm-51463-bsjhz-worker-0" namespace="openshift-machine-api" name="mwpr8pcm-51463-bsjhz-worker-0" reconcileID="372ba3f0-c970-4752-aff2-209d80a9f01c"
      

      These are standard Installer-derived machines, and while the definition is arguably incorrect, the conversion code shouldn't fail so badly.

              rh-ee-nbrubake Nolan Brubaker
              sfinucan@redhat.com Stephen Finucane
              None
              None
              Zhaohua Sun Zhaohua Sun
              None
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: