Skip to content

Commit

Permalink
Set State to InstanceCreating for nodes that failed to join cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
vbhargav875 committed Jul 30, 2024
1 parent 3914bde commit 0dd9ea5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ func (m *ociManagerImpl) GetNodePoolNodes(np NodePool) ([]cloudprovider.Instance
instances = append(instances, cloudprovider.Instance{
Id: *node.Id,
Status: &cloudprovider.InstanceStatus{
State: cloudprovider.InstanceCreating,
ErrorInfo: &cloudprovider.InstanceErrorInfo{
ErrorClass: errorClass,
ErrorCode: *node.NodeError.Code,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ func TestGetNodePoolNodes(t *testing.T) {
{
Id: "node6",
Status: &cloudprovider.InstanceStatus{
State: cloudprovider.InstanceCreating,
ErrorInfo: &cloudprovider.InstanceErrorInfo{
ErrorClass: cloudprovider.OtherErrorClass,
ErrorCode: "unknown",
Expand All @@ -164,6 +165,7 @@ func TestGetNodePoolNodes(t *testing.T) {
{
Id: "node7",
Status: &cloudprovider.InstanceStatus{
State: cloudprovider.InstanceCreating,
ErrorInfo: &cloudprovider.InstanceErrorInfo{
ErrorClass: cloudprovider.OutOfResourcesErrorClass,
ErrorCode: "LimitExceeded",
Expand All @@ -174,6 +176,7 @@ func TestGetNodePoolNodes(t *testing.T) {
{
Id: "node8",
Status: &cloudprovider.InstanceStatus{
State: cloudprovider.InstanceCreating,
ErrorInfo: &cloudprovider.InstanceErrorInfo{
ErrorClass: cloudprovider.OutOfResourcesErrorClass,
ErrorCode: "InternalServerError",
Expand Down

0 comments on commit 0dd9ea5

Please sign in to comment.