Are there plans to map shiftfs config option to new 5.12+ kernel id mapping?

Since 5.12 there’s a new method of shifting ids on mounts. Considering that some (many?) distros do not have kernel shiftfs and thus its required for a user to build an out-of-tree module, it seems like the direction LXD would want to move towards. However, I didn’t see a github issue.

This is currently causing me a problem as I recently upgraded to the ubuntu 5.13 OEM kernel, which for some reason does not build the shiftfs module (filed an issue). This caused my containers using shiftfs to fail to start when running the new kernel. As an aside, is there a ppa with Toby’s shiftfs-dkms as an ubuntu package?

It seems to me that the code could try the new method and fallback to shiftfs if the new method is unsupported (kernel <5.12).

Yes indeed, in fact that feature was added by @brauner from the LXC team.

See also LXD 4.16 has been released - #13 by stgraber for indications of how this is progressing.

Also the specific issue with shiftfs DKMS appears to have been fixed in:

As for the PPA you would need to ask the author.

Since 5.12 there’s a new method of shifting ids on mounts . Considering that some (many?) distros do not have kernel shiftfs and thus its required for a user to build an out-of-tree module, it seems like the direction LXD would want to move towards. However, I didn’t see a github issue.

Both LXD and LXC have already gained support for idmapped mounts if the underlying filesystem supports it. I added that support right after I merged my kernel patches.

Ok, am I correct in understanding that its the “if the underlying filesystem supports it” part that bit me here? I’m running my containers on btrfs, which according to the link @tomp posted isn’t supported yet.

Am I also correct in understanding that once BTRFS support is added that the device with property shift: "true" will continue to work without shiftfs unmodified?

Correct, if running on a supported filesystem you won’t need a kernel with shiftfs support if it has idmapped mount support.

Yes.

Yes. I’ve put up a series to support idmapped mounts on btrfs and so far it looks like it will make it into Linux 5.15 but no promises.
https://lore.kernel.org/linux-btrfs/20210727104900.829215-1-brauner@kernel.org