1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-25 01:34:28 +03:00
Commit Graph

5373 Commits

Author SHA1 Message Date
Yu Watanabe
4e83ac4029 Revert "TEST-55-OOMD: workaround for kernel regression in 6.12-rcX"
This reverts commit 88bbf187a9.

The kernel regression has been hopefully fixed by
c650812419
which is included in 6.12-rc4.
Let's drop the workaround.
2024-10-24 09:10:15 +02:00
Yu Watanabe
0cc496b2d2 core/namespace: honor MountEntry.read_only, .options, and so on in static entries
Otherwise, ProtectHome=tmpfs makes /home/ and friends not read-only.
Also, mount options for /run/ specified in MountAPIVFS=yes are not
applied.

The function append_static_mounts() was introduced in
5327c910d2, but at that time, there were
neither .read_only nor .options in the struct. But, when later the
struct is extended, the function was not updated and they were not
copied from the static table.
The fields has been used in static tables since
e4da7d8c79, and also in
94293d65cd.

Fixes #34825.
2024-10-24 02:59:46 +09:00
Yu Watanabe
82d8a2c810 TEST-55-OOMD: fix typo
Follow-up for 63d4c4271c.
2024-10-23 17:25:37 +09:00
Lennart Poettering
bd91f23acf logind: add CanIdle + CanLock dbus properties to session object
Clients should be able to know if the idle logic is available on a
session without secondary knowledge about the session class. Let's hence
expose a property for that.

Similar for the screen lock concept.

Fixes: #34844
2024-10-22 18:44:05 +02:00
Ronan Pigott
afdb38a39f resolved: validate noerror response for CNAMEs
CNAME doesn't exist at the zone apex. When we get an unsigned noerror
response to a direct query for a CNAME record, we don't yet know if this
name is zone apex. We already request the correct DS record in this
case, but previously skipped it at validation time, causing the answer
to appear bogus. Make sure to also consider the DS record for the query
name for negative replies.
2024-10-22 17:59:05 +02:00
Lennart Poettering
35f51be4f8
Merge pull request #34761 from ikruglov/ikruglov/io-systemd-Machine-GetAddresses
machine: add Addresses, OSRelease, and UIDShift fields in varlink io.systemd.Machine.List output
2024-10-22 09:06:56 +02:00
Lennart Poettering
2d74427a7c
Merge pull request #30952 from rpigott/resolved-dnr
RFC9463: Discovery of Network-designated Resolvers
2024-10-22 09:05:36 +02:00
Luca Boccassi
aa077884c1 test: CET/EET are deprecated, use Europe/Berlin and Kyiv
The links moved to the legacy dataset so they won't be available by
default, so stop using them and just use the city ones instead
2024-10-21 21:37:33 +02:00
Daan De Meyer
e8fb0643c1
Merge pull request #34628 from DaanDeMeyer/measure
Rework TEST-86-MULTI-PROFILE-UKI + associated bugfixes
2024-10-21 18:55:33 +02:00
Ronan Pigott
8ef7b6e656 test/fuzz: add dnr packets
The structure of DNR options is considerably more complicated than most
DHCP options, and as a result the fuzzer has poor coverage of these code
paths.

This adds some DNR packets to the fuzzing corpus, not with the intent of
capturing some specific edge case, but with the intent to rapidly
improve the fuzzers' coverage of these codepaths by giving it a valid
example to begin with.

Also include an ndisc router advert with a few Encrypted DNS options,
for the same purpose.
2024-10-21 09:10:20 -07:00
Ronan Pigott
cb386795c2 test-network: add DHCPv6 DNR test
Same as the DHCPv4 test.
2024-10-21 09:10:19 -07:00
Ronan Pigott
7957154e06 test-network: add test for DHCPv4 DNR
This will test that networkd/resolved can understand the V4_DNR DHCP
option.
2024-10-21 09:10:19 -07:00
Ivan Kruglov
3cb72c7862 machine: add tests for Addresses/OSRelease/UIDShift fields in io.systemd.Machine.List output 2024-10-21 17:42:37 +02:00
Ivan Kruglov
9de215219c machine: use AcquireMetadata in io.systemd.MachineImage.List method 2024-10-21 17:42:37 +02:00
Daan De Meyer
977fc93603 Rework TEST-86-MULTI-PROFILE-UKI
Now that mkosi supports generating UKI profiles, let's make use of
that to generate the UKI profiles required for the test instead of
doing it within the test itself.
2024-10-21 17:24:14 +02:00
Daan De Meyer
922fe8b91d TEST-70-TPM2: Disable public key enrollment explicitly
Otherwise, when the test is executed on a system with signed PCRs,
cryptenroll will automatically pick up the public key from the UKI
which results in a volume that can't be unlocked because the pcrextend
tests appends extra things to pcr 11.
2024-10-21 17:24:14 +02:00
Lennart Poettering
13be6e70af
Merge pull request #34787 from yuwata/core-ip-address-allow-deny
core/cgroup: fix IPAddressAllow=/IPAddressDeny= set through DBus
2024-10-21 16:35:49 +02:00
Lennart Poettering
6eabea49da
Merge pull request #33398 from AdrianVovk/sysupdate-optional
sysupdate: Add support for optional features
2024-10-21 12:36:43 +02:00
Lennart Poettering
069da86dbc
Merge pull request #34667 from rpigott/resolved-bypass
resolve: fixes for sd-resolved bypass
2024-10-21 12:34:24 +02:00
Ronan Pigott
b7b1c50c6a test: exercise bypass mode on the sd-resolved stub
A basic test will verify that we provide the right flags.
2024-10-18 21:21:35 -07:00
Yu Watanabe
88bbf187a9 TEST-55-OOMD: workaround for kernel regression in 6.12-rcX
This ignore failures when running on kernel-6.12-rcX, which has a
regression in the kernel scheduler that breaks PSI.

From https://github.com/systemd/systemd/issues/32730#issuecomment-2415312260
> There is a known scheduler bug in 6.12 that breaks psi. It leaks
> "running tasks" counts, which matches your symptoms of seeing partial
> pressure only.
>
> Do you see "inconsistent task state" warnings in dmesg | grep psi?
>
> A fix is queued in the scheduler tree, should be sent to Linus shortly:
> https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=c6508124193d42bbc3224571eb75bfa4c1821fbb

Workaround for #32730.
2024-10-19 12:34:48 +09:00
Adrian Vovk
0cd1a58921
sysupdate: Add verb to inspect features 2024-10-18 17:58:47 -04:00
Adrian Vovk
2ffc8b23f0
sysupdate: Add tests for optional features
Makes sure we don't regress on #33343 and #33344
2024-10-18 17:58:46 -04:00
Luca Boccassi
2f6fe4e113 test: customize /etc/os-release instead of /usr/lib/os-release
As per spec image builders can create a local /etc/os-release
with per-image IDs, so modify that one instead of the original
one in /usr/lib. For example we do this when we build debian
unstable images in mkosi.
2024-10-18 17:03:16 +01:00
Yu Watanabe
5df9ebad70
Merge pull request #34597 from ryantimwilson/oomd-pressure-duration
Add ManagedOOMMemoryPressureDurationSec override setting for units
2024-10-17 14:30:13 +09:00
Ryan Wilson
63d4c4271c cgroup: Add ManagedOOMMemoryPressureDurationSec= override setting for units
This will allow units (scopes/slices/services) to override the default
systemd-oomd setting DefaultMemoryPressureDurationSec=.

The semantics of ManagedOOMMemoryPressureDurationSec= are:
- If >= 1 second, overrides DefaultMemoryPressureDurationSec= from oomd.conf
- If is empty, uses DefaultMemoryPressureDurationSec= from oomd.conf
- Ignored if ManagedOOMMemoryPressure= is not "kill"
- Disallowed if < 1 second

Note the corresponding dbus property is DefaultMemoryPressureDurationUSec
which is in microseconds. This is consistent with other time-based
dbus properties.
2024-10-16 20:12:38 -07:00
Yu Watanabe
73970cdcd1 TEST-60-MOUNT-RATELIMIT: disable journal ratelimiting
Otherwise, journal check in testcase_mount_ratelimit() may fail and we
need to wait 2 minutes.
2024-10-17 01:53:45 +09:00
Yu Watanabe
805d0eed0b TEST-60-MOUNT-RATEMINIT: split into small test cases
Then, use run_testcases().
2024-10-17 01:53:45 +09:00
Yu Watanabe
c5928a7684 TEST-60-MOUNT-RATELIMIT: wait for mount unit being started or stopped 2024-10-17 01:53:45 +09:00
Daan De Meyer
ddbddebe0c sysext: Deal with nested mounts properly
Nested mounts should be carried over from host to overlayfs to overlayfs
(and back to host if unmerged). Otherwise you run into hard to debug
issues where merging extensions means you can't unmount those nested mounts
anymore as they are hidden by the overlayfs mount.

To fix this, before unmerging any previous extensions, let's move the nested
mounts from the hierarchy to the workspace, then set up the new hierachy, and
finally, just before moving the hierarchy into place, move the nested mounts
back into place.

Because there might be multiple nested mounts that consists of one or more
mounts stacked on top of each other, we make sure to move all stacked mounts
properly to the overlayfs. The kernel doesn't really provide a nice way to do
this, so we create a stack, pop off each mount onto the stack and then pop from
the stack again to the destination to re-establish the stacked mounts in the same
order in the destination.
2024-10-16 14:18:24 +01:00
Yu Watanabe
c256fb06d7
Merge pull request #34756 from yuwata/test-oomd-cleanups
TEST-55-OOMD: several cleanups
2024-10-16 18:39:33 +09:00
Frantisek Sumsal
8bea6780f2
Merge pull request #34742 from yuwata/test-storage
test: fix multipath test in TEST-64-STORAGE
2024-10-16 10:21:22 +02:00
Yu Watanabe
a6092b532e TEST-55-OOMD: check slice property before stressing slice 2024-10-16 15:20:15 +09:00
Yu Watanabe
98a0bb8a64 TEST-55-OOMD: stop test units when unnecessary
Then, sleep becomes not necessary anymore. This greatly improve performance.
2024-10-16 15:18:41 +09:00
Yu Watanabe
665882f8f3 TEST-55-OOMD: check slice more in detail
system and user slice has same name, hence we need to check full path.
2024-10-16 15:17:31 +09:00
Yu Watanabe
6bba058076 TEST-55-OOMD: split into small testcases
Then, we can run each small test cases separately.
2024-10-16 15:17:11 +09:00
Yu Watanabe
23fb9b63cd TEST-55-OOMD: check global config earlier
'Default Memory Pressure Duration' field in oomctl, which can be configured
with DefaultMemoryPressureDurationSec= in oomd.conf, is a global config.
Let's check it earlier.

This also drops unnecessary cleanup at the beginning.
2024-10-16 15:16:16 +09:00
Yu Watanabe
1473836a1e TEST-55-OOMD: set ManagedOOMMemoryPressure= and friends in a drop-in config
Fedora and friends has a drop-in config for the settings in
/usr/lib/systemd/user/slice.d/ . Hence, settings in the main .slice may be
overridden. Let's set below in a drop-in with higher decimal prefix.

Also, rename override.conf -> 99-managed-oom-preference.conf for the same reason.
2024-10-16 14:49:56 +09:00
Yu Watanabe
5f3cfb9d5e TEST-19-CGROUP: add test cases for IPAddressAllow=/IPAddressDeny= 2024-10-16 14:32:13 +09:00
Yu Watanabe
548360817e
Merge pull request #34482 from bgurney-rh/alt-nvme-multins-symlink-fix
Pin obsolete NVMe symlinks to namespace 1
2024-10-16 10:05:46 +09:00
Luca Boccassi
e1efa9d804 core: do not fail if ignorable img.v/ vpick dir is missing
Do not fail if the directory is missing entirely, other than just empty

Follow-up for 00f546e25e
Follow-up for 5e79dd96a8
Follow-up for 622efc544d
2024-10-15 18:17:25 +02:00
Bryan Gurney
21ba71f89b TEST-64-UDEV-STORAGE: test for absence of obsolete NVMe symlink
Signed-off-by: Bryan Gurney <bgurney@redhat.com>
2024-10-15 10:22:07 -04:00
Lennart Poettering
34599ddfc6
Merge pull request #34747 from yuwata/busctl-json-fd
busctl: dump passed fd info
2024-10-15 14:38:18 +02:00
Yu Watanabe
7a3ee9217e machine: add MachineImage interface
Follow-up for fb0ea6a6a3.
Fixes #34772.
2024-10-15 20:44:13 +09:00
Yu Watanabe
ba0d3d490f busctl: show information of passed file descriptor 2024-10-15 19:09:38 +09:00
John A. Leuenhagen
4ca75488d9 TEST-74-AUX-UTILS: add tests for 'run0 -D' 2024-10-15 18:59:44 +09:00
Lennart Poettering
6f9826b6d8
Merge pull request #34723 from poettering/machined-pidref-more
machined: switch remaining Varlink overs over to use json_dispatch_pidref() and friends
2024-10-15 11:37:39 +02:00
Yu Watanabe
1f021ce3d1 TEST-13-NSPAWN: several cleanups
- suppress unnecessary error messages, especially in loop and at_exit(),
- ensure the container service is stopped before restarting,
- do not send KILL signal, as garbages will remain, and disturb the next
  invocation,
- drop unnecessary workaround of trying machine twice.
2024-10-15 16:16:25 +09:00
Yu Watanabe
d2c1451b73 machine: lookup_machine_by_name_or_pid() may return 1 on error and it is already replied
Follow-ups for 1bd979dddb and later
commits.

Fixes #34764.
2024-10-15 14:24:58 +09:00
Yu Watanabe
afc5a14fca
Merge pull request #34752 from yuwata/udev-remove-database-on-remove
udev: remove database file on remove event
2024-10-15 13:06:00 +09:00