From 28b83594452b195cc1e8b412bdd3a3bb2a91e2d9 Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Thu, 9 Nov 2023 13:03:03 -0500 Subject: [PATCH] Handle non-nil, empty Instances return refs #20978 Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- lib/cloud/ec2/ec2.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cloud/ec2/ec2.go b/lib/cloud/ec2/ec2.go index 0d181be0e9..07a146d99f 100644 --- a/lib/cloud/ec2/ec2.go +++ b/lib/cloud/ec2/ec2.go @@ -327,7 +327,7 @@ func (instanceSet *ec2InstanceSet) Create( atomic.StoreInt32(&instanceSet.currentSubnetIDIndex, int32(tryIndex)) break } - if rsv == nil { + if rsv == nil || len(rsv.Instances) == 0 { return nil, wrapError(errToReturn, &instanceSet.throttleDelayCreate) } return &ec2Instance{ -- 2.30.2