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

A non existant ID in additionalNetworkIDs causes an unhandled failure

    • -
    • 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.
      

            [OCPBUGS-35420] A non existant ID in additionalNetworkIDs causes an unhandled failure

            Errata Tool added a comment -

            Since the problem described in this issue should be resolved in a recent advisory, it has been closed.

            For information on the advisory (Moderate: OpenShift Container Platform 4.17.0 bug fix and security update), and where to find the updated files, follow the link below.

            If the solution does not work for you, open a new bug report.
            https://access.redhat.com/errata/RHSA-2024:3718

            Errata Tool added a comment - Since the problem described in this issue should be resolved in a recent advisory, it has been closed. For information on the advisory (Moderate: OpenShift Container Platform 4.17.0 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2024:3718

            Verified on 4.17.0-0.nightly-2024-07-01-221530 on top of RHOS-17.1-RHEL-9-20240516.n.1

            $ openshift-install version
            openshift-install 4.17.0-0.nightly-2024-07-01-221530
            built from commit 961a1841dd22db508bfc57e848af6cb18e2e2fe4
            release image registry.ci.openshift.org/ocp/release@sha256:2b0526981d47a2388b6807267eb07dad5ae1bfbf5bb436cd609b4d10f9f90457
            release architecture amd64 
            $ cat install-config.yaml | grep controlPlane: -A5
            controlPlane:
              name: master
              platform:
                openstack:
                  zones: []
                  additionalNetworkIDs: [ffffffff-ffff-ffff-ffff-ffffffffffff] 
            (shiftstack) [stack@undercloud-0 ~]$ cp install-config.yaml ostest/ && openshift-install create cluster --dir ostest --log-level debug
            DEBUG OpenShift Installer 4.17.0-0.nightly-2024-07-01-221530 
            DEBUG Built from commit 961a1841dd22db508bfc57e848af6cb18e2e2fe4 
            DEBUG Fetching Metadata...                         
            DEBUG Loading Metadata...                          
            DEBUG   Loading Cluster ID...                      
            DEBUG     Loading Install Config...                
            DEBUG       Loading SSH Key...                     
            DEBUG       Loading Base Domain...                 
            DEBUG         Loading Platform...                  
            DEBUG       Loading Cluster Name...                
            DEBUG         Loading Base Domain...               
            DEBUG         Loading Platform...                  
            DEBUG       Loading Pull Secret...                 
            DEBUG       Loading Platform...                    
            WARNING Flavor does not meet the following recommended requirements: It is recommended to have 100 GB Disk, had 40 GB 
            WARNING Flavor does not meet the following recommended requirements: It is recommended to have 100 GB Disk, had 40 GB 
            ERROR failed to fetch Metadata: failed to load asset "Install Config": failed to create install config: [controlPlane.platform.openstack.additionalNetworkIDs[0]: Invalid value: "ffffffff-ffff-ffff-ffff-ffffffffffff": valid UUID v4 must be specified, controlPlane.platform.openstack.additionalNetworkIDs[0]: Invalid value: "ffffffff-ffff-ffff-ffff-ffffffffffff": Network either does not exist in this cloud, or is not available]  

            Ramón Lobillo added a comment - Verified on 4.17.0-0.nightly-2024-07-01-221530 on top of RHOS-17.1-RHEL-9-20240516.n.1 $ openshift-install version openshift-install 4.17.0-0.nightly-2024-07-01-221530 built from commit 961a1841dd22db508bfc57e848af6cb18e2e2fe4 release image registry.ci.openshift.org/ocp/release@sha256:2b0526981d47a2388b6807267eb07dad5ae1bfbf5bb436cd609b4d10f9f90457 release architecture amd64 $ cat install-config.yaml | grep controlPlane: -A5 controlPlane:   name: master   platform:     openstack:       zones: []       additionalNetworkIDs: [ffffffff-ffff-ffff-ffff-ffffffffffff] (shiftstack) [stack@undercloud-0 ~]$ cp install-config.yaml ostest/ && openshift-install create cluster --dir ostest --log-level debug DEBUG OpenShift Installer 4.17.0-0.nightly-2024-07-01-221530  DEBUG Built from commit 961a1841dd22db508bfc57e848af6cb18e2e2fe4  DEBUG Fetching Metadata...                          DEBUG Loading Metadata...                           DEBUG   Loading Cluster ID...                       DEBUG     Loading Install Config...                 DEBUG       Loading SSH Key...                      DEBUG       Loading Base Domain...                  DEBUG         Loading Platform...                   DEBUG       Loading Cluster Name...                 DEBUG         Loading Base Domain...                DEBUG         Loading Platform...                   DEBUG       Loading Pull Secret...                  DEBUG       Loading Platform...                     WARNING Flavor does not meet the following recommended requirements: It is recommended to have 100 GB Disk, had 40 GB  WARNING Flavor does not meet the following recommended requirements: It is recommended to have 100 GB Disk, had 40 GB  ERROR failed to fetch Metadata: failed to load asset "Install Config" : failed to create install config: [controlPlane.platform.openstack.additionalNetworkIDs[0]: Invalid value: "ffffffff-ffff-ffff-ffff-ffffffffffff" : valid UUID v4 must be specified, controlPlane.platform.openstack.additionalNetworkIDs[0]: Invalid value: "ffffffff-ffff-ffff-ffff-ffffffffffff" : Network either does not exist in this cloud, or is not available] 

              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: