We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 a docker volume docker volume create my-docker-volume
docker volume create my-docker-volume
Create a new config file:
apiVersion: k3d.io/v1alpha2 kind: Simple name: test servers: 1 agents: 0 volumes: - volume: my-docker-volume:/var/lib/rancher/k3s/storage nodeFilters: - all
k3d cluster create -c config.yaml
The cluster boots. But it crashes with the following error:
INFO[0000] Using config file config.yaml panic: runtime error: index out of range [2] with length 2 goroutine 1 [running]: github.com/rancher/k3d/v4/pkg/runtimes/util.ValidateVolumeMount(0x1a373b0, 0x1f21da8, 0xc0004310e0, 0x2d, 0x0, 0x0) /drone/src/pkg/runtimes/util/volumes.go:66 +0x4d2 github.com/rancher/k3d/v4/pkg/config.ValidateClusterConfig(0x1a27898, 0xc000036050, 0x1a373b0, 0x1f21da8, 0x0, 0x0, 0x0, 0x0, 0xc000405790, 0x4, ...) /drone/src/pkg/config/validate.go:93 +0x17e github.com/rancher/k3d/v4/cmd/cluster.NewCmdClusterCreate.func2(0xc0003c6000, 0xc00037f5e0, 0x0, 0x2) /drone/src/cmd/cluster/clusterCreate.go:159 +0x7b9 github.com/spf13/cobra.(*Command).execute(0xc0003c6000, 0xc00037f5c0, 0x2, 0x2, 0xc0003c6000, 0xc00037f5c0) /drone/src/vendor/github.com/spf13/cobra/command.go:856 +0x2c2 github.com/spf13/cobra.(*Command).ExecuteC(0x1ecfda0, 0xc000138010, 0x4, 0x7) /drone/src/vendor/github.com/spf13/cobra/command.go:960 +0x375 github.com/spf13/cobra.(*Command).Execute(...) /drone/src/vendor/github.com/spf13/cobra/command.go:897 github.com/rancher/k3d/v4/cmd.Execute() /drone/src/cmd/root.go:95 +0x65 main.main() /drone/src/main.go:27 +0x27
#510 added a workaround to allow c:\folder:/mnt/test mounts, however this breaks volume-mounts like docker-volume:/mnt/test. https://github.com/rancher/k3d/blob/fd793fe4cba780471c69daeac1ae8234332478d1/cmd/util/volumes.go#L67-L70
c:\folder:/mnt/test
docker-volume:/mnt/test
An option could be to add an additional check that makes sure that there are enough array elements:
- } else if rt.GOOS == "windows" { + } else if rt.GOOS == "windows" && len(split) == 3 { src = split[0] + ":" + split[1] dest = split[2] } ...
k3d
C:\WINDOWS\system32>k3d --version k3d version v4.4.2 k3s version v1.20.6-k3s1 (default)
The text was updated successfully, but these errors were encountered:
Hi @dhenneke , thanks for pointing this out! Fix will be included in the next release 👍
Sorry, something went wrong.
iwilltry42
No branches or pull requests
What did you do
Create a docker volume
docker volume create my-docker-volume
Create a new config file:
k3d cluster create -c config.yaml
What did you expect to happen
The cluster boots. But it crashes with the following error:
#510 added a workaround to allow
c:\folder:/mnt/test
mounts, however this breaks volume-mounts likedocker-volume:/mnt/test
.https://github.com/rancher/k3d/blob/fd793fe4cba780471c69daeac1ae8234332478d1/cmd/util/volumes.go#L67-L70
An option could be to add an additional check that makes sure that there are enough array elements:
Which OS & Architecture
Which version of
k3d
The text was updated successfully, but these errors were encountered: