From ad8dee2694a159432127e5e15b2819588512793c 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 baf1abf23814..682d1619914f 100644 --- a/pkg/providers/subnet/subnet.go +++ b/pkg/providers/subnet/subnet.go @@ -138,7 +138,10 @@ func (p *DefaultProvider) ZonalSubnetsForLaunch(ctx context.Context, nodeClass * 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