1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-09 01:18:19 +03:00
The systemd System and Service Manager
Go to file
Zbigniew Jędrzejewski-Szmek 9ab93761c1 pid1: stop refusing to boot with cgroup v1
Since v256 we completely fail to boot if v1 is configured. Fedora 41 was just
released with v256.7 and this is probably the first major exposure of users to
this code. It turns out not work very well. Fedora switched to v2 as default in
F31 (2019) and at that time some people added configuration to use v1 either
because of Docker or for other reasons. But it's been long enough ago that
people don't remember this and are now very unhappy when the system refuses to
boot after an upgrade.

Refusing to boot is also unnecessarilly punishing to users. For machines that
are used remotely, this could mean somebody needs to physically access the
machine. For other users, the machine might be the only way to access the net
and help, and people might not know how to set kernel parameters without some
docs. And because this is in systemd, after an upgrade all boot choices are
affected, and it's not possible to e.g. select an older kernel for boot. And
crashing the machine doesn't really serve our goal either: we were giving a
hint how to continue using v1 and nothing else.

If the new override is configured, warn and immediately boot to v1.
If v1 is configured w/o the override, warn and wait 30 s and boot to v2.
Also give a hint how to switch to v2.

https://bugzilla.redhat.com/show_bug.cgi?id=2323323
https://bugzilla.redhat.com/show_bug.cgi?id=2323345
https://bugzilla.redhat.com/show_bug.cgi?id=2322467
https://www.reddit.com/r/Fedora/comments/1gfcyw9/refusing_to_run_under_cgroup_01_sy_specified_on/

The advice is to set systemd.unified_cgroup_hierarchy=1 (instead of removing
systemd.unified_cgroup_hierarchy=0). I think this is easier to convey. Users
who are understand what is going on can just remove the option instead.

The caching is dropped in cg_is_legacy_wanted(). It turns out that the
order in which those functions are called during early setup is very fragile.
If cg_is_legacy_wanted() is called before we have set up the v2 hierarchy,
we incorrectly cache a true answer. The function is called just a handful
of times at most, so we don't really need to cache the response.

(cherry picked from commit d0ab0e5fa5)
2024-11-13 19:48:10 +00:00
.clusterfuzzlite ci: unpin CFLite 2022-04-26 09:13:57 +00:00
.github ci: add coverage for builds without sd-boot 2024-11-13 19:48:10 +00:00
.semaphore semaphore: do not build docs 2024-10-08 16:39:12 +01:00
catalog tpm2-setup: Don't fail if we can't access the TPM due to authorization failure 2024-06-18 20:41:01 +02:00
coccinelle introduce FOREACH_ELEMENT 2024-04-18 17:39:34 +02:00
docs docs: Align some comments in HACKING.md 2024-11-13 19:48:10 +00:00
factory man: don't suggest using pam_unix.so's use_authtok switch 2024-01-17 23:59:05 +00:00
hwdb.d hwdb: update to main@{2024-09-10} 2024-09-10 17:01:26 +02:00
LICENSES LICENSES/README: expand text to summarize state for binaries and libs 2024-07-05 20:00:04 +02:00
man man/udev: fix typo 2024-11-13 19:48:10 +00:00
mime creds-util: add a concept of "user-scoped" credentials 2024-01-30 17:07:47 +01:00
mkosi.conf.d mkosi: replace PackageManagerTrees= with SandboxTrees= 2024-11-13 19:48:10 +00:00
mkosi.extra mkosi: Fix up ownership of testuser home directory on first boot 2024-11-13 19:48:10 +00:00
mkosi.images mkosi: update debian commit reference 2024-10-08 16:39:12 +01:00
mkosi.presets/20-final/mkosi.extra/root mkosi: Add back accidentally removed .gdbinit file 2024-09-10 14:56:05 +02:00
mkosi.profiles mkosi: Introduce particle profile 2024-04-30 10:46:18 +02:00
mkosi.repart mkosi: Switch back to btrfs 2024-08-15 14:04:41 +01:00
mkosi.sanitizers mkosi: Don't create sanitizer wrappers for every mkfs binary 2024-09-10 14:56:05 +02:00
modprobe.d modprobe: set 'ifb numifbs=0' to avoid autocreating ifb0 2024-01-12 23:24:54 +00:00
network network: request non-NULL SSID when a wlan interface is configured as station 2024-08-15 14:04:40 +01:00
po l10n: fix credits for the French translation 2024-07-22 11:05:08 +01:00
presets presets: Don't enable systemd-homed-firstboot.service by default 2024-06-08 11:29:55 +01:00
rules.d udev: consider serial ports as unconfigured only if both port and iomem_base sysattr is zero 2024-11-13 19:48:10 +00:00
shell-completion zsh/_networkctl: remove duplicated argument for completion (#31926) 2024-07-22 14:27:30 +02:00
src pid1: stop refusing to boot with cgroup v1 2024-11-13 19:48:10 +00:00
sysctl.d sysctl.d: Fix pid_max comment 2023-10-31 13:07:49 +01:00
sysusers.d sysusers: simplify meson config 2024-05-14 20:46:24 +02:00
test test: delete /swapfile after swapoff 2024-11-13 19:48:10 +00:00
tmpfiles.d meson: don't put a symlink pointing to '20-systemd-userdb.conf' in /etc in all cases 2024-05-27 17:20:55 +02:00
tools doc-sync: strip point release from version before uploading 2024-10-08 16:47:25 +01:00
units logind: allow read/write to char-hvc devices 2024-11-13 19:48:10 +00:00
xorg xorg/50-systemd-user: add a full license header 2021-10-01 14:45:00 +02:00
.clang-format Improve the formatting by adding AlignArrayOfStructures and setting it to Right(right justify) 2024-03-06 15:24:23 +01:00
.ctags editors: Prevent ctags from following symlinks 2019-02-15 11:01:20 -08:00
.dir-locals.el scripts: use 4 space indentation 2019-04-12 08:30:31 +02:00
.editorconfig editorconfig: add NEWS whitespace configuration 2023-10-26 22:41:03 +01:00
.gitattributes Mark all base64 files as generated 2023-08-16 12:49:45 +02:00
.gitignore gitignore: Ignore /pkg/ instead of pkg/ (#33119) 2024-05-31 14:06:07 +08:00
.gitmodules mkosi: Replace submodules with our own thing 2024-05-30 19:31:32 +02:00
.mailmap mailmap: "reduce contributor count by 13" 2023-08-16 12:49:42 +02:00
.packit.yml Revert "packit: temporarily build systemd without BPF stuff" 2024-02-11 16:45:03 +01:00
.pylintrc Add .pylintrc to globally suppress warnings we don't really care about 2023-08-10 18:13:29 +02:00
.vimrc vimrc: explicitly set shiftwidth for the C file type 2023-09-18 13:11:45 +02:00
.ycm_extra_conf.py ycm: add doc string for all the functions in configuration file 2017-11-29 13:21:49 -07:00
LICENSE.GPL2 relicense to LGPLv2.1 (with exceptions) 2012-04-12 00:24:39 +02:00
LICENSE.LGPL2.1 licence: remove references to old FSF address 2012-12-17 11:41:31 +01:00
meson_options.txt meson: add option to build systemd-executor "statically" 2024-07-08 19:26:15 +02:00
meson.build meson: add loongarch64's definition to cpu_arch_defines 2024-11-13 19:48:10 +00:00
meson.version meson: bump version to 256.7 2024-10-08 16:42:30 +01:00
mkosi.clangd mkosi: Add back support for running clangd within mkosi 2024-10-08 16:39:12 +01:00
mkosi.clean mkosi: Add missing SPDX line 2024-10-08 16:39:12 +01:00
mkosi.conf mkosi: Stop installing bpftrace 2024-10-08 16:39:12 +01:00
mkosi.coredump-journal-storage.conf mkosi: Adapt configuration to take into account configuration rework 2024-07-09 15:18:51 +02:00
mkosi.functions mkosi: Use squashfs for sysext if mkfs.erofs is not available 2024-07-16 15:14:13 +02:00
mkosi.leak-sanitizer-suppressions mkosi: Adapt configuration to take into account configuration rework 2024-07-09 15:18:51 +02:00
mkosi.postinst.chroot ci: Don't add testuser to wheel and systemd-journal groups 2024-09-25 21:27:25 +02:00
NEWS NEWS: fix typo 2024-06-18 20:41:01 +02:00
README README: update requirements for signed dm-verity 2024-07-05 20:00:04 +02:00
README.md README.md: link bug bounty program 2024-04-11 12:58:53 +02:00
TODO man: slightly enhance docs about "exitrd" and remove TODO entry for it 2024-10-08 16:39:12 +01:00

Systemd

System and Service Manager

Semaphore CI 2.0 Build Status
Coverity Scan Status
OSS-Fuzz Status
CIFuzz
CII Best Practices
CentOS CI - CentOS 9
CentOS CI - Arch
CentOS CI - Arch (sanitizers)
Fossies codespell report
Weblate
Coverage Status
Packaging status
OpenSSF Scorecard

Details

Most documentation is available on systemd's web site.

Assorted, older, general information about systemd can be found in the systemd Wiki.

Information about build requirements is provided in the README file.

Consult our NEWS file for information about what's new in the most recent systemd versions.

Please see the Code Map for information about this repository's layout and content.

Please see the Hacking guide for information on how to hack on systemd and test your modifications.

Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.

When preparing patches for systemd, please follow our Coding Style Guidelines.

If you are looking for support, please contact our mailing list, join our IRC channel #systemd on libera.chat or Matrix channel

Stable branches with backported patches are available in the stable repo.

We have a security bug bounty program sponsored by the Sovereign Tech Fund hosted on YesWeHack