Skip to content
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

FATA[0000] Container start failed: [10] System error: no such directory for memory.swappiness. #575

Closed
pycloux opened this issue Feb 18, 2016 · 3 comments · Fixed by #580

Comments

@pycloux
Copy link

pycloux commented Feb 18, 2016

It seems that the version 0.0.8 of runc did not solved the issue previously reported with #543

My OS is:
Linux WOPR-Debian 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u5 (2015-10-09) x86_64 GNU/Linux

When attempting to run a basic nginx container I got the following log:

WARN[0000] signal: killed                               
FATA[0000] Container start failed: [10] System error: no such directory for memory.swappiness. 

Here is my config.json file:

{
    "ociVersion": "0.3.0",
    "platform": {
        "os": "linux",
        "arch": "amd64"
    },
    "process": {
        "terminal": true,
        "user": {
            "uid": 0,
            "gid": 0
        },
        "args": [
            "sh"
        ],
        "env": [
            "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
            "TERM=xterm"
        ],
        "cwd": "/"
    },
    "root": {
        "path": "rootfs",
        "readonly": true
    },
    "hostname": "shell",
    "mounts": [
        {
            "destination": "/proc",
            "type": "proc",
            "source": "proc"
        },
        {
            "destination": "/dev",
            "type": "tmpfs",
            "source": "tmpfs",
            "options": [
                "nosuid",
                "strictatime",
                "mode=755",
                "size=65536k"
            ]
        },
        {
            "destination": "/dev/pts",
            "type": "devpts",
            "source": "devpts",
            "options": [
                "nosuid",
                "noexec",
                "newinstance",
                "ptmxmode=0666",
                "mode=0620",
                "gid=5"
            ]
        },
        {
            "destination": "/dev/shm",
            "type": "tmpfs",
            "source": "shm",
            "options": [
                "nosuid",
                "noexec",
                "nodev",
                "mode=1777",
                "size=65536k"
            ]
        },
        {
            "destination": "/dev/mqueue",
            "type": "mqueue",
            "source": "mqueue",
            "options": [
                "nosuid",
                "noexec",
                "nodev"
            ]
        },
        {
            "destination": "/sys",
            "type": "sysfs",
            "source": "sysfs",
            "options": [
                "nosuid",
                "noexec",
                "nodev"
            ]
        },
        {
            "destination": "/sys/fs/cgroup",
            "type": "cgroup",
            "source": "cgroup",
            "options": [
                "nosuid",
                "noexec",
                "nodev",
                "relatime",
                "ro"
            ]
        }
    ],
    "hooks": {},
    "linux": {
        "capabilities": [
            "CAP_AUDIT_WRITE",
            "CAP_KILL",
            "CAP_NET_BIND_SERVICE"
        ],
        "rlimits": [
            {
                "type": "RLIMIT_NOFILE",
                "hard": 1024,
                "soft": 1024
            }
        ],
        "resources": {
            "memory": {
                "limit": null,
                "reservation": 0,
                "swap": 0,
                "kernel": 0,
                "swappiness": 60
            },
            "devices": [
                {
                    "allow": false,
                    "access": "rwm"
                }
            ]
        },
        "namespaces": [
            {
                "type": "pid"
            },
            {
                "type": "network"
            },
            {
                "type": "ipc"
            },
            {
                "type": "uts"
            },
            {
                "type": "mount"
            }
        ],
        "devices": null,
        "apparmorProfile": "",
        "selinuxProcessLabel": "",
        "seccomp": {
            "defaultAction": "",
            "architectures": null
        },
        "noNewPrivileges": true
    }
}

@crosbymichael
Copy link
Member

is swap enabled on your system for cgroups? its a kernel config option

CONFIG_SWAP=y
CONFIG_MEMCG_SWAP=y

@crosbymichael
Copy link
Member

You also have to have it enabled as a boot option in grub

GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"

@pycloux
Copy link
Author

pycloux commented Feb 23, 2016

Thanks I'll try with the UCP 1.0

@pycloux pycloux closed this as completed Feb 23, 2016
stefanberger pushed a commit to stefanberger/runc that referenced this issue Sep 8, 2017
README: Define 'unspecified', 'undefined', and 'implementation-defined'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants