Skip to content
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

Cluster Creation Fails on Nil Pointer with Missing VSphereDatacenterConfig #6096

Closed
jonathanmeier5 opened this issue Jun 28, 2023 · 0 comments
Assignees
Labels
area/cli Generic EKS-A CLI features team/cli
Milestone

Comments

@jonathanmeier5
Copy link
Member

In v0.16.0 if a cluster spec is missing its VSphereDatacenterConfig the create cluster command fails on a nil pointer error:

goroutine 1 [running]:
github.com/aws/eks-anywhere/pkg/providers/vsphere.(*vsphereProvider).SetupAndValidateCreateCluster(0xc000d4f880, {0x3c3e7f0, 0xc0000540c8}, 0xc0007937c0)
        /home/ubuntu/workplace/eks-anywhere/pkg/providers/vsphere/vsphere.go:294 +0x16c
github.com/aws/eks-anywhere/pkg/validations/createcluster.(*ValidationManager).generateCreateValidations.func4()
        /home/ubuntu/workplace/eks-anywhere/pkg/validations/createcluster/createcluster.go:72 +0xae
github.com/aws/eks-anywhere/pkg/validations.(*Runner).Run(0x55c0c30?)
        /home/ubuntu/workplace/eks-anywhere/pkg/validations/runner.go:24 +0x42
github.com/aws/eks-anywhere/pkg/validations/createcluster.(*ValidationManager).Validate(0xc0009f5740, {0x3c3e7f0, 0xc0000540c8})
        /home/ubuntu/workplace/eks-anywhere/pkg/validations/createcluster/createcluster.go:41 +0x225
github.com/aws/eks-anywhere/cmd/eksctl-anywhere/cmd.(*validateOptions).validateCreateCluster(0x558fee0, 0x55694c0, {0x0?, 0x0?, 0x0?})
        /home/ubuntu/workplace/eks-anywhere/cmd/eksctl-anywhere/cmd/validatecreatecluster.go:102 +0x7ca
github.com/spf13/cobra.(*Command).execute(0x55694c0, {0xc0005dc1c0, 0x4, 0x4})
        /home/ubuntu/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:916 +0x862
github.com/spf13/cobra.(*Command).ExecuteC(0x5567800)
        /home/ubuntu/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:1044 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
        /home/ubuntu/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:968
github.com/spf13/cobra.(*Command).ExecuteContext(...)
        /home/ubuntu/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:961
github.com/aws/eks-anywhere/cmd/eksctl-anywhere/cmd.Execute()
        /home/ubuntu/workplace/eks-anywhere/cmd/eksctl-anywhere/cmd/root.go:65 +0x54
main.main()
        /home/ubuntu/workplace/eks-anywhere/cmd/eksctl-anywhere/main.go:29 +0x125
exit status 2

Steps to reproduce:

  1. Start with a working cluster config
  2. Delete the apiVersion field in the VSphereDatacenterConfig object like so:
kind: VSphereDatacenterConfig
metadata:
  name: my-datacenter
spec:
  datacenter: "my-DC"
  insecure: true
  network: "/my-DC/network/foo"
  server: "my-dc-endpoint"
  thumbprint: "XXXX"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Generic EKS-A CLI features team/cli
Projects
None yet
Development

No branches or pull requests

3 participants