Commit Graph

17 Commits

Author SHA1 Message Date
Maksym Pavlenko
a3c2c1e4da Clean shell scripts
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-10-12 10:30:46 -07:00
Derek McGowan
59134b5b3a
Merge pull request #8924 from polarathene/fix/use-implicit-nofile-limit
fix: Remove `LimitNOFILE` from `containerd.service`
2023-10-03 09:08:32 -07:00
Brennan Kinney
3ca39ef016 fix: Remove LimitNOFILE from containerd.service
Remove `LimitNOFILE` from `containerd.service` to rely on the systemd v240 implicit default of `1024:524288`. On supported platforms with systemd prior to v240, packagers will patch the service with an explicit `LimitNOFILE=1024:524288`.

- `1024` soft limit is an implicit default, avoiding unexpected breakage. Software that needs a higher limit should request to raise the soft limit for its process.
- `524288` hard limit is an implicit default since systemd v240 and is adequate for most processes (_half of the historical limit from `fs.nr_open` of `1048576`_), while 4096 is the implicit default from the kernel (often too low).
- The hard limit may not exceed `fs.nr_open` (_which a value of `infinity` will resolve to_). On most systems with systemd v240 or newer, this will resolve to an excessive size of 2^30 (over 1 billion).
- When set to `infinity` (usually as the soft limit) software may experience significantly increased resource usage, resulting in a performance regression or runtime failures that are difficult to troubleshoot.

Signed-off-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2023-09-15 09:04:53 +12:00
Maksym Pavlenko
c3f3cad287
Use sandboxed CRI by default
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
2023-08-23 08:50:40 -07:00
Mike Brown
ee6fc5c2ef adds an env var commented out for sandboxed mode
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
2022-07-22 17:13:25 -05:00
Wei Fu
6c74c391fd
Merge pull request #4475 from thaJeztah/minor_systemd_updates
systemd: use LimitNOFILE=infinity instead of hard-coded max value
2020-08-18 00:15:14 +08:00
Sebastiaan van Stijn
77a33e3db6
systemd: add license header to systemd unit
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-13 13:22:50 +02:00
Sebastiaan van Stijn
c691c36614
systemd: use LimitNOFILE=infinity instead of hard-coded max value
According to the systemd documentation, `infinity` can be used for all limits;
https://www.freedesktop.org/software/systemd/man/systemd.exec.html#Process%20Properties

> Resource limits may be specified in two formats: either as single value to set a
> specific soft and hard limit to the same value, or as colon-separated pair soft:hard
> (...) Use the string infinity to configure no limit on a specific resource.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-08-13 13:06:41 +02:00
Derek McGowan
1c7312e5da
Update containerd systemd unit file
Synchronizes unit file with CRI's version

Signed-off-by: Derek McGowan <derek@mcg.dev>
2020-08-11 09:15:12 -07:00
Maksym Pavlenko
ddae905b82 Support NOTIFY_SOCKET
Signed-off-by: Maksym Pavlenko <makpav@amazon.com>
2020-03-07 10:24:51 -08:00
Michael Crosby
54257bb5e6
Add local-fs.target to service file
This will ensure that containerd is started after the /etc/fstab entries

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-10-10 17:06:39 -04:00
Benjamin Elder
bbe45e4467 add Restart=always to unit file
Signed-off-by: Benjamin Elder <bentheelder@google.com>
2019-05-23 15:21:42 -07:00
Michael Crosby
1a1f8f11a5 Set nofile to 1048576
Closes #3201

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2019-04-10 11:39:17 -04:00
Sebastiaan van Stijn
555ea3fb43
Ignore modprobe failures in ExecStartPre (systemd unit)
When running containerd inside LXC, due to systemd being unable to execute
`modprobe overlay` inside the container (module is already loaded in host kernel).

This patch adds a `-` prefix to the `ExecStartPre` command, so that failures
are ignored, and the service can start as usual.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2018-11-10 12:52:06 +01:00
Michael Crosby
4972e3fae6 Update unit file for resources and task max
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2018-08-31 09:35:35 -04:00
Michael Crosby
b009642e1a Add rlimits to service file
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-11-30 18:50:32 -05:00
Michael Crosby
0bc86860f0 Add containerd unit file
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2017-06-16 14:05:16 -07:00