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 create fails with WSL and Docker Desktop. Fails after docker rm command. #7489

Closed
matthewdoughertyNJ opened this issue Feb 5, 2024 · 7 comments

Comments

@matthewdoughertyNJ
Copy link

matthewdoughertyNJ commented Feb 5, 2024

What happened:
cluster create dies after docker cleanup command.
What you expected to happen:
Create first attempted cluster
How to reproduce it (as minimally and precisely as possible):
eksctl anywhere create cluster -f eksanywhere.yaml -v9

Anything else we need to know?:

  • eksanywhere.yaml:

apiVersion: anywhere.eks.amazonaws.com/v1alpha1
kind: Cluster
metadata:
name: dev-atlas-eksany # Name of the cluster (required)
spec:
clusterNetwork: # Cluster network configuration (required)
cniConfig: # Cluster CNI plugin - default: cilium (required)
cilium: {}
pods:
cidrBlocks: # Subnet CIDR notation for pods (required)
- 192.168.0.0/16
services:
cidrBlocks: # Subnet CIDR notation for services (required)
- 11.96.0.0/12
controlPlaneConfiguration: # Specific cluster control plane config (required)
count: 1 # Number of control plane nodes (required)
endpoint: # IP for control plane endpoint (required)
host: "11.119.90.73"
machineGroupRef: # vSphere-specific Kubernetes node config (required)
kind: VSphereMachineConfig
name: dev-atlas-eksany-machines
taints: # Taints applied to control plane nodes
- key: "key1"
value: "value1"
effect: "NoSchedule"
labels: # Labels applied to control plane nodes
"key1": "value1"
"key2": "value2"
datacenterRef: # Kubernetes object with vSphere-specific config
kind: VSphereDatacenterConfig
name: "dev-atlas-eksany-datacenter"
externalEtcdConfiguration:
count: 3 # Number of etcd members
machineGroupRef: # vSphere-specific Kubernetes etcd config
kind: VSphereMachineConfig
name: dev-atlas-eksany--machines
kubernetesVersion: "1.27" # Kubernetes version to use for the cluster (required)
workerNodeGroupConfigurations: # List of node groups you can define for workers (required)

  • count: 2 # Number of worker nodes
    machineGroupRef: # vSphere-specific Kubernetes node objects (required)
    kind: VSphereMachineConfig
    name: dev-atlas-eksany-machines
    name: md-0 # Name of the worker nodegroup (required)
    taints: [] # Taints to apply to worker node group nodes
    #- key: "key1"

    value: "value1"

    effect: "NoSchedule"

    labels: # Labels to apply to worker node group nodes
    "key2": "value2"

apiVersion: anywhere.eks.amazonaws.com/v1alpha1
kind: VSphereDatacenterConfig
metadata:
name: dev-atlas-eksany--datacenter
spec:
datacenter: "Private Cloud TOC" # vSphere datacenter name on which to deploy EKS Anywhere (required)
server: "msp.fake.com" # FQDN or IP address of vCenter server (required)
network: "MDT|toc-lab|toc-kubernetes-10.119.90.0-24_epg" # Path to the VM network on which to deploy EKS Anywhere (required)
insecure: true # Set to true if vCenter does not have a valid certificate
thumbprint: "1E:3B:A1:4C:B2:..." # SHA1 thumprint of vCenter server certificate (required if insecure=false)


apiVersion: anywhere.eks.amazonaws.com/v1alpha1
kind: VSphereMachineConfig
metadata:
name: dev-atlas-eksany-machines
spec:
diskGiB: 25 # Size of disk on VMs, if no snapshots
datastore: "MSP00-vSAN-01" # Path to vSphere datastore to deploy EKS Anywhere on (required)
folder: "dev-atlas-eksany-folder" # Path to VM folder for EKS Anywhere cluster VMs (required)
numCPUs: 2 # Number of CPUs on virtual machines
memoryMiB: 8192 # Size of RAM on VMs
osFamily: "bottlerocket" # Operating system on VMs
resourcePool: "*/Resources" # vSphere resource pool for EKS Anywhere VMs (required)
storagePolicyName: "MSP00-vSAN-RAID1-FTT1" # Storage policy name associated with VMs
template: "bottlerocket-kube-v1-27" # VM template for EKS Anywhere (required for RHEL/Ubuntu-based OVAs)
cloneMode: "fullClone" # Clone mode to use when cloning VMs from the template
users: # Add users to access VMs via SSH

  • name: "ec2-user" # Name of each user set to access VMs
    sshAuthorizedKeys: # SSH keys for user needed to access VMs
    • "ssh-rsa blah blah"
      tags: # List of tags to attach to cluster VMs, in URN format
  • "atlas"

Environment:

  • Ubuntu 22.04.1 LTS on WSL on Windows 10

  • EKS Anywhere Release: Version: v0.18.6

  • EKS Distro Release: govc 0.34.2
    govc about
    FullName: VMware vCenter Server 7.0.3 build-22357613
    Name: VMware vCenter Server
    Vendor: VMware, Inc.
    Version: 7.0.3
    Build: 22357613
    OS type: linux-x64
    API type: VirtualCenter
    API version: 7.0.3.0
    Product ID: vpx

  • OUTPUT:
    eksctl anywhere create cluster -f eksanywhere.yaml -v9
    2024-02-05T17:51:40.856-0500 V6 Executing command {"cmd": "/usr/bin/docker version --format {{.Client.Version}}"}
    2024-02-05T17:51:40.917-0500 V6 Executing command {"cmd": "/usr/bin/docker info --format '{{json .MemTotal}}'"}
    2024-02-05T17:51:41.432-0500 V4 Reading bundles manifest {"url": "https://anywhere-assets.eks.amazonaws.com/releases/bundles/58/manifest.yaml"}
    2024-02-05T17:51:41.582-0500 V4 Using CAPI provider versions {"Core Cluster API": "v1.5.2+3793b46", "Kubeadm Bootstrap": "v1.5.2+a1e83d5", "Kubeadm Control Plane": "v1.5.2+feb6719", "External etcd Bootstrap": "v1.0.10+2b2db67", "External etcd Controller": "v1.0.16+79aba81", "Cluster API Provider VSphere": "v1.7.4+e71f2e2"}
    2024-02-05T17:51:41.947-0500 V5 Retrier: {"timeout": "2562047h47m16.854775807s", "backoffFactor": null}
    2024-02-05T17:51:41.948-0500 V2 Pulling docker image {"image": "public.ecr.aws/eks-anywhere/cli-tools:v0.18.6-eks-a-58"}
    2024-02-05T17:51:41.948-0500 V6 Executing command {"cmd": "/usr/bin/docker pull public.ecr.aws/eks-anywhere/cli-tools:v0.18.6-eks-a-58"}
    2024-02-05T17:51:43.100-0500 V5 Retry execution successful {"retries": 1, "duration": "1.152046248s"}
    2024-02-05T17:51:43.102-0500 V3 Initializing long running container {"name": "eksa_1707173501947975260", "image": "public.ecr.aws/eks-anywhere/cli-tools:v0.18.6-eks-a-58"}
    2024-02-05T17:51:43.102-0500 V6 Executing command {"cmd": "/usr/bin/docker run -d --name eksa_1707173501947975260 --network host -w /home/MattGit/sharedservices -v /var/run/docker.sock:/var/run/docker.sock -v /home/MattGit/sharedservices:/home/MattGit/sharedservices -v /home/MattGit/sharedservices:/home/MattGit/sharedservices --entrypoint sleep public.ecr.aws/eks-anywhere/cli-tools:v0.18.6-eks-a-58 infinity"}
    2024-02-05T17:51:43.371-0500 V4 Task start {"task_name": "setup-validate"}
    2024-02-05T17:51:43.371-0500 V0 Performing setup and validations
    2024-02-05T17:51:43.372-0500 V4 Tasks completed {"duration": "887.826µs"}
    2024-02-05T17:51:43.372-0500 V3 Logging out from current govc session
    2024-02-05T17:51:43.373-0500 V6 Executing command {"cmd": "/usr/bin/docker exec -i -e GOVC_PASSWORD=***** -e GOVC_URL=https://msp.fake.com/sdk -e GOVC_INSECURE=true -e GOVC_DATACENTER='Private Cloud TOC' -e GOVC_USERNAME=***** eksa_1707173501947975260 govc session.logout"}
    2024-02-05T17:51:44.014-0500 V6 Executing command {"cmd": "/usr/bin/docker exec -i -e GOVC_PASSWORD=***** -e GOVC_URL=https://msp.fake.com/sdk -e GOVC_INSECURE=true -e GOVC_DATACENTER='Private Cloud TOC' -e GOVC_USERNAME=***** eksa_1707173501947975260 govc session.logout -k"}
    2024-02-05T17:51:44.708-0500 V3 Cleaning up long running container {"name": "eksa_1707173501947975260"}
    2024-02-05T17:51:44.709-0500 V6 Executing command {"cmd": "/usr/bin/docker rm -f -v eksa_1707173501947975260"}
    panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation violation code=0x1 addr=0x128 pc=0x298ed17]

goroutine 1 [running]:
github.com/aws/eks-anywhere/pkg/providers/vsphere.SetupEnvVars(0x0)
github.com/aws/eks-anywhere/pkg/providers/vsphere/envars.go:29 +0x157
github.com/aws/eks-anywhere/pkg/providers/vsphere.(*vsphereProvider).SetupAndValidateCreateCluster(0xc000d0e180, {0x389fe70, 0xc00012e010}, 0xc000df9000)
github.com/aws/eks-anywhere/pkg/providers/vsphere/vsphere.go:305 +0xc5
github.com/aws/eks-anywhere/pkg/workflows.(*SetAndValidateTask).providerValidation.func1()
github.com/aws/eks-anywhere/pkg/workflows/create.go:190 +0xb2
github.com/aws/eks-anywhere/pkg/validations.(*Runner).Run(0xc000804890?)
github.com/aws/eks-anywhere/pkg/validations/runner.go:24 +0x42
github.com/aws/eks-anywhere/pkg/workflows.(*SetAndValidateTask).Run(0xc00020ab90?, {0x389fe70, 0xc00012e010}, 0xc000886480)
github.com/aws/eks-anywhere/pkg/workflows/create.go:177 +0x365
github.com/aws/eks-anywhere/pkg/task.(*taskRunner).RunTask(0xc000b645d0, {0x389fe70, 0xc00012e010}, 0xc000886480)
github.com/aws/eks-anywhere/pkg/task/task.go:159 +0x463
github.com/aws/eks-anywhere/pkg/workflows.(*Create).Run(0xc000d63c50, {0x389fe70, 0xc00012e010}, 0xc000df9000, {0x386b360?, 0xc000804880}, 0x80?)
github.com/aws/eks-anywhere/pkg/workflows/create.go:69 +0x312
github.com/aws/eks-anywhere/cmd/eksctl-anywhere/cmd.(*createClusterOptions).createCluster(0x50a71c0, 0x50ae1e0, {0x0?, 0x0?, 0x0?})
github.com/aws/eks-anywhere/cmd/eksctl-anywhere/cmd/createcluster.go:256 +0x10fe
github.com/spf13/cobra.(*Command).execute(0x50ae1e0, {0xc0002abec0, 0x3, 0x3})
github.com/spf13/cobra@v1.6.1/command.go:916 +0x862
github.com/spf13/cobra.(*Command).ExecuteC(0x50b43a0)
github.com/spf13/cobra@v1.6.1/command.go:1044 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/cobra@v1.6.1/command.go:968
github.com/spf13/cobra.(*Command).ExecuteContext(...)
github.com/spf13/cobra@v1.6.1/command.go:961
github.com/aws/eks-anywhere/cmd/eksctl-anywhere/cmd.Execute()
github.com/aws/eks-anywhere/cmd/eksctl-anywhere/cmd/root.go:65 +0x54
main.main()
github.com/aws/eks-anywhere/cmd/eksctl-anywhere/main.go:29 +0x125

@abhinavmpandey08
Copy link
Member

Hi @matthewdoughertyNJ, do you mind sharing the formatted cluster config yaml file? Maybe attach the actual file in the ticket or enclose it in triple ticks. Something like this so it's easier to look at

```
apiVersion: anywhere.eks.amazonaws.com/v1alpha1
kind: Cluster
metadata:
  ...
```

@matthewdoughertyNJ
Copy link
Author

Attached here.
eksanywhere-anonymous.yaml.txt

@abhinavmpandey08
Copy link
Member

You have a typo in VSphereDatacenterConfig
Cluster.spec.datacenterRef.name is set to dev-atlas-eksany-datacenter
but in
VSphereDatacenterConfig.metadata.name it's dev-atlas-eksany--datacenter
Make sure they are both the same and that should solve the issue

@matthewdoughertyNJ
Copy link
Author

matthewdoughertyNJ commented Feb 8, 2024 via email

@abhinavmpandey08
Copy link
Member

@matthewdoughertyNJ
Copy link
Author

matthewdoughertyNJ commented Feb 9, 2024 via email

@abhinavmpandey08
Copy link
Member

Sounds good, I'll resolve this issue for now. If you have any other issues creating a cluster, feel free to open another issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants