Skip to content

Commit

Permalink
Merge pull request #122 from jwcesign/main
Browse files Browse the repository at this point in the history
fix: check node creation result
  • Loading branch information
jwcesign authored Nov 13, 2024
2 parents f2ed819 + ce23744 commit 8c6e705
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/providers/instance/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"errors"
"fmt"
"math"
"net/http"
"strings"

ecsclient "github.com/alibabacloud-go/ecs-20140526/v4/client"
Expand Down Expand Up @@ -361,6 +362,9 @@ func (p *DefaultProvider) launchInstance(ctx context.Context, nodeClass *v1alpha
if err != nil {
return nil, nil, fmt.Errorf("creating auto provisioning group, %w", err)
}
if resp == nil || tea.Int32Value(resp.StatusCode) != http.StatusOK {
return nil, nil, fmt.Errorf("creating auto provision group, %s", tea.Prettify(resp))
}

return resp.Body.LaunchResults.LaunchResult[0], createAutoProvisioningGroupRequest, nil
}
Expand Down

0 comments on commit 8c6e705

Please sign in to comment.