-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Conversation
Whoops, forgot that I already had a PR in this branch. This is now the full fix. Updating description. |
google/resource_container_cluster.go
Outdated
return waitErr | ||
} | ||
|
||
log.Printf("[INFO] GKE cluster %s has been updated to %s", d.Id(), |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
hashicorp#291) * Better error handling for GKE operations * Handle GKE version upgrades * clarify log message
hashicorp#291) * Better error handling for GKE operations * Handle GKE version upgrades * clarify log message
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! |
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.