Page MenuHomeSoftware Heritage

rancher: use a zfs dataset for /var/lib/kubelet to use the local storage for EmptyDir volumes
ClosedPublic

Authored by vsellier on Thu, Sep 15, 10:18 AM.

Details

Summary

A manual reconfiguration of the existing nodes will be needed to configure the dataset beforepuppet does a mount over on the existing directory content

Related to T4506

Test Plan
diff origin/production/rancher-node-staging-worker1.internal.staging.swh.network current/rancher-node-staging-worker1.internal.staging.swh.network
*******************************************
+ Zfs[data/kubelet] =>
   parameters =>
     "atime": "off",
     "compression": "zstd",
     "ensure": "present",
     "mountpoint": "/var/lib/kubelet"
*******************************************
*** End octocatalog-diff on rancher-node-staging-worker1.internal.staging.swh.network

but also

diff origin/production/rancher-node-production-worker01.internal.softwareheritage.org current/rancher-node-production-worker01.internal.softwareheritage.org
*******************************************
+ Zfs[data/kubelet] =>
   parameters =>
     "atime": "off",
     "compression": "zstd",
     "ensure": "present",
     "mountpoint": "/var/lib/kubelet"
*******************************************
*** End octocatalog-diff on rancher-node-production-worker01.internal.softwareheritage.org

Diff Detail

Repository
rSPSITE puppet-swh-site
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

lol, i think the diff description went wrong given the diff's title ;)

ardumont retitled this revision from rancher: use a zfs dataset for /var/lib/kubelet to use the local storage for EmptyDir volumes A manual reconfiguration of the existing nodes will be needed to configure the dataset before puppet does a mount over on the existing directory content to rancher: use a zfs dataset for /var/lib/kubelet to use the local storage for EmptyDir volumes.Thu, Sep 15, 1:44 PM
ardumont edited the summary of this revision. (Show Details)

ok, but i'm a bit confused about the absence of conditional regarding the second hard drive configured.
Don't that need a conditional somewhere?

I guess i could use a test plan with the octo-diff on a node where said hard-drive is not configured.
So i'm convinced it's all ok.

heh sorry for the title mess

ok, but i'm a bit confused about the absence of conditional regarding the second hard drive configured.

It's what I tried to explained in the comment line 5-6 in kubelet.pp
In fact, the second disk must exist for zfs::docker and we just have to use the same datapool. Depending of the vdb location, the write will be done on ceph or local storage.
As kubelet is only used in a rancher environment which needs docker, I've limited the refactoring, but you're right it should be more explicit

This revision is now accepted and ready to land.Thu, Sep 15, 3:31 PM