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

A non existant ID in additionalNetworkIDs causes an unhandled failure

XMLWordPrintable

    • -
    • No
    • ShiftStack Sprint 255, ShiftStack Sprint 256
    • 2
    • False
    • Hide

      None

      Show
      None
    • Hide
      * Previously, setting an invalid Universally Unique Identifier (UUID) for the `additionalNetworkIDs` parameter of a machine pool in your `install-config` configuration file could result in the installation program exiting from installing the cluster. With this release, the installation program checks the validity of the `additionalNetworkIDs` parameter before the program continuing with installing the cluster so that this issue no longer persists. (link:https://issues.redhat.com/browse/OCPBUGS-35420[*OCPBUGS-35420*])
      Show
      * Previously, setting an invalid Universally Unique Identifier (UUID) for the `additionalNetworkIDs` parameter of a machine pool in your `install-config` configuration file could result in the installation program exiting from installing the cluster. With this release, the installation program checks the validity of the `additionalNetworkIDs` parameter before the program continuing with installing the cluster so that this issue no longer persists. (link: https://issues.redhat.com/browse/OCPBUGS-35420 [* OCPBUGS-35420 *])
    • Bug Fix
    • Done

      Description of problem:

      Setting a non-existant network ID in install-config as control plane additionalNetworkID makes CAPO panic with nil pointer dereference, and Installer does not give out a more explicit error.
      
      Installer should run a pre-flight check on the network ID, and CAPO should not panic.
      

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

      
      

      How reproducible:

      
      install-config:
      
      apiVersion: v1
      controlPlane:
        name: master
        platform:
          openstack:
            type: ${CONTROL_PLANE_FLAVOR}
            additionalNetworkIDs: [43e553c2-9d45-4fdc-b29e-233231faf46e]
      
      

      Steps to Reproduce:

      1. Add a non-existant network ID in controlPlane.platform.openstack.additionalNetworkIDs
      2. openshift-install create cluster
      3. enjoy
      

      Actual results:

      DEBUG I0613 15:32:14.683137  314433 machine_controller_noderef.go:60] "Waiting for infrastructure provider to report spec.providerID" controller="machine" controllerGroup="cluster.x-k8s.io" controllerKind="Machine" Machine="openshift-cluster-api-guests/ocp1-f4dwz-bootstrap" namespace="openshift-cluster-api-guests" name="ocp1-f4dwz-bootstrap" reconcileID="f89c5c84-4832-44ae-b522-bdfc8e1b0fdf" Cluster="openshift-cluster-api-guests/ocp1-f4dwz" Cluster="openshift-cluster-api-guests/ocp1-f4dwz" OpenStackMachine="openshift-cluster-api-guests/ocp1-f4dwz-bootstrap"
      DEBUG panic: runtime error: invalid memory address or nil pointer dereference [recovered]
      DEBUG   panic: runtime error: invalid memory address or nil pointer dereference
      DEBUG [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x1b737b5]
      DEBUG
      DEBUG goroutine 326 [running]:
      DEBUG sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile.func1()
      DEBUG   /var/home/pierre/code/src/github.com/openshift/installer.git/master/cluster-api/providers/openstack/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:116 +0x1e5
      DEBUG panic({0x1db4540?, 0x367bd90?})
      DEBUG   /var/home/pierre/sdk/go1.22.3/src/runtime/panic.go:770 +0x132
      DEBUG sigs.k8s.io/cluster-api-provider-openstack/pkg/cloud/services/networking.(*Service).CreatePort(0xc0003c71a0, {0x24172d0, 0xc000942008}, 0xc000a4e688)
      DEBUG   /var/home/pierre/code/src/github.com/openshift/installer.git/master/cluster-api/providers/openstack/vendor/sigs.k8s.io/cluster-api-provider-openstack/pkg/cloud/services/networking/port.go:195 +0xd55
      DEBUG sigs.k8s.io/cluster-api-provider-openstack/pkg/cloud/services/networking.(*Service).CreatePorts(0xc0003c71a0, {0x24172d0, 0xc000942008}, {0xc000a4e5a0, 0x2, 0x1b9b265?}, 0xc0008595f0)
      DEBUG   /var/home/pierre/code/src/github.com/openshift/installer.git/master/cluster-api/providers/openstack/vendor/sigs.k8s.io/cluster-api-provider-openstack/pkg/cloud/services/networking/port.go:336 +0x66
      DEBUG sigs.k8s.io/cluster-api-provider-openstack/controllers.getOrCreateMachinePorts(0xc000c53d10?, 0x242ebd8?)
      DEBUG   /var/home/pierre/code/src/github.com/openshift/installer.git/master/cluster-api/providers/openstack/vendor/sigs.k8s.io/cluster-api-provider-openstack/controllers/openstackmachine_controller.go:759 +0x59
      DEBUG sigs.k8s.io/cluster-api-provider-openstack/controllers.(*OpenStackMachineReconciler).reconcileNormal(0xc00052e480, {0x242ebd8, 0xc000af5c50}, 0xc000c53d10, {0xc000f27c50, 0x27}, 0xc000943908, 0xc000943188, 0xc000942008)
      DEBUG   /var/home/pierre/code/src/github.com/openshift/installer.git/master/cluster-api/providers/openstack/vendor/sigs.k8s.io/cluster-api-provider-openstack/controllers/openstackmachine_controller.go:602 +0x307
      DEBUG sigs.k8s.io/cluster-api-provider-openstack/controllers.(*OpenStackMachineReconciler).Reconcile(0xc00052e480, {0x242ebd8, 0xc000af5c50}, {{{0xc00064b280?, 0x0?}, {0xc000f3ecd8?, 0xc00076bd50?}}})
      DEBUG   /var/home/pierre/code/src/github.com/openshift/installer.git/master/cluster-api/providers/openstack/vendor/sigs.k8s.io/cluster-api-provider-openstack/controllers/openstackmachine_controller.go:162 +0xb6d
      DEBUG sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile(0x2434e10?, {0x242ebd8?, 0xc000af5c50?}, {{{0xc00064b280?, 0xb?}, {0xc000f3ecd8?, 0x0?}}})
      DEBUG   /var/home/pierre/code/src/github.com/openshift/installer.git/master/cluster-api/providers/openstack/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:119 +0xb7
      DEBUG sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc0005961e0, {0x242ec10, 0xc000988b40}, {0x1e7eda0, 0xc0009805e0})
      DEBUG   /var/home/pierre/code/src/github.com/openshift/installer.git/master/cluster-api/providers/openstack/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:316 +0x3bc
      DEBUG sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc0005961e0, {0x242ec10, 0xc000988b40})
      DEBUG   /var/home/pierre/code/src/github.com/openshift/installer.git/master/cluster-api/providers/openstack/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:266 +0x1c9
      DEBUG sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2()
      DEBUG   /var/home/pierre/code/src/github.com/openshift/installer.git/master/cluster-api/providers/openstack/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:227 +0x79
      DEBUG created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2 in goroutine 213
      DEBUG   /var/home/pierre/code/src/github.com/openshift/installer.git/master/cluster-api/providers/openstack/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:223 +0x50c
      DEBUG Checking that machine ocp1-f4dwz-bootstrap has provisioned...
      DEBUG Machine ocp1-f4dwz-bootstrap has not yet provisioned: Pending
      DEBUG Checking that machine ocp1-f4dwz-master-0 has provisioned...
      DEBUG Machine ocp1-f4dwz-master-0 has not yet provisioned: Pending
      DEBUG Checking that machine ocp1-f4dwz-master-1 has provisioned...
      DEBUG Machine ocp1-f4dwz-master-1 has not yet provisioned: Pending
      DEBUG Checking that machine ocp1-f4dwz-master-2 has provisioned...
      DEBUG Machine ocp1-f4dwz-master-2 has not yet provisioned: Pending
      DEBUG Checking that machine ocp1-f4dwz-bootstrap has provisioned...
      DEBUG Machine ocp1-f4dwz-bootstrap has not yet provisioned: Pending
      DEBUG Checking that machine ocp1-f4dwz-master-0 has provisioned...
      DEBUG Machine ocp1-f4dwz-master-0 has not yet provisioned: Pending
      [...]
      

      Expected results:

      ERROR "The additional network $ID was not found in OpenStack."
      

      Additional info:

      A separate report will be filed against CAPO.
      

            pprinett@redhat.com Pierre Prinetti
            pprinett@redhat.com Pierre Prinetti
            Ramón Lobillo Ramón Lobillo
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: