-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
panic: Terraform resource names cannot start with a digit. This is a bug in Kops, please report this in a GitHub Issue. Name: 1.etcd-events.k8s-cs.domain.net #9982
Comments
Thanks for reporting this! This is definitely a bug in Kops. The problem is in the generated terraform code and the EBS volumes used by the etcd cluster. The terraform resource names for the volumes begin with the etcdMember name from the ClusterSpec. Terraform 0.12 no longer allows resource names to begin with digits, but in your case you have etcdMember names of Kops could handle this in one of two ways:
We could also print a warning during generation that the terraform code will fail and the user needs to change the etcdmember names. As a side note, I dont know what exactly is involved with changing the member names and how seamless that is. If its straight forward and without downtime, maybe thats what we suggest to terraform users. /kind bug |
I had the same issue as @dimitrez with etcd starting with digits and i tried renaming it. I ended up purging masters volumes and restoring from etcd backup but we're testing if it could work by scaling up (adding new members with correct naming) and scaling down old masters |
We also ran into this. Renaming the terraform resource would be less of a risk then trying to rename etcd members. I think the suggestion of "if the etcdmember name starts with a digit, prefix the terraform resource name with something like vol" is a good solution, and is inline with other 1.18 changes for terraform 12. |
Is there a way to bypass this issue if I create a new cluster ? |
@jtbonhomme if you're specifying etcd members with a letter (or prefix) in a brand new cluster, it will work Like this : etcdMembers:
- instanceGroup: master-eu-west-3a-1
name: "a1" |
@jtbonhomme do you modify in any way the cluster config after creating it? |
@hakman no, I don't |
@nfillot I tried to create a brand new cluster with a new name, then update it with |
Thanks @jtbonhomme. I think I found the issue and should be fixed in the next 1.18 release. |
OK @hakman congrats for your investigations and for having found the root cause. |
What should we do with existing cluster? Is it possible to upgrade? |
A solution is proposed here: #10424 (comment) to prevent any mistaken Any feedback on this solution would be appreciated |
Problem not with tf itself, but with etcd certificates naming. Domain name for etcs nodes will be changed from etcd-1 to etcd-a, etc. |
With the proposed solution the etcd member names and their certificates won't change for existing clusters, only the terraform resource names. upon upgrading to kops 1.19 you'll be required to |
Version 1.18.1 (git-453d7d96be)
AWS
What did you expect to happen?
Please provide your cluster manifest. Execute
kops get --name my.example.com -o yaml
to display your cluster manifest.You may want to remove your cluster name and other sensitive information.**
The text was updated successfully, but these errors were encountered: