Commit graph

80 commits

Author SHA1 Message Date
Ryan Shea
2deec80dba fix(check-config.sh): Check for existence of /etc/os-release before sourcing
Signed-off-by: Ryan Shea <sheabot03@gmail.com>
2022-02-11 11:40:32 -07:00
gunadhya
aff02dbcaf Updated check_config
Signed-off-by: gunadhya <6939749+gunadhya@users.noreply.github.com>

Added cgroupv2 controller check

Modified comment
2021-07-09 09:24:24 +05:30
Joakim Roubert
ffc6d8d3dd contrib/check-config.sh: Remove awk dependency
The awk dependency is an issue when running check-config.sh on systems
without awk. The use of awk can be replaced with sed, which improves
portability.

The PR code review discussion iterated via grep to this final sed
version that is all Tianon Gravi's art.

Co-authored-by: Tianon Gravi <admwiggin@gmail.com>
Signed-off-by: Joakim Roubert <joakim.roubert@axis.com>
2021-06-03 21:26:49 +02:00
Joakim Roubert
2865d17233 Update contrib/check-config.sh
Co-authored-by: Tianon Gravi <admwiggin@gmail.com>
Signed-off-by: Joakim Roubert <joakimr@axis.com>
2021-05-27 09:21:17 +02:00
Joakim Roubert
f1e7d02a78 Update contrib/check-config.sh
Co-authored-by: Tianon Gravi <admwiggin@gmail.com>
Signed-off-by: Joakim Roubert <joakimr@axis.com>
2021-05-27 09:21:17 +02:00
Joakim Roubert
0f77b22dbe Update contrib/check-config.sh
Co-authored-by: Tianon Gravi <admwiggin@gmail.com>
Signed-off-by: Joakim Roubert <joakimr@axis.com>
2021-05-27 09:21:17 +02:00
Joakim Roubert
1ce955ec83 contrib/check-config.sh: Make script POSIX
On systems that do not have bash, the current bash-based
check-config.sh won't run. Making check-config.sh a POSIX shell script
instead makes it more portable.

Signed-off-by: Joakim Roubert <joakim.roubert@axis.com>
2021-05-25 13:48:42 +02:00
Kenta Tada
b14bf43764 check-config.sh: add SELinux and AppArmor
This commit adds the check of SELinux and AppArmor as optional features.

Signed-off-by: Kenta Tada <Kenta.Tada@sony.com>
2021-03-30 14:42:29 +09:00
Kenta Tada
1c72a68f2a check-config.sh: add SECCOMP_FILTER
The check of seccomp filter support was needed.

Ref: https://github.com/opencontainers/runc/pull/2867

Signed-off-by: Kenta Tada <Kenta.Tada@sony.com>
2021-03-23 11:16:25 +09:00
Piotr Karbowski
e8ceb97646
check-config.sh: add NETFILTER_XT_MARK
Points out another symbol that Docker might need. in this case Docker's
mesh network in swarm mode does not route Virtual IPs if it's unset.

From /var/logs/docker.log:
time="2021-02-19T18:15:39+01:00" level=error msg="set up rule failed, [-t mangle -A INPUT -d 10.0.1.2/32 -j MARK --set-mark 257]:  (iptables failed: iptables --wait -t mang
le -A INPUT
-d 10.0.1.2/32 -j MARK --set-mark 257: iptables v1.8.7 (legacy): unknown option \"--set-mark\"\nTry `iptables -h' or 'iptables --help' for more information.\n (exit status 2))"

Bug: https://github.com/moby/libnetwork/issues/2227
Bug: https://github.com/docker/for-linux/issues/644
Bug: https://github.com/docker/for-linux/issues/525
Signed-off-by: Piotr Karbowski <piotr.karbowski@protonmail.ch>
2021-02-19 20:19:36 +01:00
Kir Kolyshkin
06d9020fac contrib/check-config.sh: fix INET_XFRM_MODE_TRANSPORT
This parameter was removed by kernel commit 4c145dce260137,
which made its way to kernel v5.3-rc1. Since that commit,
the functionality is built-in (i.e. it is available as long
as CONFIG_XFRM is on).

Make the check conditional.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-01-12 13:55:13 -08:00
Kir Kolyshkin
18e0543587 contrib/check-config.sh: fix IOSCHED_CFQ CFQ_GROUP_IOSCHED
These config options are removed by kernel commit f382fb0bcef4,
which made its way into kernel v5.0-rc1.

Make the check conditional.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-01-12 13:55:12 -08:00
Kir Kolyshkin
070f9d9dd3 contrib/check-config.sh: fix MEMCG_SWAP_ENABLED
Kernel commit 2d1c498072de69e (which made its way into kernel v5.8-rc1)
removed CONFIG_MEMCG_SWAP_ENABLED Kconfig option, making swap accounting
always enabled (unless swapaccount=0 boot option is provided).

Make the check conditional.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-01-12 13:55:12 -08:00
Kir Kolyshkin
03da41152a contrib/check-config.sh: fix NF_NAT_NEEDED
CONFIG_NF_NAT_NEEDED was removed in kernel commit 4806e975729f99c7,
which made its way into v5.2-rc1. The functionality is now under
NF_NAT which we already check for.

Make the check for NF_NAT_NEEDED conditional.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-01-12 13:55:12 -08:00
Kir Kolyshkin
eeb53c1f22 contrib/check-config.sh: fix NF_NAT_IPV4
CONFIG_NF_NAT_IPV4 was removed in kernel commit 3bf195ae6037e310,
which made its way into v5.1-rc1. The functionality is now under
NF_NAT which we already check for.

Make the check for NF_NAT_IPV4 conditional.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-01-12 13:55:12 -08:00
Kir Kolyshkin
76b59065ae contrib/check-config.sh: support for cgroupv2
Before:

> Generally Necessary:
> - cgroup hierarchy: nonexistent??
>     (see https://github.com/tianon/cgroupfs-mount)

After:

> Generally Necessary:
> - cgroup hierarchy: cgroupv2

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2021-01-12 13:54:54 -08:00
Akihiro Suda
3cf82748dd run shfmt
git grep --name-only '^#!' | egrep -v '(vendor|\.go|Jenkinsfile)' | xargs shfmt -w -bn -ci -sr

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2020-03-03 12:27:49 +09:00
Pascal Bach
78405559cf
Check for BRIDGE_VLAN_FILTERING in overlay section
Overlay networking in docker stack does not work correctly if this option is missing, docker will output the following error:

```
enabling default vlan on bridge br0 failed open /sys/class/net/br0/bridge/default_pvdi: permission denied
```

This because `default_pvdi` does not exist without this option.

Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Simon Ausserlechner <simon.ausserlechner@siemens.com>
2019-07-16 17:32:51 +02:00
Tim
1ba4e69601 shellcheck
https://www.shellcheck.net/
Signed-off-by: Tim <elatllat@gmail.com>
2019-06-04 09:34:39 -04:00
Sebastiaan van Stijn
44e1c6ce81
Add CONFIG_IP_VS_PROTO_TCP, CONFIG_IP_VS_PROTO_UDP, IP_NF_TARGET_REDIRECT to check-config.sh
On kernels without this options set, publishing ports for swarm
services does not work, making the published port not accessible
("connection refused")

Thanks to Wenbo Wang for reporting, and Tianon for finding this.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-11-15 11:11:48 +01:00
Sebastiaan van Stijn
e2de212339 Merge pull request #28634 from ghostplant/check_cfg_memsw
Checking whether CG_MEM_SWAP is enabled at the moment.
2017-01-27 10:49:32 +01:00
Santhosh Manohar
e475136208 Update check-config.sh to include modules for FTP/TFTP
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
2016-12-29 13:04:36 -08:00
Ian Campbell
49dcce7ba0 Caution against the use of CONFIG_LEGACY_VSYSCALL_NATIVE
It provides an ASLR-bypassing target with usable ROP gadgets.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2016-12-05 10:13:07 +00:00
Ian Campbell
163db04452 Check for LEGACY_VSYSCALL_* options
Chosing LEGACY_VSYSCALL_NONE (over NATIVE or EMULATE) will mean that binaries
using eglibc <= 2.13 will not run (segfault).

Fixes #28705.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2016-11-24 11:39:05 +00:00
cuiwei13
cd7496abb5 Checking whether CG_MEM_SWAP is enabled at the current system session
Signed-off-by: CUI Wei <ghostplant@qq.com>
2016-11-22 21:24:01 -05:00
Justin Cormack
228ee16df3 Fix check config script on 4.8 kernels
DEVPTS_MULTIPLE_INSTANCES is no longer an option, it is always set, so
do not check for this post 4.8.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-18 11:42:05 +00:00
Justin Cormack
6d116ffbbb Make the check-config script return success or failure
Although primarily a human readable script, it is quite useful
to return success or failure from this script so it can be used
as a basic test.

Fail if any check fails, including some that are optional,
other than the storage driver tests, where only one needs to
succeed, so the system has at least one workable storage driver.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-11-02 23:23:52 +00:00
Justin Cormack
b28619046a Do not warn in check-config script about ext3 if provided by ext4
Many distributions now use ext4 to provide ext2 and ext3 support,
so do not warn about possibly missing ext3 support if the config
option is used.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-10-28 12:51:09 +01:00
Alessandro Boch
275013ce8b Update required modules for overlay dataplane encryption
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-10-11 14:06:55 -07:00
Charlie Drage
2fb2361b29 Add check for CONFIG_IP_NF_NAT to kernel check
This appears to be missing. NAT (via iptables) is required in order to
setup Docker networking.

Signed-off-by: Charlie Drage <charlie@charliedrage.com>
2016-10-04 12:14:45 -04:00
alexchen
4c74469d30 add check flag for CONFIG_NETFILTER_XT_MATCH_IPVS CONFIG_IP_VS_NFCT CONFIG_IP_VS_RR in contrib/check-config.sh
Signed-off-by: alexchen <alexchenunix@gmail.com>
2016-10-01 09:50:17 +08:00
Andrei Gherzan
1c886a70df check-config.sh: Add check for CONFIG_BTRFS_FS_POSIX_ACL
docker is trying to set system.posix_acl_access but using BTRFS this fails if
CONFIG_BTRFS_FS_POSIX_ACL is not activated.

Signed-off-by: Andrei Gherzan <andrei@resin.io>
2016-08-25 13:20:18 +01:00
Lei Jitang
f5940ef725 Add IPVLAN and DUMMY to check-config.sh
This commit add DUMMY and IPVLAN to check-config.sh
because they are need for ipvlan and macvlan network
driver.

Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-07-07 21:21:57 -04:00
Brian Goff
9e14002ced Add ip_vs to check-config script
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2016-06-28 13:42:38 -04:00
Alessandro Boch
c355e059cc Add modules for secure overlay network to check-config.sh
Signed-off-by: Alessandro Boch <aboch@docker.com>
2016-06-22 10:51:13 -07:00
Justin Cormack
4e2d98761d Begin a section in the check-config script to check limits
Initially this checks the kernel's maxkeys setting which is
low in some older distribution kernels, such that only 200 containers
can be created, reported in #22865.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>
2016-05-20 16:05:25 -07:00
Qiang Huang
27d7b135d4 Update check_config for MEMCG_KMEM
CONFIG_MEMCG_KMEM is removed since 4.6, it's accounted by default
since 4.6, so it's merged to CONFIG_MEMCG.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-05-16 13:55:24 +08:00
Qiang Huang
192387198d Add CONFIG_CFQ_GROUP_IOSCHED check
blkio.weight depends on this config.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2016-04-25 14:08:29 +08:00
Tianon Gravi
c082dad637 Add "VXLAN" to check-config.sh
Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2016-04-11 16:42:53 -07:00
Jessica Frazelle
69cf03700f
pids limit support
update bash commpletion for pids limit

update check config for kernel

add docs for pids limit

add pids stats

add stats to docker client

Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2016-03-08 07:55:01 -08:00
Alexander Morozov
f5b4e1be6b Fix CONFIG_KEYS check in contrib/check-config.sh
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-03-01 10:01:12 -08:00
Alexander Morozov
c1996c9245 Add CONFIG_KEYS to check-config.sh
We need this after opencontainers/runc#488

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2016-02-26 23:40:35 -08:00
Phil Estes
2355151556 Add check for RHEL7/CentOS7 experimental userns disabled
Add a check in `check-config.sh` to see if we are running on a RHEL7 or
CentOS7 system, which may report that CONFIG_USERNS is OK/enabled, but
user namespaces still won't work because of the experimental feature
flag added by Redhat.

This will add a warning if it is actually disabled and notes what has to
be added to the grub/boot command line to enable it.

Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
2016-02-23 23:28:24 -06:00
Tianon Gravi
5c161f4e1a Update check-config.sh to use "case" instead of an associative array
This fixes Bash 3.x compatibility (where associative arrays are not available).

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>
2016-01-12 20:57:56 -08:00
Jessica Frazelle
cde9e8bc83
update packagers.md and kernel config check
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-12-03 16:30:50 -08:00
Lei Jitang
d475c4ddc1 Add user namespace check to check-chonfig.sh
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-10-11 17:26:34 +08:00
Lei Jitang
cbb69531a8 Add CONFIG_BLK_DEV_THROTTLING to check-config.sh
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2015-08-19 15:11:04 +08:00
Qiang Huang
6c4d4c70c6 Adapt CONFIG_NETPRIO_CGROUP in check-config.sh
Fixes: #15572

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-08-14 14:38:48 +08:00
Qiang Huang
fb85a99f58 Add some cgroup related config check
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-06-19 13:47:48 +08:00
Qiang Huang
0c4c830289 Add check config for ext3 file system
Some distros still use ext3 as default file system, we should check
these configs as well.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-06-19 13:45:07 +08:00