Skip to content

Commit

Permalink
cloud: fixed typo UnfulfillableCapacity
Browse files Browse the repository at this point in the history
  • Loading branch information
lzap authored and croissanne committed Sep 26, 2024
1 parent b2548f5 commit 65d5f48
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/cloud/awscloud/mocks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ func (m *ec2mock) CreateFleet(ctx context.Context, input *ec2.CreateFleetInput,
return &ec2.CreateFleetOutput{
Errors: []ec2types.CreateFleetError{
{
ErrorCode: aws.String("UnfillableCapacity"),
ErrorCode: aws.String("UnfulfillableCapacity"),
ErrorMessage: aws.String("Msg"),
},
},
Expand Down
4 changes: 2 additions & 2 deletions internal/cloud/awscloud/secure-instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -547,8 +547,8 @@ func (a *AWS) createFleet(input *ec2.CreateFleetInput) (*ec2.CreateFleetOutput,
return nil, fmt.Errorf("Unable to create spot fleet: %w", err)
}

if len(createFleetOutput.Errors) > 0 && *createFleetOutput.Errors[0].ErrorCode == "UnfillableCapacity" {
logrus.Warn("Received UnfillableCapacity from CreateFleet, retrying CreateFleet with OnDemand instance")
if len(createFleetOutput.Errors) > 0 && *createFleetOutput.Errors[0].ErrorCode == "UnfulfillableCapacity" {
logrus.Warn("Received UnfulfillableCapacity from CreateFleet, retrying CreateFleet with OnDemand instance")
input.SpotOptions = nil
createFleetOutput, err = a.ec2.CreateFleet(context.Background(), input)
}
Expand Down

0 comments on commit 65d5f48

Please sign in to comment.