Commit graph

88 commits

Author SHA1 Message Date
Scott Moser
29977d5058 contrib/check-config: conditionally disable color output.
Redirecting check-config.sh output to a file puts control character
output into that file, which isn't helpful for reading.

Disable colorized output if either
1. NO_COLOR environment is set to "1"
2. stdout is not a terminal.

Signed-off-by: Scott Moser <smoser@brickies.net>
2023-10-30 10:59:23 -04:00
Stephan Henningsen
cf9073397c Update check-config.sh
Add IP_NF_MANGLE to "Generally Required" kernel features, since it appears to be necessary for Docker Swarm to work.

Closes https://github.com/moby/moby/issues/46636

Signed-off-by: Stephan Henningsen <stephan-henningsen@users.noreply.github.com>
2023-10-18 21:59:04 +02:00
Bjorn Neergaard
800ea039ec
contrib/check-config: move xt_bpf check to overlay section
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-06-05 08:11:05 -06:00
Bjorn Neergaard
1910fdde81
contrib/check-config: check for xt_bpf
We omit xt_u32 as it's optional; since we will remove support for this
module in the future, it's simpler to check for xt_bpf, which will
become the new baseline.

Related issues:
* https://github.com/microsoft/WSL/issues/10029#issuecomment-1574440255
* https://github.com/docker/for-win/issues/13450#issuecomment-1574443139

Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
2023-06-02 19:31:13 -06:00
Sebastiaan van Stijn
50d2c94bd6
Merge pull request #43637 from thaJeztah/remove_deprecated_storage_drivers
Remove deprecated devicemapper storage driver
2023-05-18 21:23:41 +02:00
Sebastiaan van Stijn
dc11d2a2d8
remove deprecated devicemapper storage-driver
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-20 23:51:54 +02:00
Florian Schmaus
005150ed69 check-config.sh: do not check for RT_GROUP_SCHED
Unconditionally checking for RT_GROUP_SCHED is harmful. It is one of
the options that you want inactive unless you know that you want it
active.

Systemd recommends to disable it [1], a rationale for doing so is
provided in

    https://bugzilla.redhat.com/show_bug.cgi?id=1229700#c0.

The essence is that you can not simply enable RT_GROUP_SCHED, you also
have to assign budgets manually. If you do not assign budgets, then
your realtime scheduling will be affected.

If check-config.sh keeps recommending to enable this, without further
advice, then users will follow the recommendation and likely run into
issues.

Again, this is one of the options that you want inactive, unless you
know that you want to use it.

Related Gentoo bugs:
- https://bugs.gentoo.org/904264
- https://bugs.gentoo.org/606548

1: 39857544ee/README (L144-L150)

Signed-off-by: Florian Schmaus <flo@geekplace.eu>
2023-04-19 17:29:56 +02:00
Sebastiaan van Stijn
3903f16cd6
daemon: remove deprecated AuFS storage driver
There's still some locations refering to AuFS;

- pkg/archive: I suspect most of that code is because the whiteout-files
  are modelled after aufs (but possibly some code is only relevant to
  images created with AuFS as storage driver; to be looked into).
- contrib/apparmor/template: likely some rules can be removed
- contrib/dockerize-disk.sh: very old contribution, and unlikely used
  by anyone, but perhaps could be updated if we want to (or just removed).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-15 01:27:16 +02:00
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