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

[master] rpm: patch RLIMIT_NOFILE for EL 7 systems #968

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

neersighted
Copy link
Member

RLIMIT_NOFILE defaults to an unusable value on EL 7 systems, but more modern systems have sane defaults. As such, patch the systemd unit only on EL 7 systems to ensure correct behaviour.

@thaJeztah
Copy link
Member

Looks like containerd did not (yet) backport that change to 1.6 and 1.7, but we need to keep an eye in case they do;

Or we could consider doing the reverse, and patching the containerd systemd unit to (conditionally) remove the LimitNOFILE=infinity

Comment on lines +14 to +15
# Comment TasksMax if your systemd version does not support it.
# Only systemd 226 and above support this option.
Copy link
Member

Choose a reason for hiding this comment

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

Unrelated, but now wondering what version of systemd RHEL/CentOS 7 are running, and if this comment is still relevant (ISTR it was always just a warning, so not even sure if relevant at all)

Copy link
Member Author

Choose a reason for hiding this comment

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

@thaJeztah
Copy link
Member

Looks like something is failing. Could be due to some of the indirections / shuffling of paths that things are not where you expect them to be (I definitely banged my head against a wall in the past on that matter);

cp /home/ubuntu/workspace/docker-ce-packaging_PR-968/rpm/patches/rpmbuild/SOURCES/01-rlimit_nofile-rhel7.patch rpmbuild/SOURCES
cp: cannot stat '/home/ubuntu/workspace/docker-ce-packaging_PR-968/rpm/patches/rpmbuild/SOURCES/01-rlimit_nofile-rhel7.patch': No such file or directory
make[1]: *** [Makefile:98: rpmbuild/SOURCES/01-rlimit_nofile-rhel7.patch] Error 1
make[1]: Leaving directory '/home/ubuntu/workspace/docker-ce-packaging_PR-968/rpm'
make: *** [Makefile:79: centos-7] Error 2
script returned exit code 2

@neersighted
Copy link
Member Author

Yeah, thought I had this working but I was disentangling it from other changes I was testing last week; will fiddle with the paths a bit.

RLIMIT_NOFILE defaults to an unusable value on EL 7 systems, but more
modern systems have sane defaults. As such, patch the systemd unit only
on EL 7 systems to ensure correct behaviour.

Signed-off-by: Bjorn Neergaard <[email protected]>
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

@thaJeztah thaJeztah merged commit 9edcac2 into docker:master Nov 21, 2023
6 checks passed
@neersighted neersighted deleted the rpm_rlimit_nofile branch November 21, 2023 18:41
@thaJeztah thaJeztah changed the title rpm: patch RLIMIT_NOFILE for EL 7 systems [master] rpm: patch RLIMIT_NOFILE for EL 7 systems Jul 20, 2024
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 this pull request may close these issues.

2 participants