From 9d64ad304266abc9a05a53e89aea449c202f7049 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20Gr=C3=B6n?= Date: Mon, 16 Oct 2023 14:55:28 +0200 Subject: [PATCH] Stop removing FIP-assoc when worker is removed --- controllers/openstackmachine_controller.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/controllers/openstackmachine_controller.go b/controllers/openstackmachine_controller.go index c551c82e70..95a2cc50fc 100644 --- a/controllers/openstackmachine_controller.go +++ b/controllers/openstackmachine_controller.go @@ -273,14 +273,6 @@ func (r *OpenStackMachineReconciler) reconcileDelete(scope scope.Scope, cluster } } - // If this is a worker node and it has a floating IP attached, disassociate it. - if !util.IsControlPlaneMachine(machine) && openStackMachine.Spec.FloatingIP != "" { - if err = networkingService.DisassociateFloatingIP(machine, openStackMachine.Spec.FloatingIP); err != nil { - conditions.MarkFalse(openStackMachine, infrav1.APIServerIngressReadyCondition, infrav1.FloatingIPErrorReason, clusterv1.ConditionSeverityError, "Disassociating floating IP failed: %v", err) - return ctrl.Result{}, fmt.Errorf("disassociate floating IP: %w", err) - } - } - instanceSpec := machineToInstanceSpec(openStackCluster, machine, openStackMachine, "") if err := computeService.DeleteInstance(openStackCluster, openStackMachine, instanceStatus, instanceSpec); err != nil {