Skip to content

contrib/check-config.sh: fixes for cgroup v2 and kernel v5.x#41869

Merged
AkihiroSuda merged 6 commits intomoby:masterfrom
kolyshkin:check-config
Jan 13, 2021
Merged

contrib/check-config.sh: fixes for cgroup v2 and kernel v5.x#41869
AkihiroSuda merged 6 commits intomoby:masterfrom
kolyshkin:check-config

Conversation

@kolyshkin
Copy link
Contributor

@kolyshkin kolyshkin commented Jan 11, 2021

fixes #41797
fixes #41798

  1. contrib/check-config.sh: support for cgroupv2

Before:

Generally Necessary:

After:

Generally Necessary:

  • cgroup hierarchy: cgroupv2
  1. Make check for various CONFIG_* options recently removed from the kernel conditional.

See individual commits for details.

Copy link
Member

@tianon tianon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀 LGTM

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good after linting failure is fixed 👍

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>
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>
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>
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>
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>
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>
Copy link
Member

@tianon tianon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need more validations for cgroup2, but it can be worked out later, so LGTM

@AkihiroSuda AkihiroSuda merged commit cebc744 into moby:master Jan 13, 2021
@thaJeztah
Copy link
Member

@AkihiroSuda do you know what's missing? If so, could you open a tracking issue that lists the missing ones?

@AkihiroSuda
Copy link
Member

opened #41874

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

contrib/check-config.sh cgroup hierarchy: nonexistent?? with cGroups v2 contrib/check-config.sh shows dropped configuration as missing

4 participants