eks-anywhere icon indicating copy to clipboard operation
eks-anywhere copied to clipboard

EKS cluster creation failing on Creating new workload cluster with folders with ' in them such as vm's

Open ianatmedacist opened this issue 2 years ago • 8 comments

What happened: When creating a cluster on my vmware cluster I can't make it past "Creating new workload cluster" if I attempt to provide a key format like ssh-ed25519

2022-04-22T18:13:04.132Z	V4	----------------------------------
2022-04-22T18:13:04.132Z	V4	Task start	{"task_name": "workload-cluster-init"}
2022-04-22T18:13:04.132Z	V0	Creating new workload cluster
2022-04-22T18:13:04.132Z	V5	Adding extraArgs	{"cipher-suites": "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"}
2022-04-22T18:13:04.132Z	V5	Adding extraArgs	{"tls-cipher-suites": "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"}
2022-04-22T18:13:04.132Z	V5	Adding extraArgs	{"tls-cipher-suites": "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"}
2022-04-22T18:13:04.135Z	V5	Adding extraArgs	{"tls-cipher-suites": "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"}
2022-04-22T18:13:04.136Z	V6	Executing command	{"cmd": "/usr/bin/docker exec -i eksa_1650650965873548237 kubectl apply -f - --namespace eksa-system --kubeconfig sandbox1/generated/sandbox1.kind.kubeconfig"}
2022-04-22T18:13:07.955Z	V5	Error happened during retry	{"error": "error executing apply: error: error parsing STDIN: error converting YAML to JSON: yaml: line 12: did not find expected key\n", "retries": 1}
2022-04-22T18:13:07.955Z	V5	Sleeping before next retry	{"time": "5s"}

Which leads up to it generate dump files. But I can't seem to figure out what it is trying to apply here, or why it would be malformed.

What you expected to happen: Succeed in this step or tell me what we are trying to apply if we get a conversion error (Or possibly what I could have malformed elsewhere causing this?)

How to reproduce it (as minimally and precisely as possible): Create a a default valid cluster yaml as per the docs and target a folder such as vm's or vm's/k8s_vm's

Anything else we need to know?:

Environment: eksctl 0.94.0 eksctl anywhere v0.8.2 vcenter 7.0.3.003 docker version: 20.10.14 host: ubuntu 20.04

ianatmedacist avatar Apr 22 '22 20:04 ianatmedacist

I'll look into this, just to help debug, could you try the same cluster create command, but with an ssh-rsa key instead, and see if it works. It looks like most of our tests are written for that key algorithm.

jonahjon avatar Apr 25 '22 19:04 jonahjon

I'll look into this, just to help debug, could you try the same cluster create command, but with an ssh-rsa key instead, and see if it works. It looks like most of our tests are written for that key algorithm.

Yes I have no issues getting past that step if I provide my own ssh-rsa key instead of ssh-ed25519

ianatmedacist avatar Apr 27 '22 16:04 ianatmedacist

Infact, even a ssh-ed25519 key works. Seems I also moved the target folder at some point. I updated the title and body of the issue to reflect that.

ianatmedacist avatar Apr 27 '22 18:04 ianatmedacist

So the issue was that you had a folder with an apostrophe in it correct?

vm's doesn't work vms works

If so I can log a bug on our backlog for this.

jonahjon avatar Apr 28 '22 00:04 jonahjon

Correct @jonahjon

ianatmedacist avatar Apr 28 '22 16:04 ianatmedacist

Awesome, I logged this to our team as a bug. Thanks @ianatmedacist

jonahjon avatar May 02 '22 17:05 jonahjon

Just wanted to double check, do you already have an existing folder in your vcenter with vm's? Just want to make sure this is an issue with how we are handling that specific character rather than it being a limitation of vcenter.

vivek-koppuru avatar May 02 '22 18:05 vivek-koppuru

@vivek-koppuru Yes the folder exists already when I am running into this problem.

ianatmedacist avatar May 02 '22 18:05 ianatmedacist