-
Notifications
You must be signed in to change notification settings - Fork 773
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
Provide support for ZFS #401
Comments
with snapshotter set to "zfs" we get this:
|
Would it be possible to mark the change from docker to containerd as a new epoch of the snap? I'm finding containerd very poorly documented compared to docker, making it difficult to debug problem. |
A solution: the problem is that microk8s started up and attempted to create containers for your pods, but is unable to finish because you are using ZFS and cannot use overlay. It's not enough to just switch the snapshotter and mount a new zfs dataset in the right location. You need to remove all the state from these containers as well. |
see note at bottom!so you want to use microk8s on ZFS?
Me: Two years laterHaving used the zfs snapshotter for the past 2 years I'd like to throw my $0.02 in. DON'T. The current verison of ZFS tools (like the I suspect the snapshotter maybe loosing track of these datasets, as I think 20,000 seems a bit high. I am now running microk8s on a zvol. That's a part of a zfs pool that you can format as any filesystem. The big downside is that it's a fixed size. how to run microk8s on zfs using a zvolThe pool we want to store the microk8s image files and container fs is As root do:
|
@ktsakalozos this is still being hit on a stock install, 9 months later. Is it possible to at least get a doc change? Honestly, snaps don't work on nonstandard homedirs, snaps don't work on nfs, microk8s doesn't work on zfs...all these would be great to document in a "gotchas" section in the user guide. |
@qlyoung thank you for your suggestion. Would you be interested in improving the docs? I think the issues you mention would fit in the "Common issues" in https://microk8s.io/docs/troubleshooting#common-issues . There is a link at the bottom allowing to propose changes (https://github.com/canonical-web-and-design/microk8s.io/edit/master/docs/troubleshooting.md). We appreciate your help. Thank you in advance. |
- Microk8s will not work if the user's homedir is not under /home - Microk8s will not work if the user's homedir is on NFS - Microk8s will not work if the user uses ZFS These are likely to be common situations for Microk8s users, and Microk8s doesn't (or is unable to) detect or handle them, so they should be doc'd. cf. canonical/microk8s#401 (comment)
@ktsakalozos Ye olde "patches welcome"... 😉 |
We would very much like to automate the fix proposed above. The difficult part in this automation is the pool creation. How would we know which pool to use and would a user want to have pools created in such a transparent way. Also, I am not sure if this automatic pool creation aligns with the future plan of having MicroK8s strictly confined. I think we should leave the pool creation and the snapshotter configuration in the hands of the admin. Yet, failing to function out of the box is not the right behavior either. Here is how we can move forward. In some testing the "native" snapshotter ( We could use something like |
This is a workaround to allow microk8s to run on ZFS systems. See issue: canonical#401 Using the zfs snapshotter would be another option, but currently it seems that the zfs snapshotter requires it's own dedicated filesystem and is still missing features such as Usage(). containerd/zfs#17
This is a workaround to allow microk8s to run on ZFS systems. See issue: canonical#401 Using the zfs snapshotter would be another option, but currently it seems that the zfs snapshotter requires it's own dedicated filesystem and is still missing features such as Usage(). containerd/zfs#17
This is a workaround to allow microk8s to run on ZFS systems. See issue: #401 Using the zfs snapshotter would be another option, but currently it seems that the zfs snapshotter requires it's own dedicated filesystem and is still missing features such as Usage(). containerd/zfs#17
This was fixed in the 1.18 release. |
I would like full support for ZFS in microk8s. If microk8s sees that the root fs is ZFS it should use settings that work on ZFS.
background
With the newest release (492) microk8s switched from docker to containerd. Because I use ZFS on all my disks this did not go well.
I had previously altered
args/docker-daemon.json
with the directions here: https://docs.docker.com/storage/storagedriver/zfs-driver/ (adding"storage-driver": "zfs"
)With the snap autoupgrade this left me with a broken k8s, where none of the pods would start.
After some investigation I attempted to switch containerd to use zfs:
I updated
containerd-template.toml
changingsnapshotter = "overlayfs"
tosnapshotter = "zfs"
and restarted. Then it complained about a missingmetadata.db
. Creating a new ZFS dataset and mounting it where it expected it made that error go away, but no pods start. There were errors logged but I don't recall what they were.I apologize for missing information in this issue. The system in question is offline due to a hardware problem, but when It comes back up I will edit in more details.
The text was updated successfully, but these errors were encountered: