From 7430dccff1f29aac0b1c5d649306236442f13540 Mon Sep 17 00:00:00 2001 From: Jonathan Innis Date: Tue, 14 May 2024 16:49:51 -0500 Subject: [PATCH] Add ordering fix for inflightIPs --- pkg/providers/subnet/subnet.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/providers/subnet/subnet.go b/pkg/providers/subnet/subnet.go index 564cbe7788f9..c50d529ba4e1 100644 --- a/pkg/providers/subnet/subnet.go +++ b/pkg/providers/subnet/subnet.go @@ -130,7 +130,10 @@ func (p *Provider) ZonalSubnetsForLaunch(ctx context.Context, nodeClass *v1beta1 if ips, ok := p.inflightIPs[*subnets[j].SubnetId]; ok { jIPs = ips } - return iIPs < jIPs + if iIPs != jIPs { + return iIPs < jIPs + } + return *subnets[i].SubnetId < *subnets[j].SubnetId }) for _, subnet := range subnets { zonalSubnets[*subnet.AvailabilityZone] = subnet