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

Template lookup failure in multi datacentre environment

Open david-wirelab opened this issue 5 years ago • 4 comments

What happened: Cluster failed to deploy

What you expected to happen: Cluster deploys successfully

How to reproduce it (as minimally and precisely as possible): Having a VMWare service user who has permissions to two Datacentres will result in a failure as when eksctl checks for the device info on the Template VM the command specified does not have a -dc flag set. Please see the log output below where the first Docker command does have a -dc flag however the second one (failing) has not got it. A possible fix might be to include the -dc flag in the second Docker command as well.

Anything else we need to know?: Verbose output for reference

2021-11-12T14:11:11.280Z	V4	Deploying template	{"dir": "/dc/vm/Templates", "templateName": "bottlerocket-v1.21.2-kubernetes-1-21-eks-6-amd64-26828cc"}
2021-11-12T14:11:11.280Z	V6	Executing command	{"cmd": "/usr/bin/docker run --name eksa_govc_1636726271280181339 -i --network host -v /home/foo/EKS_Cluster:/home/foo/EKS_Cluster -w /home/foo/EKS_Cluster -v /var/run/docker.sock:/var/run/docker.sock -e GOVC_USERNAME=***** -e GOVC_PASSWORD=***** -e GOVC_URL=vcenter7.foo.local -e GOVC_INSECURE=true --entrypoint govc public.ecr.aws/eks-anywhere/cli-tools:v0.1.0-eks-a-4 library.deploy -dc dc -pool /dc/host/Docker/DEVOPS/foo.foo.local/Resources/eksanywhere -folder /dc/vm/Templates -options prod/deploy-opts.json -persist-session=false /eks-a-templates/bottlerocket-v1.21.2-kubernetes-1-21-eks-6-amd64-26828cc bottlerocket-v1.21.2-kubernetes-1-21-eks-6-amd64-26828cc"}
2021-11-12T14:11:38.579Z	V6	cleaning up container eksa_govc_1636726271280181339	{"cmd": "/usr/bin/docker rm -f -v eksa_govc_1636726271280181339"}
2021-11-12T14:11:38.635Z	V4	Getting devices info for template
2021-11-12T14:11:38.635Z	V6	Executing command	{"cmd": "/usr/bin/docker run --name eksa_govc_1636726298635920807 -i --network host -v /home/foo/EKS_Cluster:/home/foo/EKS_Cluster -w /home/foo/EKS_Cluster -v /var/run/docker.sock:/var/run/docker.sock -e GOVC_USERNAME=***** -e GOVC_PASSWORD=***** -e GOVC_URL=vcenter7.foo.local -e GOVC_INSECURE=true --entrypoint govc public.ecr.aws/eks-anywhere/cli-tools:v0.1.0-eks-a-4 device.info -vm bottlerocket-v1.21.2-kubernetes-1-21-eks-6-amd64-26828cc -json"}
govc: please specify a datacenter
2021-11-12T14:11:38.995Z	V6	cleaning up container eksa_govc_1636726298635920807	{"cmd": "/usr/bin/docker rm -f -v eksa_govc_1636726298635920807"}
2021-11-12T14:11:39.056Z	V0	❌ Validation failed	{"validation": "vsphere Provider setup is valid", "error": "failed deploying template: error getting template device information: exit status 1", "remediation": ""}

Environment:

  • EKS Anywhere Release: 0.72.0
  • Kubectl: 22
  • Administrator machine OS: Ubuntu 20.04.3 LTS
  • VMWare7

david-wirelab avatar Nov 12 '21 14:11 david-wirelab

Hi David,

Thanks for reporting the issue! I am looking into it now.

In the meantime, to unblock the cluster creation, I would recommend importing the template manually using the steps described in the docs. After importing it manually, you will have to specify the template path in the clusterconfig and the cli will skip this step.

abhinavmpandey08 avatar Nov 12 '21 16:11 abhinavmpandey08

Thanks, the workaround above did the trick!

david-wirelab avatar Nov 17 '21 14:11 david-wirelab

I have added the fix for this issue and it will be included in the next release

abhinavmpandey08 avatar Nov 18 '21 23:11 abhinavmpandey08

The fix for this issue is included in this release https://github.com/aws/eks-anywhere/releases/tag/v0.6.1 I'm going to close this issue now, feel free to re-open if you any questions

abhinavmpandey08 avatar Nov 24 '21 15:11 abhinavmpandey08