From 4217dde487e8e2fd456eebcd5133c690c070c95b Mon Sep 17 00:00:00 2001 From: Wei Zhang Date: Fri, 24 Aug 2018 17:54:26 +0800 Subject: [PATCH] kernel_config: add 4.1 kernel support Fixes #144 Current kata containers can't run with kernel 4.1 built from current x86 config, it will report error: ``` $ docker run -ti --runtime kata busybox sh docker: Error response from daemon: oci runtime error: rpc error: code = Internal desc = Could not run process: container_linux.go:348: starting container process caused "process_linux.go:402: container init caused \"open /dev/ptmx: no such file or directory\"". ``` This is caused by bogus devpts mount options. When run container with docker, docker will assign a default devpts mount for every container which equals to command below: ``` $ mount -t devpts -o nosuid,noexec,newinstance,ptmxmode=0666,mode=0620,gid=5 \ devpts /dev/pts ``` This requires kernel config `CONFIG_DEVPTS_MULTIPLE_INSTANCES=y` to work properly under kernel-4.1, but this option is already removed from latest kernel. It's better to add it back for support older kernel than current 4.14. Signed-off-by: Wei Zhang --- kernel/configs/x86_64_kata_old_kernel_compat | 7 +++++++ kernel/kata_config_version | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 kernel/configs/x86_64_kata_old_kernel_compat diff --git a/kernel/configs/x86_64_kata_old_kernel_compat b/kernel/configs/x86_64_kata_old_kernel_compat new file mode 100644 index 0000000000..80ad52f0b7 --- /dev/null +++ b/kernel/configs/x86_64_kata_old_kernel_compat @@ -0,0 +1,7 @@ +# +# This file contains config options which is removed/modified in kernel 4.14 but +# necessary for older kernels, if you're using a old kernel and failed to start +# kata containers, try to add these options and hope it can help! Enjoy it! +# +CONFIG_DEVPTS_MULTIPLE_INSTANCES=y + diff --git a/kernel/kata_config_version b/kernel/kata_config_version index ec635144f6..f599e28b8a 100644 --- a/kernel/kata_config_version +++ b/kernel/kata_config_version @@ -1 +1 @@ -9 +10