Comment 5 for bug 1967154

Revision history for this message
George Kraft (cynerva) wrote :

Thanks for the feedback. Assuming we were to proceed with no changes in Juju, here's what I think we would need to do:

1. For Juju controllers deployed to localhost, we'll need to update our documentation to include setting required kernel parameters prior to deployment.

2. For Juju controllers with MAAS/vSphere/etc clouds, we'll need to update any bundles that deploy units to e.g. `machine: lxd:0`, to also include an Ubuntu charm deployed to `machine: 0` with a sysconfig subordinate[1] that sets the kernel parameters properly. We will also need some hefty documentation around this to ensure that people building their own bundles know it is required.

The kernel parameters that we're discussing in this issue aren't specific to Kubernetes, but rather seem to be those that the LXD documentation recommends for production use[2]. In my mind, it would make sense for Juju, when initializing LXD on a host VM, to also set the kernel parameters that the LXD project recommends. This is what I had in mind when adding Juju to this issue.

The Kubernetes part of this issue is that the kubernetes-control-plane and kubernetes-worker charms provide a `sysctl` config option that simply does not work in LXD containers, and should be removed to avoid confusion. It's worth noting that Kubernetes does come with its own kernel parameter requirements[3], so we will probably need to tweak our documentation and bundles to handle those anyway.

If there's anything that Juju can do to either:
1. Set recommended kernel parameters for LXD when initializing LXD on host machines, or
2. Allow units in LXD to "bubble up" kernel parameter needs to the host machine

It would certainly reduce the weight of our documentation and the need for sysconfig as a workaround, and would be much appreciated.

[1]: https://charmhub.io/sysconfig
[2]: https://linuxcontainers.org/lxd/docs/master/reference/server_settings/
[3]: https://github.com/charmed-kubernetes/layer-kubernetes-node-base/blob/38fdcfce8fc89f397c1d8212065e12cdfae6b251/config.yaml#L4