I am attempting to install Gitlab which requires certain Kernel parameters to be set. I understand certain parameters are not allowed to be set by containers unless they are privileged but it is my understanding that they should use the host’s settings. I set
shmmax on the host to a value of
17179869184 however in the container I get
18446744073692774399. Am I missing something?
Off Topic: I’m curious how you’ll be able to get Gitlab to run in a LXC container. Did you run into any issues besides
Not necessarily, they can be namespaced but be tied to a namespace other than the user namespace. In this case I expect it to be tied to the IPC namespace.
So the kernel effectively gives you a new instance of that code along with its default value for every IPC namespace created but it was deemed unsafe for an unprivileged user to be able to increase the size so you end up with this behavior.
You can try using
raw.lxc to set a
lxc.sysctl.kernel.shmmax config key, this may work in this case.
@lhprojects I deleted the relevant section from the Chef recipe where it was trying to set the Kernel parameters and was able to get it running. That was the only issue so far.
@stgraber Yes after further research,
18446744073692774399 is the default value for shmmax so that makes sense now. I did attempt to set it via
raw however LXC errored out when attempting to set them. I was able to work around this for now by just making Gitlab not attempt to set these parameters. Hopefully upstream will allow this section to be optional so that other LXC users will not experience this issue.