Debian or Ubuntu for production use of LXD?

Using the LXD snap on both distros, I was wondering if we should expect both to work exactly the same or if the LXD developers recommend to use one more than the other?

Thanks

@stgraber might correct me, but although LXD should work fine on all distros we support (even more so if you are deploying it with the snap), you’re going to have the best experience on Ubuntu, since it’s the platform we LXD developers use and that the vast majority of users use too. Generally speaking, the LXD snap on Debian and Ubuntu will work exactly the same as long as the features provided by the kernel are the same (which in the past has frequently not been the case).

1 Like

Right, the way the snap works is that a minimal Ubuntu system (core) is included, so as far as running the snap, everything is identical regardless of distro.

The one bit that we don’t have control over and that does change distro to distro is the kernel.
A modern Debian kernel with AppArmor enabled should work just fine for the very vast majority of LXD interactions.

As @freeekanayaka mentioned, since we do work for Canonical and so have a good relationship with the Ubuntu kernel team, we tend to have them backport any new kernel work we do into the Ubuntu kernel. This means that kernel features tend to be available there before other Linux distributions (though some are doing a good job at doing similar backports).

Recent examples of such features would be:

  • New AppArmor features
  • Unprivileged FUSE mounts
  • Unprivileged file capabilities
  • Several fixes to the network namespace
  • New netlink APIs for bulk retrieval of network state

And some which we’re about to land:

  • binderfs
  • shiftfs

All that work happens upstream and so running a very recent mainline kernel will get you those (with the exception of shiftfs as we’re still working out how to land it upstream), the main difference here is that most of those can be found in the 4.4 and 4.15 kernels from Ubuntu thanks to backporting work from our kernel team.

1 Like

Thanks for the detailed answer!

You mentioned backporting to the 4.4 and 4.15 Ubuntu kernels. I assume that, for example, 18.04 and 18.10 support the same LXD features?

Yeah, we’ll usually backport to the in-between kernels too (like 18.10) though the focus is always the LTS releases as they account for the very vast majority of our users (and is therefore what we run most of our tests against).

1 Like