-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[aws-eks] EKS update failure causes the cluster to be deleted #4310
Labels
Comments
lkoniecz
added
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
labels
Oct 1, 2019
RomainMuller
added
the
@aws-cdk/aws-eks
Related to Amazon Elastic Kubernetes Service
label
Oct 1, 2019
NGL321
added
in-progress
This issue is being actively worked on.
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Oct 4, 2019
The root cause for cluster deletion upon failed updates is that we do not mirror the physical resource ID we received as an input in case of a failure. |
eladb
pushed a commit
that referenced
this issue
Oct 26, 2019
Our custom resource naively tried to call the UpdateCluster API for updates, but this is in fact not inline with how AWS::EKS::Cluster is implemented. This change modifies the custom resource handler to handle updates based on the same specification as the official CloudFormation resource: - Changes the cluster name, VPC or role will cause a replacement (creation of a cluster with a new name and removal of the old cluster). - Changes to the version will use the UpdateClusterVersion API to update the version in-place. This fixes #4311. This commit also fixes #4310 which caused cluster deletions when updates failed. The root cause was that when errors were reported to CFN we always used the log stream name as the physical resource ID, and CFN thought we wanted to replace the resource. Oouch. This change was manually tested since we still don't have a good unit test harness for this resource so we manually tested all types of updates and observed that the appropriate behaviour was taken (replacements, in-place).
mergify bot
pushed a commit
that referenced
this issue
Oct 28, 2019
* fix(eks): cannot update cluster configuration Our custom resource naively tried to call the UpdateCluster API for updates, but this is in fact not inline with how AWS::EKS::Cluster is implemented. This change modifies the custom resource handler to handle updates based on the same specification as the official CloudFormation resource: - Changes the cluster name, VPC or role will cause a replacement (creation of a cluster with a new name and removal of the old cluster). - Changes to the version will use the UpdateClusterVersion API to update the version in-place. This fixes #4311. This commit also fixes #4310 which caused cluster deletions when updates failed. The root cause was that when errors were reported to CFN we always used the log stream name as the physical resource ID, and CFN thought we wanted to replace the resource. Oouch. This change was manually tested since we still don't have a good unit test harness for this resource so we manually tested all types of updates and observed that the appropriate behaviour was taken (replacements, in-place). * handle cluster name updates * add provisional unit tests for the cluster resource (just a test plan) * update expectations
iliapolo
changed the title
EKS update failure causes the cluster to be deleted
[aws-eks] EKS update failure causes the cluster to be deleted
Aug 16, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Tried to change EKS cluster version from 1.12 to 1.13.
The resource:
Stack failed to update. See error log attached.
cdk marked the cluster resource for deletion
4/53 | 11:12:05 | DELETE_IN_PROGRESS | AWS::CloudFormation::CustomResource | DevEksCluster/DevEksCluster/Resource/Resource/Default (DevEksCluster6F41DD8A
and in result the cluster was deleted instead of being brought back to previous state.
Reproduction Steps
Change eks cluster version from 1.12 to 1.13 with kubectl enabled
Error Log
Environment
Other
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: