1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 02:21:44 +03:00
The systemd System and Service Manager
Go to file
Zbigniew Jędrzejewski-Szmek 36d55958cc rpm: restart user services at the end of the transaction
This closes an important gap: so far we would reexecute the system manager and
restart system services that were configured to do so, but we wouldn't do the
same for user managers or user services.

The scheme used for user managers is very similar to the system one, except
that there can be multiple user managers running, so we query the system
manager to get a list of them, and then tell each one to do the equivalent
operations: daemon-reload, disable --now, set-property Markers=+needs-restart,
reload-or-restart --marked.

The total time that can be spend on this is bounded: we execute the commands in
parallel over user managers and units, and additionally set SYSTEMD_BUS_TIMEOUT
to a lower value (15 s by default). User managers should not have too many
units running, and they should be able to do all those operations very
quickly (<< 1s). The final restart operation may take longer, but it's done
asynchronously, so we only wait for the queuing to happen.

The advantage of doing this synchronously is that we can wait for each step to
happen, and for example daemon-reloads can finish before we execute the service
restarts, etc. We can also order various steps wrt. to the phases in the rpm
transaction.

When this was initially proposed, we discussed a more relaxed scheme with bus
property notifications. Such an approach would be more complex because a bunch
of infrastructure would have to be added to system manager to propagate
appropriate notifications to the user managers, and then the user managers
would have to wait for them. Instead, now there is no new code in the managers,
all new functionality is contained in src/rpm/. The ability to call 'systemctl
--user user@' makes this approach very easy. Also, it would be very hard to
order the user manager steps and the rpm transaction steps.

Note: 'systemctl --user disable' is only called for a user managers that are
running. I don't see a nice way around this, and it shouldn't matter too much:
we'll just leave a dangling symlink in the case where the user enabled the
service manually.

A follow-up for https://bugzilla.redhat.com/show_bug.cgi?id=1792468 and
fa97d2fcf6.
2021-07-24 11:53:31 +02:00
.github Revert "ci: work around #19442 to make CI happy again" 2021-06-18 14:51:33 +01:00
.lgtm/cpp-queries lgtm: complain about accept() [people should use accept4() instead, due to O_CLOEXEC] 2019-04-10 20:03:38 +02:00
.mkosi mkosi: stop pulling in vi 2021-05-19 10:55:03 +02:00
.semaphore ci: drop py2 lxml, pull in jinja2 2021-05-19 10:25:26 +09:00
catalog meson: revert the change to unquote commands in add_install_script 2021-05-14 19:52:25 +02:00
coccinelle coccinelle: filter out a couple of 'false-positive' transformations 2021-03-18 11:59:53 +01:00
docs gpt: support LoongArch 64-bit 2021-07-20 17:32:59 +08:00
factory/etc pam: fix typo try_authtok → use_authtok 2021-05-12 12:14:17 +02:00
hwdb.d hwdb: 60-keyboard::remove hardcoded definition for KEYBOARD_KEY_56 for MSI Prestige And Modern 2021-07-20 09:42:04 +01:00
man gpt: support LoongArch 64-bit 2021-07-20 17:32:59 +08:00
mkosi.default.d mkosi: Enable InstallDirectory and SourceFileTransferFinal options 2021-01-06 23:28:34 +00:00
modprobe.d meson: install the right README file in modprobe.d 2021-07-07 14:52:05 +02:00
network meson: revert the change to unquote commands in add_install_script 2021-05-14 19:52:25 +02:00
po po: Translated using Weblate (Russian) 2021-07-02 12:10:12 +02:00
presets license: LGPL-2.1+ -> LGPL-2.1-or-later 2020-11-09 13:23:58 +09:00
rules.d udev: Fix by-uuid symlink for ubifs volumes 2021-07-02 14:26:18 +01:00
shell-completion shell-completion/zsh/_systemd-run: Fix completion of command names and arguments 2021-07-17 22:55:40 +01:00
src rpm: restart user services at the end of the transaction 2021-07-24 11:53:31 +02:00
sysctl.d meson: use jinja2 in sysctl.d/ 2021-05-19 10:24:43 +09:00
sysusers.d meson: allow "soft-static" allocations for uids and gids in the initrd 2021-06-17 09:48:28 +02:00
test Merge pull request #20225 from mrc0mmand/selinux-nspawn-sanity 2021-07-15 22:21:11 +01:00
tmpfiles.d meson: add workaround for old meson 2021-05-19 10:25:26 +09:00
tools git-contrib: copypaste-friendly output 2021-07-19 15:39:26 +09:00
units homed: allow systemd-homed access to FIDO2 devices 2021-07-12 23:35:32 +01:00
xorg scripts: use 4 space indentation 2019-04-12 08:30:31 +02:00
.clang-format clang-format: set SpaceBeforeParens to ControlStatementsExceptForEachMacros 2020-11-16 16:57:51 +09: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 man configuration 2020-05-26 15:37:05 +02:00
.gitattributes udev: Extract RAM properties from DMI information 2020-12-16 18:32:29 +01:00
.gitignore Move shared mkosi settings to a single file in mkosi.default.d/ 2021-01-06 12:10:58 +00:00
.lgtm.yml ci: drop py2 lxml, pull in jinja2 2021-05-19 10:25:26 +09:00
.mailmap mailmap: two more names 2021-03-30 13:17:58 +02:00
.packit.yml ci: add ppc64le Rawhide chroot to the Packit chroot set 2021-07-19 12:16:36 +01:00
.vimrc scripts: use 4 space indentation 2019-04-12 08:30:31 +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
configure tree-wide: add spdx header on all scripts and helpers 2021-01-28 09:55:35 +01: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
Makefile tree-wide: add spdx header on all scripts and helpers 2021-01-28 09:55:35 +01:00
meson_options.txt rpm: restart user services at the end of the transaction 2021-07-24 11:53:31 +02:00
meson.build rpm: restart user services at the end of the transaction 2021-07-24 11:53:31 +02:00
mkosi.build mkosi: initialize /usr/lib/os-release' IMAGE_ID + IMAGE_VERSION fields from build 2021-07-03 11:07:00 +01:00
NEWS NEWS: finalize for v249 2021-07-07 18:41:29 +01:00
README rpm: use a helper script to actually invoke systemctl commands 2021-07-24 11:46:23 +02:00
README.md docs: add ARCHITECTURE.md with code map 2021-06-03 22:14:19 +02:00
TODO TODO: note cgroup.kill and memfd_secret 2021-07-12 22:47:59 +01:00

Systemd

System and Service Manager

Count of open issues over time Count of open pull requests over time Semaphore CI 2.0 Build Status
Coverity Scan Status
OSS-Fuzz Status
CIFuzz
CII Best Practices
Language Grade: C/C++
CentOS CI - CentOS 7
CentOS CI - Arch
CentOS CI - Arch (sanitizers)
Fossies codespell report
Packaging status

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 or join our IRC channel.

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