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

delete timeout is too short #852

Closed
glehmann opened this issue Dec 13, 2017 · 2 comments · Fixed by #856
Closed

delete timeout is too short #852

glehmann opened this issue Dec 13, 2017 · 2 comments · Fixed by #856
Assignees

Comments

@glehmann
Copy link

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

0.11.0

Affected Resource(s)

at least, but may happen on other resources:

  • google_compute_instance

Terraform Configuration Files

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key.

Debug Output


1 error(s) occurred:

* google_compute_instance.main: Error waiting for instance to delete: timeout while waiting for state to become 'DONE' (last state: 'RUNNING', timeout: 4m0s)

Expected Behavior

terraform should wait long enough at destruction time

Actual Behavior

it exited before the deletion completion, and leaved a terraform.tfstate file not consistent with the gce state

Steps to Reproduce

Hard to do unfortunately — I guess it depends a lot on the gce load

Proposed fix

I'm quite sure I'm missing a lot of side effects, but this could be a simple fix for this issue:

diff --git a/google/compute_operation.go b/google/compute_operation.go
index 52c64a7..24cefba 100644
--- a/google/compute_operation.go
+++ b/google/compute_operation.go
@@ -66,7 +66,7 @@ func (e ComputeOperationError) Error() string {
 }
 
 func computeOperationWait(client *compute.Service, op *compute.Operation, project, activity string) error {
-       return computeOperationWaitTime(client, op, project, activity, 4)
+       return computeOperationWaitTime(client, op, project, activity, 10)
 }
 
 func computeOperationWaitTime(client *compute.Service, op *compute.Operation, project, activity string, timeoutMin int) error {
@rosbo
Copy link
Contributor

rosbo commented Dec 13, 2017

Note to implementer:

@rosbo rosbo self-assigned this Dec 14, 2017
modular-magician added a commit to modular-magician/terraform-provider-google that referenced this issue Sep 27, 2019
@ghost
Copy link

ghost commented Mar 30, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Mar 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants