Skip to content

Commit 3cff30b

Browse files
Fix nodepool reconciliation issue (#327)
* Fix reconciliation comparisons when there are no NSGs
1 parent 4be9fc9 commit 3cff30b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

cloud/scope/util.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ const (
2626

2727
// GetNsgNamesFromId returns the names of the NSGs with the provided IDs
2828
func GetNsgNamesFromId(ids []string, nsgs []*infrastructurev1beta2.NSG) []string {
29+
if len(ids) == 0 {
30+
return nil
31+
}
2932
names := make([]string, 0)
3033
for _, id := range ids {
3134
for _, nsg := range nsgs {

exp/controllers/ocimanaged_machinepool_controller.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,6 @@ func (r *OCIManagedMachinePoolReconciler) reconcileManagedMachines(ctx context.C
357357
specInfraMachines := make([]infrav2exp.OCIMachinePoolMachine, 0)
358358
for _, node := range nodePool.Nodes {
359359
// deleted/failing nodes should not be added to spec
360-
machinePoolScope.Info(string(node.LifecycleState))
361360
if node.LifecycleState == oke.NodeLifecycleStateDeleted || node.LifecycleState == oke.NodeLifecycleStateFailing {
362361
continue
363362
}

0 commit comments

Comments
 (0)