-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 - kind-control-plane does not work on zfs #1719
Comments
I made a new Adding for reference, the following is what I copied in...
|
one thing to consider: I'm not sure if it's safe for us to ship zfs binaries with kind, besides legal questions, I'm not sure if you can have a ZFS binary that isn't shipped to match the dkms module, and the kernel / module are going to come from the host. in the short term you may have to run kind on some other filesystem that overlay functions on (most of them?) |
I don't think containerd/CRI will use ZFS unless forced to, kind is leaving the defaults here.
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
containerdConfigPatches:
- |-
[plugins."io.containerd.grpc.v1.cri".containerd]
snapshotter = "zfs" |
I get what you're saying about zfs and that is not a surprise given the whole thing surrounding the zfs license. It'd be very difficult to have zfs prepackaged inside the container without tying heavily to specific kernel/toolchain versions on the host. I've also been trying k3d and with that I have a wrapper script that creates a loopmount file system using docker-volume-loopback to create sparse ext4 volumes that are passed into k3d. That works but I don't know enough (anything?) about how kind works to port that usage to it. I might have to put kind down until I can use anohter filesystem. |
I think licensing wise we're actually probably fine, since we don't ship a kernel and wouldn't ship the DKMS or binary kernel module, it looks like ubuntu does have a package for just the CLI utils so we'd just ship that, and some automatic tweak to the config. I'm having difficulty determining if it's safe to mix the zfs utils version versus the kernel module, I've never used them out of sync before (and barely at all). Can you test if this works using the above cluster config to enable the patch? This is similar to the customization needed for microk8s |
if cat <<EOF | kind create cluster --config=- --image=your-image-with-zfs-binaries
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
containerdConfigPatches:
- |-
[plugins."io.containerd.grpc.v1.cri".containerd]
snapshotter = "zfs"
EOF works, then we can look at automating this, (pending also if it's OK to ship the ZFS CLIs without regard to the host) |
so setting the snapshotter to zfs doesn't work (it complains about a missing metadata.db when actually trying to take snapshots). however, I noticed this from the microk8s project: canonical/microk8s@a5ec1f9#diff-e263cbd0de8da1f880f701684ae8b035R35-R36 and sure enough, cat <<EOF | kind create cluster --config=-
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
containerdConfigPatches:
- |-
[plugins."io.containerd.grpc.v1.cri".containerd]
snapshotter = "native"
EOF works without modifying the base image. |
thanks! the "native" snapshotter used to be called "naive" and isn't really meant to be used beyond simple testing IIRC, but that's probably an OK fallback on ZFS at least.
this is while using a modified base image w/ the ZFS CLI installed? |
yep. there may be some mounts from the host missing? I didn't have time to dig into it further. |
Thank you, I think we can automate the fallback to native snapshot driver
in ZFS similar to microk8s pretty easily
/assign
…On Tue, Jul 14, 2020, 18:37 Cassandra Comar ***@***.***> wrote:
this is while using a modified base image w/ the ZFS CLI installed?
yep. there may be some mounts from the host missing? I didn't have time to
dig into it further.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#1719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHADK5ADQNTOQNW4DH6EQLR3UB6FANCNFSM4OVTXEMA>
.
|
/lifecycle active |
The "native" snapshotter fallback is working only for kubernetes versions from 1.15.11 on: $ cat /tmp/kind-config.yaml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
containerdConfigPatches:
- |-
[plugins."io.containerd.grpc.v1.cri".containerd]
snapshotter = "native"
networking:
apiServerAddress: "0.0.0.0"
nodes:
- role: control-plane
$ kind create cluster --name kind --config /tmp/kind-config.yaml --image kindest/node:v1.14.10@sha256:6cd43ff41ae9f02bb46c8f455d5323819aec858b99534a290517ebc181b443c6
Creating cluster "kind" ...
✓ Ensuring node image (kindest/node:v1.14.10) 🖼
✓ Preparing nodes 📦
✓ Writing configuration 📜
✗ Starting control-plane 🕹️
ERROR: failed to create cluster: failed to init node with kubeadm: command "docker exec --privileged kind-control-plane kubeadm init --ignore-preflight-errors=all --config=/kind/kubeadm.conf --skip-token-print --v=6" failed with error: exit status 1 Here is the command output: kind-create-cluster-1.14.10-on-zfs.txt I would like to know if that is because version of kubernetes older than 1.15.11 does not support working on top of ZFS or there is something that can be done to make it work. Environment:
|
@teoincontatto if you run with |
I can't actually verify this myself at the moment but a fix based on this thread should be in v0.9.0 (later today?) |
@BenTheElder was hoping to test 0.9.0 over the weekend, any idea if that's going to be published soon? I might have some time this week to do a test. |
the last fix PR is out right now (WIP) so probably tomorrow. took al
little longer than expected.
…On Tue, Sep 1, 2020 at 1:15 AM johnlane ***@***.***> wrote:
@BenTheElder <https://github.com/BenTheElder> was hoping to test 0.9.0
over the weekend, any idea if that's going to be published soon? I might
have some time this week to do a test.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1719 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHADKYBUHOELSEIFFHIRPDSDSUT3ANCNFSM4OVTXEMA>
.
|
it's relatively safe to go ahead and try from HEAD,
kind.sigs.k8s.io/dl/latest/kind-linux-amd64 has prebuild nightly binaries
(not intended for stable third party use, but kubernetes CI internally uses
this), or you can `make build` (~zero dependencies) and use `bin/kind` from
a clone.
On Tue, Sep 1, 2020 at 1:20 AM Benjamin Elder <bentheelder@google.com>
wrote:
… the last fix PR is out right now (WIP) so probably tomorrow. took al
little longer than expected.
On Tue, Sep 1, 2020 at 1:15 AM johnlane ***@***.***> wrote:
> @BenTheElder <https://github.com/BenTheElder> was hoping to test 0.9.0
> over the weekend, any idea if that's going to be published soon? I might
> have some time this week to do a test.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#1719 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAHADKYBUHOELSEIFFHIRPDSDSUT3ANCNFSM4OVTXEMA>
> .
>
|
I finally got around to being able to test this. Using the above config snippet, it worked for me. I haven't gone further than firing it up and running a nginx hello example but it appears to work. |
Thanks! |
|
I still have to add the
Syslog has a bunch of errors like below when starting without the patch:
I have the kind export logs if necessary. |
What happened: cluster create failed
What you expected to happen: successful cluster creation
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
I'm using ZFS. I have read the other (now closed as resolved) issue about using zfs and I can see that
/dev/mapper
is bind-mounted into thekind-control-plane
container. I'm running 0.8.1 so I believe that I should have the version that should work with ZFS.Environment:
kind version: (use
kind version
):kind v0.8.1 go1.14.2 linux/amd64
Kubernetes version: (use
kubectl version
):Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.2", GitCommit:"52c56ce7a8272c798dbc29846288d7cd9fbae032", GitTreeState:"archive", BuildDate:"2020-04-23T22:11:11Z", GoVersion:"go1.14.2", Compiler:"gc", Platform:"linux/amd64"}
Docker version: (use
docker info
):Server Version: 19.03.8-ce containerd version: d76c121f76a5fc8a462dc64594aea72fe18e1178.m
OS (e.g. from
/etc/os-release
): Arch Linux5.6.11-arch1-1 #1 SMP PREEMPT Wed, 06 May 2020 17:32:37 +0000 x86_64 GNU/Linux
To capture more information, I ran with
kind create cluster --loglevel=debug --retain
. Here is some further log data...In
kind-control-plane/containerd.log
Also it appears to be trying to use zfs but doesn't have the zfs executable:
The text was updated successfully, but these errors were encountered: