| Commit message (Collapse) | Author | Files | Lines |
|
This changes the executor to systematically send handoff timestamps to
the service manager if a socket for that is supplied. This drops the
code that did this via Type=exec messages, and reverts that part to the
old behaviour before 93cb78aee2cff8109a5a70128287732f03d7a062.
Benefits of this approach:
1. We can collect the handoff for any command we fork off, regardless
if it's ExecStart= something else, regardless whether it's Type=exec,
Type=simple or some any other service type, regardless of the unit
type.
2. We collect both CLOCK_REALTIME and CLOCK_MONOTONIC, as we do for the
other process timestamps.
3. It's entirely backwards compatible, as this doesn't change the
protocol between service manager and executor, but just extends it.
|
|
This adds an AF_UNIX socket pair to the manager that we can collect
handoff timestamp messages on.
The idea is that forked off children send a datagram with a timestamp
and we use its sender PID to match it against the right forked off
process.
This part only implements the receiving side: a socket is created, and
listened on. Received datagrams are parsed, verified and then dispatched
to the interested units.
|
|
assert_se() should not be used here, these checks are paranoia only and
have no side-effect after all.
hence fix this to use assert(), or in fact ASSERT_PTR()
|
|
Fixes a regression introduced by 8157cc0e3e33c97b406cc088cf001ca524154f64.
|
|
The current output of 'systemctl list-jobs' with the --after and/or --before
switches seems backwards. With artificial units
# check-oil.service
[Unit]
Description=Check the oil level
Before=engine-ready.target
# fill-gas.service
[Unit]
Description=Fill the tank with gasoline
Before=engine-ready.target
# engine-ready.target
[Unit]
Description=The engine is ready
[Unit]
Description=Start the engine!
After=engine-ready.target
Wants=engine-ready.target
running 'systemctl list-jobs --before --after' produces
JOB UNIT TYPE STATE
93 check-oil.service start running
└─ waiting for job 94 (engine-ready.target/start) - -
102 fill-gas.service start running
└─ waiting for job 94 (engine-ready.target/start) - -
94 engine-ready.target start waiting
└─ waiting for job 111 (start-engine.service/start) - -
└─ blocking job 93 (check-oil.service/start) - -
└─ blocking job 102 (fill-gas.service/start) - -
111 start-engine.service start waiting
└─ waiting for job 1 (multi-user.target/start) - -
└─ blocking job 94 (engine-ready.target/start) - -
Obviously, job 93 is not waiting for job 94, but rather blocking it.
|
|
socket and service units output there ExecCommand/ExecStatus definitions
already, but this was missing in mount/swap. Fix that.
|
|
virtiofs cannot be used as the upper fs for overlayfs, so skip all
the sysext mutable tests that would try to use virtiofs as the
upper fs.
|
|
|
|
|
|
|
|
|
|
We have pretty much the same code here, let's reuse the common
implementation.
|
|
This is both easier to read and allows us to reuse the helper later.
|
|
It is not needed, it publishes things like dotnet, and it is often
broken, so just remove the sources
|
|
|
|
The prototype was static, but the implementation was not. Make both
static, this is otherwise too confusing. (This doesn't actually change
anything, since the prototype decides about this anyway, but it makes
things easier to read.)
|
|
While stracing PID1's forking off of children I noticed that every
single forked off child reads cap_last_cap from procfs. That value is a
kernel constant, hence we can save a lot of work if we'd cache it.
Thing is, we actually do cache it, in a thread_local cache field. This
means that the forked off processes (which are considered new threads)
will have to re-query it, even though we already know the result.
Hence, let's get rid of the thread_local stuff (given that the value is
going to be the same for all threads anyway, and we pretty much have a
single thread only anyway). Use an C11 atomic_int instead, which ensures
the value is either initialized or not initialized, but we don't need to
be concerned of partial initialization.
This makes the cap_last_cap reading go away in the children, as strace
shows (since cap_last_cap() is already called by PID 1 before
fork()ing, anyway).
|
|
Follow-up for 8518f4a814426e7a92342298353a4cd9508cb33b
|
|
|
|
|
|
Otherwise if the file is full of holes we get the wrong size and
we'll fail later on.
|
|
supported
|
|
As requested in review.
|
|
Follow-up for 2b28dfe6e632f47a9058d9378fb88a0c99b34a91.
I also considered moving the function to src/basic, but since it's only used by
the manager, it doesn't seem useful.
|
|
THis needs 15 entries as far as I can count, not just 14.
Follow-up for: 5686391b006ee82d8a4559067ad9818e3e631247
Sniff.
|
|
Required for messing around with xattrs in integration tests.
|
|
The nvme command is needed for TEST-84-STORAGETM.
|
|
|
|
|
|
|
|
If an assert in systemd fails it can't shut down normally.
By default it freezes. For interactive runs we want the crash shell
to enable further debugging, but during test runs we want it to exit
without having to wait for the test timeout.
By deactivating the crash shell, enabling reboot, and configuring qemu
so that it shuts down instead of rebooting we can shut down instead.
Because by default UEFI will enroll keys and then reboot
we also have to set --qemu-firmware-variables=custom
so it doesn't need to auto-enroll.
Because mkosi has to handle not receiving an EXIT_STATUS notification
it falls back to the exit code of qemu, which in the case of reboot
would be 0, we also override the success exit status to 123
and check that we got that as an exit code from mkosi.
|
|
|
|
|
|
Follow-up for 93cb78aee2cff8109a5a70128287732f03d7a062
|
|
Currently translated at 100.0% (233 of 233 strings)
Co-authored-by: Temuri Doghonadze <temuri.doghonadze@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ka/
Translation: systemd/main
|
|
Currently translated at 100.0% (233 of 233 strings)
Co-authored-by: Yuri Chornoivan <yurchor@ukr.net>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/uk/
Translation: systemd/main
|
|
Currently translated at 100.0% (233 of 233 strings)
Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/tr/
Translation: systemd/main
|
|
Currently translated at 100.0% (233 of 233 strings)
Co-authored-by: Luna Jernberg <bittin@reimu.nl>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sv/
Translation: systemd/main
|
|
|
|
|
|
|
|
with others
I cannot find any RFC that states we should not send multiple route
prefix or pref64 options that have intersection with others.
Moreover, each route prefix option has preference field, thus, user may
want to send e.g. a prefix with the normal preference, and another sub
prefix with the high preference. Previously, such configuration was
prohibited. Let's allow that now.
|
|
As the caller may want to update multiple prefixes and friends.
Let's not automatically announce on update in library side.
Currently, only prefix is updated during running. Hence, this does not
change any effective behavior.
|
|
|
|
|
|
Wwe can't boot on systems without cgroup anyway
(even cgroup v1 will be gone pretty soon).
|
|
|
|
This complements the existing C example.
|
|
Actually, return the result of `unmerge()` if it is called in the `refresh()`
function.
Fixes 8662fcbcf1f31725998bd1ebe706ac813b053962
|
|
|