Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When creating a node pool, wait for all expected nodes to be ready before returning #1733

Open
ldming opened this issue May 8, 2023 · 0 comments

Comments

@ldming
Copy link

ldming commented May 8, 2023

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

When creating a k8s cluster containing a node pool, after the cluster is created, the nodes in the node pool are still being created and cannot be used normally. Expected node pool to wait for all expected nodes to be ready before returning.

I have reviewed the code and found that when creating a node pool, it will wait for the node pool to reach normal state and return.

	// wait for status ok
	err = resource.Retry(5*readRetryTimeout, func() *resource.RetryError {
		nodePool, _, errRet := service.DescribeNodePool(ctx, clusterId, nodePoolId)
		if errRet != nil {
			return retryError(errRet, InternalError)
		}
		if nodePool != nil && *nodePool.LifeState == "normal" {
			return nil
		}
		return resource.RetryableError(fmt.Errorf("node pool status is %s, retry...", *nodePool.LifeState))
	})

However, normal state does not necessarily mean that all the expected nodes are already ready. IMO, before the expected nodes are ready, set the state to normal is incorrect, keep the creating state should be more reasonable.

It's like, when I go to a restaurant for dinner, the waiter gives me an empty plate and says the meal is ready, but it's an empty plate. Where is my meal? The waiter should tell me that my meal is being prepared and will be ready later, rather than giving me an empty plate and telling me that it is ready.

New or Affected Resource(s)

  • resource_tc_kubernetes_node_pool.go

Potential Terraform Configuration

N/A

References

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant