aws / aws/eks-anywhere

creating cluster via cli complains nil vsphere machine config

Open
#4,185 1 comment 0 reactions 0 assignees View on GitHub
area/cli kind/bug priority/p1
Dominant language
Go
Stars
2.1k
Forks
328
Avg merge
1d 4h
Merged PRs (30d)
9

Description

**What happened**:
Creating a workload cluster via eksa cli complains on nil vsphere machine config. But I can use the same machine config to create a cluster using kubectl.

`panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x2a282d4]

goroutine 1 [running]:
github.com/aws/eks-anywhere/pkg/providers/vsphere.(*vsphereProvider).SetupAndValidateCreateCluster(0xc000d876c0, {0x39ff460, 0xc00004e0a0}, 0xc00011e080)
/Users/ddjia/Documents/git/eks-anywhere/pkg/providers/vsphere/vsphere.go:310 +0x3d4`
[code](https://github.com/aws/eks-anywhere/blob/116265ad3ba450e455cbad914b0d16681a17f813/pkg/providers/vsphere/vsphere.go#L310)

**What you expected to happen**:
No errors during creation and should validate first
https://github.com/aws/eks-anywhere/blob/116265ad3ba450e455cbad914b0d16681a17f813/pkg/providers/vsphere/vsphere.go#L308-L330

**How to reproduce it (as minimally and precisely as possible)**:

**Anything else we need to know?**:

**Environment**:
- EKS Anywhere Release:
- EKS Distro Release:

Contributor guide

Open the contributing guide

Research direction

Start at SetupAndValidateCreateCluster in pkg/providers/vsphere/vsphere.go around line 310, following the CLI workload-cluster creation path described in the report. Compare the failing path with the same machine configuration used through kubectl; done means the configuration is validated before access that currently causes the nil-pointer panic.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
backend, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.