Bug 1004724 - kernel.shmmax can't be changed inside an lxc container
Summary: kernel.shmmax can't be changed inside an lxc container
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-09-05 11:01 UTC by Oskari Saarenmaa
Modified: 2016-04-10 14:41 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-10 14:41:10 UTC
Embargoed:


Attachments (Terms of Use)

Description Oskari Saarenmaa 2013-09-05 11:01:58 UTC
Description of problem:
Libvirt creates a new IPC namespace in containers which resets any IPC values set on the host side (such as kernel.shmmax) and mounts a new /proc readonly which won't allow kernel.shmmax (or any other sysctl) to be changed inside the container.  This is a problem for applications, such as PostgreSQL (prior to version 9.3), which require a lot of sysv shared memory.

# sysctl -w kernel.shmmax=1000000000
error: "Read-only file system" setting key "kernel.shmmax"

Version-Release number of selected component (if applicable):
libvirt-1.1.2-1.fc20

Comment 1 Gregory Haynes 2013-12-12 19:57:30 UTC
I have been able to work around this be remounting proc/sys read-writeable:

sudo mount -o remount rw /proc/sys

Comment 2 Cole Robinson 2016-04-10 14:41:10 UTC
This is basically by design. More info in this docker discussion which more or less applies to libvirt lxc as well.

https://github.com/docker/docker/issues/10176

Their suggestion is to change the shmmax value on the host


Note You need to log in before you can comment on or make changes to this bug.