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

Allow upgrading GKE versions and provide better error message handling #291

Merged
merged 3 commits into from
Aug 8, 2017

Conversation

danawillow
Copy link
Contributor

@danawillow danawillow commented Aug 3, 2017

When a GKE operation fails, it doesn't actually populate the error return value. Instead, it sets StatusMessage to some value (see https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.operations). If statusMessage is set, we know an error has occurred.

The error message that was getting hidden in #223 was that you can't upgrade a node past the master version. This fix upgrades the master and then the node upon update. If it seems useful in the future, we can separate node/master version fields.

Fixes #223.

@danawillow
Copy link
Contributor Author

Whoops, forgot that I already had a PR in this branch. This is now the full fix. Updating description.

@danawillow danawillow changed the title Better error handling for GKE operations Allow upgrading GKE versions and provide better error message handling Aug 7, 2017
return waitErr
}

log.Printf("[INFO] GKE cluster %s has been updated to %s", d.Id(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a similar log statement after the node version update.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There already was one, so I changed them a bit to differentiate between the master and node upgrades

@danawillow danawillow merged commit e9e9f83 into hashicorp:master Aug 8, 2017
@danawillow danawillow deleted the is-223 branch August 8, 2017 18:31
z1nkum pushed a commit to z1nkum/terraform-provider-google that referenced this pull request Aug 15, 2017
hashicorp#291)

* Better error handling for GKE operations

* Handle GKE version upgrades

* clarify log message
negz pushed a commit to negz/terraform-provider-google that referenced this pull request Oct 17, 2017
hashicorp#291)

* Better error handling for GKE operations

* Handle GKE version upgrades

* clarify log message
luis-silva pushed a commit to luis-silva/terraform-provider-google that referenced this pull request May 21, 2019
@ghost
Copy link

ghost commented Mar 31, 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 31, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Terraform apply with GCS Bucket remote state and node upgrade doesn't seem to work
2 participants