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

create cluster fails using rancher desktop, wsl2, moby engine - #3065

Closed
attilaersek opened this issue Jan 13, 2023 · 7 comments
Closed

create cluster fails using rancher desktop, wsl2, moby engine - #3065

attilaersek opened this issue Jan 13, 2023 · 7 comments
Labels
area/provider/docker Issues or PRs related to docker kind/external upstream bugs triage/duplicate Indicates an issue is a duplicate of other open issue.

Comments

@attilaersek
Copy link

attilaersek commented Jan 13, 2023

What happened:
When running kind create cluster to create a k8s cluster, got the following error:

Creating cluster "kind" ...
DEBUG: docker/images.go:58] Image: kindest/node:v1.25.3@sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1 present locally
 ✓ Ensuring node image (kindest/node:v1.25.3) 🖼
 ✓ Preparing nodes 📦
 ✗ Writing configuration 📜
ERROR: failed to create cluster: failed to generate kubeadm config content: failed to get kubernetes version from node: file should only be one line, got 0 lines
Stack Trace:
sigs.k8s.io/kind/pkg/errors.Errorf
        sigs.k8s.io/kind/pkg/errors/errors.go:41
sigs.k8s.io/kind/pkg/cluster/nodeutils.KubeVersion
        sigs.k8s.io/kind/pkg/cluster/nodeutils/util.go:42
sigs.k8s.io/kind/pkg/cluster/internal/create/actions/config.getKubeadmConfig
        sigs.k8s.io/kind/pkg/cluster/internal/create/actions/config/config.go:158
sigs.k8s.io/kind/pkg/cluster/internal/create/actions/config.(*Action).Execute.func1.1
        sigs.k8s.io/kind/pkg/cluster/internal/create/actions/config/config.go:90
sigs.k8s.io/kind/pkg/errors.UntilErrorConcurrent.func1
        sigs.k8s.io/kind/pkg/errors/concurrent.go:30
runtime.goexit
        runtime/asm_amd64.s:1594

What you expected to happen:
Was expecting kind create cluster to successfully create a k8s cluster

How to reproduce it (as minimally and precisely as possible):
Run kind create cluster using WSL2 Ubuntu 22.04 with Rancher Desktop configured to Docker/Moby engine.

The issue seems to be related to:

docker exec --privileged kind-control-plane cat /kind/version

that returns nothing.
Setting the interactive flag (-i) correctly returns the expected content:

$ docker exec -i --privileged kind-control-plane cat /kind/version
v1.25.3

Environment:

  • kind version: kind v0.17.0 go1.19.2 linux/amd64
  • docker info:
    Client:
     Context:    default
     Debug Mode: false
     Plugins:
      compose: Docker Compose (Docker Inc., v2.14.0)
    
    Server:
     Containers: 26
      Running: 24
      Paused: 0
      Stopped: 2
     Images: 81
     Server Version: 20.10.20
     Storage Driver: overlay2
      Backing Filesystem: extfs
      Supports d_type: true
      Native Overlay Diff: true
      userxattr: false
     Logging Driver: json-file
     Cgroup Driver: cgroupfs
     Cgroup Version: 1
     Plugins:
      Volume: local
      Network: bridge host ipvlan macvlan null overlay
      Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
     Swarm: inactive
     Runtimes: io.containerd.runtime.v1.linux runc io.containerd.runc.v2
     Default Runtime: runc
     Init Binary: docker-init
     containerd version: 9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
     runc version: 5fd4c4d144137e991c4acebb2146ab1483a97925
     init version:
     Security Options:
      seccomp
       Profile: default
     Kernel Version: 5.15.79.1-microsoft-standard-WSL2
     Operating System: Rancher Desktop WSL Distribution
     OSType: linux
     Architecture: x86_64
     CPUs: 20
     Total Memory: 11.68GiB
     Name: GT-DT-192703
     ID: SY73:WG3H:IWIA:2HPL:AXBS:FVOH:JSRN:RZG7:S4XX:FIJR:7N6H:DO6S
     Docker Root Dir: /var/lib/docker
     Debug Mode: false
     Registry: https://index.docker.io/v1/
     Labels:
     Experimental: false
     Insecure Registries:
      127.0.0.0/8
     Live Restore Enabled: false
    
    WARNING: No blkio throttle.read_bps_device support
    WARNING: No blkio throttle.write_bps_device support
    WARNING: No blkio throttle.read_iops_device support
    WARNING: No blkio throttle.write_iops_device support
  • Versions:
    • Windows version: 10.0.22621.1105
    • WSL version: 1.0.3.0
    • Kernel version: 5.15.79.1
    • 22.04.1 LTS (Jammy Jellyfish)
    • Rancher Desktop 1.7.0
  • Kubernetes version: v1.25.5
  • Any proxies or other special environment settings?: no

Exported logs:
1487180432.zip

@attilaersek attilaersek added the kind/bug Categorizes issue or PR as related to a bug. label Jan 13, 2023
@BenTheElder
Copy link
Member

-i should only be necessary when stdin is used, which cat should not be using .... ??? 🤔

We automatically include -i on all exec calls that do use stdin.

This is an odd quirk we haven't seen before. I'm not sure what to make of it ...

@BenTheElder BenTheElder added the area/provider/docker Issues or PRs related to docker label Jan 17, 2023
@attilaersek
Copy link
Author

I agree. As soon as I'll have some time I'll open an issue at rancher desktop side and link this one.

@BenTheElder
Copy link
Member

Thanks!

It's possible we need to change kind to start setting -i more, but I'd like to understand if there's a bug in docker/rancher if we can.

This reminds me of #3003

@sergioprates
Copy link

Same here, i'm trying to create the kind cluster using rancher with moby in wsl 2 on windows.

@BenTheElder
Copy link
Member

Seems to be rancher-sandbox/rancher-desktop#3239

@BenTheElder BenTheElder added kind/external upstream bugs and removed kind/bug Categorizes issue or PR as related to a bug. labels Feb 1, 2023
@BenTheElder
Copy link
Member

Looks like we can track rancher-sandbox/rancher-desktop#3239, given this appears to be accepted as a bug with this specific docker distro, we'll follow the upstream bug but keep the bugs here for visibility.

@BenTheElder
Copy link
Member

I'm going to close this as
/triage duplicate
with the earlier issue number being #3003

But link back here and the rancher-desktop upstream issue for context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/provider/docker Issues or PRs related to docker kind/external upstream bugs triage/duplicate Indicates an issue is a duplicate of other open issue.
Projects
None yet
Development

No branches or pull requests

4 participants