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

ibm_pi_instance not failing on ERROR state #1879

Closed
yussufsh opened this issue Sep 11, 2020 · 6 comments · Fixed by #1935
Closed

ibm_pi_instance not failing on ERROR state #1879

yussufsh opened this issue Sep 11, 2020 · 6 comments · Fixed by #1935

Comments

@yussufsh
Copy link
Collaborator

Terraform continue to create instance for 2 hours even when GUI shows instance in ERROR state.

Also, the instance create timeout value should be customizable.

Terraform Version

terraform version

Terraform v0.13.2

  • provider registry.terraform.io/ibm-cloud/ibm v1.11.2

Affected Resource(s)

Please list the resources as a list, for example:

  • ibm_pi_instance

Expected Behavior

ibm_pi_instance should exit with error if instance status is ERROR.

Actual Behavior

ibm_pi_instance continously wait for Available, OK state till timeout.

Important Factoids

There was some maintanance at the CoLo side which turned the instance into ERROR state.

@yussufsh
Copy link
Collaborator Author

@bpradipt

@surajsub
Copy link
Contributor

Also please note that this is not a terraform issue. This is a power / cloud colo issue.

@bpradipt
Copy link

Also please note that this is not a terraform issue. This is a power / cloud colo issue.

Yes true, it's not a TF issue. It's a colo issue and there could be other such cases where instances errors out as we are seeing.
Providing some flexibility in the provider to fail fast will help the end user experience.

@hkantare
Copy link
Collaborator

Like other resources (VPC instances, soon ) we need to add Target for even Error or failed state

Target: []string{isInstanceStatusRunning, "available", "failed", ""},
and come out from the wait logic

@hkantare
Copy link
Collaborator

Target: []string{"OK", "ACTIVE", helpers.PIInstanceHealthOk},

Add the keyword for failed or error based on the API response (keyword for error)

@surajsub
Copy link
Contributor

I spoke to the power team. they did provide me with some input. I will submit another PR

yussufsh added a commit to yussufsh/terraform-provider-ibm that referenced this issue Sep 30, 2020
Fixes IBM-Cloud#1879

Signed-off-by: Yussuf Shaikh <yussuf.shaikh@ibm.com>
hkantare pushed a commit that referenced this issue Oct 1, 2020
Fixes #1879

Signed-off-by: Yussuf Shaikh <yussuf.shaikh@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants