You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
systemd-sysext is causing issue to install the custom kernel modules. Since i am using systemd-sysext image to install latest docker/containerd version and which mounts /opt as read only.
Ref:
systemd-sysext status
HIERARCHY EXTENSIONS SINCE
/opt none -
/usr docker-24.0.9
As per following doc if i try to install custom kernel modules on /opt then it will fail due to systemd-sysext.
So if i set modules path to some other writable location and use lowerdir=/usr/lib64/modules then it works fine. But the problem is /usr/lib64/modules are symlink and hence /etc/systemd/system/usr-lib64-modules.mount throws below exception.
Mount Ref:
sudo mount
-o "lowerdir=/usr/lib64/modules,upperdir=${modules},workdir=${modules}.wd"
-t overlay overlay /usr/lib64/modules
Exception logs:
usr-lib64-modules.mount: Mount path /usr/lib64/modules is not canonical (contains a symlink).
usr-lib64-modules.mount: Failed to run 'mount' task: Too many levels of symbolic links
usr-lib64-modules.mount: Failed with result 'resources'.
Failed to mount usr-lib64-modules.mount
Hence i tried to point source root i.e /usr/lib/modules and systemd service started but overlay mount is not working. Could you please help me out here ?
The text was updated successfully, but these errors were encountered:
I don't fully understand what you mean with /opt becoming read-only. That would only be the case if you have sysext images that extend /opt.
Thanks for pointing out that the docs are outdated!
Instead of the custom mount action for /usr, with systemd-sysext you have to migrate it to be a sysext itself: Create a folder /var/lib/extensions/kernel-modules/usr/lib64/modules/ for your modules and a file /var/lib/extensions/kernel-modules/usr/lib/extension-release.d/extension-release.kernel-modules containing the line ID=_any. Afterwards they will be mounted on boot by systemd-sysext.service.
We should update https://www.flatcar.org/docs/latest/reference/developer-guides/kernel-modules/ Not sure if Before=local-fs.target would make sense as drop-in for systemd-sysext.service.
As suggested i created the sysext directory extension and got some exception.
systemd-sysext list
NAME TYPE PATH TIME
docker-24.0.9 raw /etc/extensions/docker-24.0.9.raw -
kernel-modules directory /var/lib/extensions/kernel-modules -
df -h /usr/lib64/modules/
Filesystem Size Used Avail Use% Mounted on
sysext 32G 12K 32G 1% /usr
systemd-sysext is causing issue to install the custom kernel modules. Since i am using systemd-sysext image to install latest docker/containerd version and which mounts /opt as read only.
Ref:
systemd-sysext status
HIERARCHY EXTENSIONS SINCE
/opt none -
/usr docker-24.0.9
As per following doc if i try to install custom kernel modules on /opt then it will fail due to systemd-sysext.
So if i set modules path to some other writable location and use lowerdir=/usr/lib64/modules then it works fine. But the problem is /usr/lib64/modules are symlink and hence /etc/systemd/system/usr-lib64-modules.mount throws below exception.
Mount Ref:
sudo mount
-o "lowerdir=/usr/lib64/modules,upperdir=${modules},workdir=${modules}.wd"
-t overlay overlay /usr/lib64/modules
Exception logs:
usr-lib64-modules.mount: Mount path /usr/lib64/modules is not canonical (contains a symlink).
usr-lib64-modules.mount: Failed to run 'mount' task: Too many levels of symbolic links
usr-lib64-modules.mount: Failed with result 'resources'.
Failed to mount usr-lib64-modules.mount
Hence i tried to point source root i.e /usr/lib/modules and systemd service started but overlay mount is not working. Could you please help me out here ?
The text was updated successfully, but these errors were encountered: