1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 01:55:22 +03:00
Commit Graph

75496 Commits

Author SHA1 Message Date
Mike Yuan
1391f149f0 core/service: actually allow to "hurry up" auto restarts
unit_start() advertises that start requests don't get suppressed,
so that it could be used to manually speed up auto restarts.
However, service_start() so far rejected this, stating that
clients should issue restart request in order to trigger
BindsTo=/OnFailure=.

That seems to be a red herring though, because for a long time
the service states between auto-restarts were buggy (#27594).
With the introduction of RestartMode=direct, the behavior
is sane again and customizable, hence I see no reason to refuse
this anymore. Whether those deps are triggered solely depends
on RestartMode= now.

Plus, filter out some intermediate states that should never
be seen in service_start().

Fixes #33890
2024-08-03 13:03:28 +02:00
Daan De Meyer
21e9fcf97f
Merge pull request #33916 from yuwata/import-creds-follow-ups
core: several follow-ups for ImportCreds=
2024-08-03 10:04:55 +02:00
Yu Watanabe
74d1ee0373 core: refuse credentials with invalid names matching with glob
Even if the glob pattern is valid, the pattern may match credentials
with invalid names. So, we need to check the names of the found
credentials.

Follow-up for 947c4d3952.
2024-08-03 14:25:35 +09:00
Yu Watanabe
b376dbc83d test: a credential can be imported multiple times with different names
This is supported since 831f208783.
Let's explicitly test the functionality.
2024-08-03 14:23:17 +09:00
Yu Watanabe
40dd2a1c24 core: make ImportCredentialEx= DBus property support without renaming
Note that the conf parser for ImportCredential= checks in the same way.

Follow-up for 831f208783.
2024-08-03 14:20:07 +09:00
Yu Watanabe
e0fc14a456 creds-util: fix typo
Follow-up for 947c4d3952.
2024-08-03 13:34:02 +09:00
Yu Watanabe
564547d295
Merge pull request #33911 from YHNdnzj/cgroup-setup-cleanup
cgroup-setup/util: several cleanups; make use of cgroup.kill on client request
2024-08-03 06:20:02 +09:00
Yu Watanabe
1c0130e8dc man/net-naming-scheme: mention that NAMING_BRIDGE_MULTIFUNCTION_SLOT is reverted
Follow-up for af7417ac7b.
Closes #33596.
2024-08-03 05:58:15 +09:00
Yu Watanabe
347c8822d1 man: extend explanation for ConfigureWithoutCarrier= in systemd.network(5)
Prompted by #33702.
2024-08-03 05:57:55 +09:00
Yu Watanabe
6b8e373ce8 vmspawn: fix typo
Follow-up for 862c68a914.
2024-08-03 05:56:11 +09:00
Yu Watanabe
bb35a47de2 ukify: fix typo
Follow-up for 987f4bce93.
2024-08-03 05:55:05 +09:00
Yu Watanabe
2d6df0db7d udevadm: fix typo
Follow-up for 0e789e6d48.
2024-08-03 05:54:11 +09:00
Yu Watanabe
7033574293 import: fix typo
Follow-up for 17a6043a14.
2024-08-03 05:53:08 +09:00
Yu Watanabe
fea380f3b4 login: fix typo
Follow-up for 0e10c3d872.
2024-08-03 05:51:58 +09:00
Yu Watanabe
af7b3851ea core/execute: fix typo
Follow-up for 628c214656.
2024-08-03 05:50:50 +09:00
Yu Watanabe
eb8072ee48 boot: fix typo
Follow-up for dcac1e4a9b.
2024-08-03 05:49:53 +09:00
Yu Watanabe
ec4964692a cgroup-util: fix typo
Follow-up for 0fbb569de1.
2024-08-03 05:48:54 +09:00
Yu Watanabe
f38aac5e01 mkosi: fix typo
Follow-up for 7205fc7dc3.
2024-08-03 05:47:55 +09:00
Yu Watanabe
b8db3cc373 man: fix typo
Follow-up for 7102dc52e6 and 3d689b675b.
2024-08-03 05:46:51 +09:00
Yu Watanabe
2bb72aadb8 man/net-naming-scheme: add missing period
Follow-up for 0a4ecc54cb.
2024-08-03 05:36:12 +09:00
Yu Watanabe
c7d9925396
Merge pull request #33913 from berrange/cvm-s390x
Add detection of confidential virtualization on s390x architcture
2024-08-03 05:32:39 +09:00
Mike Yuan
3a497fbff5 advanced-issue-labeler: use correct label for env-generator 2024-08-02 21:45:18 +02:00
Daniel P. Berrangé
a8fb5d21fd man/systemd-detect-virt: list known CVM technologies
Add a section which lists the known confidential virtual machine
technologies.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-08-02 16:55:03 +01:00
Daniel P. Berrangé
9ffdfc67c6 man/systemd-detect-virt: fix row spanning for VM header
This fixes

  commit 9b0688f491
  Author: Yu Watanabe <watanabe.yu+github@gmail.com>
  Date:   Tue Jan 9 10:52:49 2024 +0900

    virt: add Google Compute Engine support

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-08-02 16:55:03 +01:00
Daniel P. Berrangé
6c35e0a51c confidential-virt: add detection for s390x target
The s390x platform provides confidential VMs using the "Secure Execution"
technology, which is also referred to as "Protected Virtualization" or
just "prot virt" in Linux / QEMU.

This can be detected through a simple sysfs attribute.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-08-02 16:53:20 +01:00
jauge-technica
82f2a2f032
Added support for L2 BridgeMDB entries (#32894)
* Added support for L2 BridgeMDB entries
2024-08-02 16:31:20 +01:00
Daniel P. Berrangé
1c4bd7adcc confidential-virt: split caching of CVM detection into separate method
We have different impls of detect_confidential_virtualization per
architecture. The detection is cached in the x86_64 impl, and as we
add support for more targets, we want to use caching for all. It thus
makes sense to split caching out into an architecture independent
method.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2024-08-02 16:26:00 +01:00
Frantisek Sumsal
4d1fbe53c1 test: don't use /skipped for subtests
Since, at least the old framework, checks for the presence of the file
at the end and marks the whole test as skipped if it exists.

Resolves: systemd/systemd-centos-ci#728
2024-08-02 16:44:25 +02:00
Mike Yuan
ba16a93db4
core/unit: utilize cgroup.kill on client request + SIGKILL 2024-08-02 16:36:09 +02:00
Mike Yuan
2176841b9e
cgroup-util: clean up cg_kill() and friends, completely split out cg_kill_kernel_sigkill()
cg_kill_kernel_sigkill() has a narrow use case, and currently
no code really reaches that branch. Let's detach it from
cg_kill_recursive() hence, and call it explicitly later
where appropriate.
2024-08-02 16:36:09 +02:00
Mike Yuan
5ffa9490d6
core/unit: modernize log_kill() too 2024-08-02 16:36:09 +02:00
Mike Yuan
95e631da43
core/unit: unexport cg_kill log funcs, rather take in bool
It seems unnecessary to duplicate the func ptrs everywhere.
2024-08-02 16:36:08 +02:00
Mike Yuan
031860d6cb
cgroup-util: drop unused cg_rmdir()
When removing a cgroup, we always want to eliminate subcgroups
first, i.e. use cg_trim(). And cg_rmdir() (along with
CGROUP_REMOVE flag) is simply unused. Kill it.
2024-08-02 16:36:08 +02:00
Mike Yuan
1daf575990
cgroup-util: refactor cg_{ns,freezer,kill}_supported 2024-08-02 16:36:08 +02:00
Mike Yuan
6e6d305573
cgroup-setup: kernel threads can reside in arbitrary cgroups
Realistically this doesn't matter, as cg_migrate() is only
used to populate init.scope. But it's probably better to
make things clear.
2024-08-02 16:36:08 +02:00
Mike Yuan
e563c4213e
cgroup-setup: drop unneeded O_RDONLY when O_DIRECTORY 2024-08-02 16:36:07 +02:00
Mike Yuan
8b7191aee4
cgroup-setup: use fchownat() + AT_EMPTY_PATH where appropriate
This already existed long before our kernel baseline.
While at it, switch to RET_GATHER().
2024-08-02 16:36:07 +02:00
Mike Yuan
279c5a343f
cgroup-setup: minor cleanups 2024-08-02 16:36:07 +02:00
Mike Yuan
ea25672de5
cgroup-setup: move cg_{,un}install_release_agent from cgroup-util
They're pid1-specific, so move them out of basic/.
2024-08-02 16:36:07 +02:00
Mike Yuan
d1397fb50c
cgroup-setup: group v1-specific functions 2024-08-02 14:47:39 +02:00
Mike Yuan
3386f66200
cgroup-setup: drop unused cg_migrate_callback for cg_attach_everywhere()
While at it, move the typedef from cgroup-util to -setup.
2024-08-02 14:47:39 +02:00
Yu Watanabe
40d90c9c01 localectl: introduce -l/--full option
Closes #33906.
2024-08-02 09:33:46 +02:00
Yu Watanabe
44557e03d8
Merge pull request #33032 from yuwata/sd-device-monitor-low-level-api
sd-device-monitor: expose low-level functions
2024-08-02 12:41:53 +09:00
Yu Watanabe
76459af531
Merge pull request #33876 from dbnicholson/firstboot-root-creds-only
firstboot: fix root params with creds and prompting disabled
2024-08-02 11:37:05 +09:00
Ronan Pigott
ddd710a355 resolved: don't treat conn reset as packet loss
tcp reset / icmp port-unreachable are markedly different conditions than
packet loss. It doesn't make much sense to retry in this case. It's
actually not clear if there is any benefit at all retrying tcp
connections, which were presumably already retried as necessary by the
tcp stack.
2024-08-02 11:29:25 +09:00
Yu Watanabe
0bc6fde08a test: add test case for restarting device monitor 2024-08-02 11:22:24 +09:00
Yu Watanabe
9d37cf28a3 sd-device-monitor: rename device_monitor_send_device() -> device_monitor_send() 2024-08-02 11:22:24 +09:00
Yu Watanabe
bab889c51e sd-device-monitor: expose low-level functions
To make it work without sd-event.

Prompted by recent chat:
> Hey all!
> reading man libudev, it says to use sd-device instead now. I've read that
> APIs header file and it seems it no longer has an equivalent to libudev's
> udev_monitor_get_fd, which AFAICT means I have to use sd-event to watch
> for events I'm interested in. I know I can "embed" sd-event in other event
> loops I might already have, but that seems overkill when I'm only interested
> in this one type of event and don't need sd-event for anything else.
2024-08-02 11:22:24 +09:00
Yu Watanabe
d3fa16131e sd-device-monitor: make device_monitor_receive_device() always initialize ret on success 2024-08-02 11:22:07 +09:00
Yu Watanabe
67825de267 sd-device-monitor: remove device_monitor_disconnect()
It is not necessary to be exposed anymore.
2024-08-02 11:16:33 +09:00