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

Kind on btrfs #1498

Closed
jdonszelmann opened this issue Apr 20, 2020 · 4 comments · Fixed by #1500
Closed

Kind on btrfs #1498

jdonszelmann opened this issue Apr 20, 2020 · 4 comments · Fixed by #1500
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Milestone

Comments

@jdonszelmann
Copy link

jdonszelmann commented Apr 20, 2020

What happened:

kind create cluster

errors with the following error:

docker run error: command "docker run --hostname kind-control-plane --name kind-control-plane --label io.x-k8s.kind.role=control-plane --privileged --security-opt seccomp=unconfined --security-opt apparmor=unconfined --tmpfs /tmp --tmpfs /run --volume /var --volume /lib/modules:/lib/modules:ro --detach --tty --label io.x-k8s.kind.cluster=kind --volume /dev/mapper /dev/mapper --publish=127.0.0.1:39139:6443/TCP kindest/node:v1.17.2@sha256:59df31fc61d1da5f46e8a61ef612fa53d3f9140f82419d1ef1a6b9656c6b737c" failed with error: exit status 125
ERROR: failed to create cluster: docker run error: command "docker run --hostname kind-control-plane --name kind-control-plane --label io.x-k8s.kind.role=control-plane --privileged --security-opt seccomp=unconfined --security-opt apparmor=unconfined --tmpfs /tmp --tmpfs /run --volume /var --volume /lib/modules:/lib/modules:ro --detach --tty --label io.x-k8s.kind.cluster=kind --volume /dev/mapper /dev/mapper --publish=127.0.0.1:39139:6443/TCP kindest/node:v1.17.2@sha256:59df31fc61d1da5f46e8a61ef612fa53d3f9140f82419d1ef1a6b9656c6b737c" failed with error: exit status 125
exit status 1

And doesn't create a cluster.

What you expected to happen:

It should just set up the cluster

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

git clone https://github.com/kubernetes-sigs/kind kind
cd kind
go run main.go create cluster

Anything else we need to know?:

this issue is related to #1416 where I also commented.
There seems to be a bug introduced in #1464 . In this commit you added

	if mountDevMapper() {
		args = append(args, "--volume", "/dev/mapper", "/dev/mapper")
	}

But I think this has to be

	if mountDevMapper() {
		args = append(args, "--volume", "/dev/mapper:/dev/mapper")
	}

Which results in the following command:

docker run --hostname kind-control-plane --name kind-control-plane --label io.x-k8s.kind.role=control-plane --privileged --security-opt seccomp=unconfined --security-opt apparmor=unconfined --tmpfs /tmp --tmpfs /run --volume /var --volume /lib/modules:/lib/modules:ro --detach --tty --label io.x-k8s.kind.cluster=kind --volume /dev/mapper:/dev/mapper --publish=127.0.0.1:46023:6443/TCP kindest/node:v1.17.2@sha256:59df31fc61d1da5f46e8a61ef612fa53d3f9140f82419d1ef1a6b9656c6b737c

instead of

docker run --hostname kind-control-plane --name kind-control-plane --label io.x-k8s.kind.role=control-plane --privileged --security-opt seccomp=unconfined --security-opt apparmor=unconfined --tmpfs /tmp --tmpfs /run --volume /var --volume /lib/modules:/lib/modules:ro --detach --tty --label io.x-k8s.kind.cluster=kind --volume /dev/mapper /dev/mapper --publish=127.0.0.1:46023:6443/TCP kindest/node:v1.17.2@sha256:59df31fc61d1da5f46e8a61ef612fa53d3f9140f82419d1ef1a6b9656c6b737c

being run

(sorry, one char difference. It's a colon after /dev/mapper)

It might also be useful to know that I run btrfs as a root filesystem (btrfs-progs v5.6)

Environment:

  • kind version: (use kind version): kind v0.8.0-alpha go1.14.2 linux/amd64
  • Docker version: (use docker info): 19.03.8-ce
  • OS (e.g. from /etc/os-release): Arch linux (Linux 5.6.5-arch3-1)
@jdonszelmann jdonszelmann added the kind/bug Categorizes issue or PR as related to a bug. label Apr 20, 2020
@aojea
Copy link
Contributor

aojea commented Apr 20, 2020

🤦

@aojea
Copy link
Contributor

aojea commented Apr 20, 2020

@jonay2000 can you confirm that running this command manually works ?

docker run --hostname kind-control-plane --name kind-control-plane --label io.x-k8s.kind.role=control-plane --privileged --security-opt seccomp=unconfined --security-opt apparmor=unconfined --tmpfs /tmp --tmpfs /run --volume /var --volume /lib/modules:/lib/modules:ro --detach --tty --label io.x-k8s.kind.cluster=kind --volume /dev/mapper:/dev/mapper --publish=127.0.0.1:46023:6443/TCP kindest/node:v1.17.2@sha256:59df31fc61d1da5f46e8a61ef612fa53d3f9140f82419d1ef1a6b9656c6b737c

I can't test it and prefer to not introduce an error again,

@jdonszelmann
Copy link
Author

Can confirm. Works flawlessly

@jdonszelmann
Copy link
Author

Thanks for the quick response :)

@BenTheElder BenTheElder added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Apr 20, 2020
@BenTheElder BenTheElder added this to the v0.8.0 milestone Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants