-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kernel.shm* settings to work in lxc containers #989
Comments
LXC master has support for all
So this can be closed. |
Is it implemented since lxc 3.0 ?
|
Are you using LXD or LXC if LXD, please show:
and the container's config. |
LXC from Proxmox 5.3-1 (no lxc command)
Container config:
|
See https://bugzilla.proxmox.com/show_bug.cgi?id=1785, sorry for the delay, preparing a patch for this... |
@Blub , we do not see any patch and no related commits? And bug is marked as resolved and this issue is also marked as closed. Where is patch? |
@Blub , just to clarify, I'm using PROXMOXX 5.4-4 with LXC. I have a VM and I manually add in file /var/lib/lxc/109/config the following parameter:
But after VM restart - this parameter disappears automatically! |
Hello there, That can be explained easily, don't place the config there! That location is volatile, for persistence, It should be written to /etc/pve/lxc/109.conf! Regards |
If i put lxc.sysctl.kernel.shmmax = 17179869184 in my 105.conf file, the container failed to start. This is not working and i got the last proxmox update (Linux pvx-center 4.15.18-14-pve - SMP PVE 4.15.18-39) |
Report the issue on the PVE forums? I have proxmox 5.3 but IIRC, the latest one is 5.5-6 or 5.6. Not to sure. Looking at the bug report, the patch is somewhere on the dev ml, I would have to search for it. And if I reading the report correctly, the affected component is pve-common. Regards |
Also: https://bugzilla.proxmox.com/show_bug.cgi?id=1785#c5
From my understanding, for lxc.sysctl.kernel.shmmax to work, you need to include the above. Cheers |
@LHorace , but doing So that recommendation doesn't make sense at all. We just need this configs to be applied on individual VM without affecting other VMs |
You mean containers?
Again, you mean containers right? LXC is not virtualization technology but a containment technology. IDK, isn't /proc namespace ? Besides, this issue and proxmox bug report is about enabling support for lxc.sysctl.*. If that's not what you want, perhaps you should open a new issue? You can also raise the issue on the Forums or on the proxmox bug report? Lastly, what happens if you don't put lxc.mount.auto: proc:rw but still include you lxc.sysctl.* settings, what happens then? If you up2date and still having problems starting the container, then raise a bug report at http://bugzilla.proxmox.com/ ? |
@LHorace , thanks for response.
And to answer your question, if not putting proc:rw option and put lxc.sysctl.* setting, container will just fail to start, because it cannot set this option as sysctl configs are readonly. And that doesn't make sense to me, as why I want to make it rw, just to put predefined configs? Anyway I do not want users to manually edit kernel options inside container themselves. |
@LHorace one more point. As I know , LXC is shared kernel solution. So maybe what I'm saying doesn't make sense at all, because all those sysctl options are global and applied to host machine always? Just because LXC works like this? Maybe I just need to switch to KVM and that is it? |
I like to clarify two things here:
My understanding is
Reviewing what you posted, seems like a limitation be it the Kernel or LXC. In this case, is unrelated to this issue, perhaps you should open a new issue describing the problem with LXC developers? A bug report with proxmox with link issue on github could help sort all this out for you. |
Per https://github.com/lxc/lxd/issues/1351, stgraber mentioned that LXC should allow a rw bindmount to these /proc/sys/kernel/shm* tunables. At present, writing to them yields a read-only fs error message.
Alternatively, if the physical host setting would be passed down (for shmmax; it's not currently), that would also ease a lot of my troubles with older PostgreSQL installations.
Thanks much!
Matt
The text was updated successfully, but these errors were encountered: