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

69337 Commits

Author SHA1 Message Date
Richard Maw
0947748555 mkosi: Add testuser and tar to system image
The integration tests are installed into the image
with the intention that it should be possible to run those tests,
but those tests require the named user testuser
and tar is needed for machined-import
2023-12-13 17:55:46 +00:00
Richard Maw
eae7ce2d61 mkosi: Allow the output directory to be overridden
For integration tests it would be preferable to operate on a copy
so tests can be run in parallel and avoid interfering.
2023-12-13 17:55:46 +00:00
Richard Maw
8799346862 test: mount overlayfs over /usr in some tests
Most of the integration tests have been made to not write to /usr
but some genuinely need to do so.

Because mkosi creates images with a read-only /usr
it is not normally writeable.

By mounting an overlayfs with /usr as the lower dir
and upper and working dirs in /var tests may write to /usr.
2023-12-13 17:55:45 +00:00
Richard Maw
0129395173 test: slacken plugged -> dead test
This test is for if devices transition from plugged -> dead -> plugged
on boot, but it is normal to see loop devices transition plugged -> dead
on first boot when systemd-repart adds the root partition.
2023-12-13 13:35:04 +00:00
Richard Maw
8f764b32ea test: Create analyze chroot with --rbind
The systemd-analyze integration test also tests chroots.
It builds its chroot by bind-mounting /,
but since /usr might be a separate mountpoint
it should create the chroot with --rbind.
2023-12-13 13:35:04 +00:00
Lennart Poettering
f2ad89248b varlink: improve compat with varlink C reference implementation
The reference implementation seems to set the 'parameters' field for
method calls to 'null' if nothing is specified on its command line. We
so far only could deal if the parameters field was unset or set to the
empty object. Let's also accept the 'null' type.
2023-12-13 09:39:10 +01:00
Yu Watanabe
0977039bdc
Merge pull request #30433 from yuwata/network-nexthop-cleanups
network: introduce ManageForeignNextHops=
2023-12-13 14:16:27 +09:00
Yu Watanabe
740539835a
Merge pull request #30453 from poettering/dissect-fixes
dissect-image: various fixes
2023-12-13 14:15:05 +09:00
Frantisek Sumsal
22e31655f3 test: mask the mdmonitor.service
It's pulled in by one of the udev rules (63-md-raid-arrays.rules) and it
fails every time, because there's no valid email address in
/etc/mdadm.conf:

[    5.778153] testsuite-64.sh[403]: mdadm: array /dev/md/mdmirror started.
[    5.819137] kernel: md/raid1:md127: not clean -- starting background reconstruction
[    5.819141] kernel: md/raid1:md127: active with 2 out of 2 mirrors
[    5.819159] kernel: md127: detected capacity change from 0 to 129024
[    5.821950] kernel: md: resync of RAID array md127
...
[    5.887192] mdadm[424]: mdadm: No mail address or alert command - not monitoring.
[    5.890772] systemd[1]: Starting mdmonitor.service...
[    5.891718] systemd[1]: Started mdmonitor.service.
[    5.892570] systemd[1]: mdmonitor.service: Main process exited, code=exited, status=1/FAILURE
[    5.892618] systemd[1]: mdmonitor.service: Failed with result 'exit-code'.

And as we (re)assemble the MD devices multiple times, this gets quite
noisy, especially since we later start hitting the service start rate
limit.

Fedora has the mdmonitor.service patched, so it won't start without
/etc/mdadm.conf being present, but Arch uses the upstream unit which
doesn't have such guard.

Let's just mask the service completely, which replaces all that noise
with one warning:

[    6.553583] testsuite-64.sh[294]: + udevadm wait --settle ...
[    6.580700] systemd[1]: sys-devices-virtual-block-md127.device: Failed to enqueue SYSTEMD_WANTS job, ignoring: Unit mdmonitor.service is masked.
2023-12-13 00:59:20 +00:00
Will Springer
e014a19420 man: make minor corrections to smbios-type-11(7)
- Correct initial version of io.systemd.credential* to 252
- Fix leftover copy-pasted heading
2023-12-13 00:58:23 +00:00
Lennart Poettering
748e87a791 dissect-tool: right-align the partition number
The right-alignment was applied to the wrong column, because neither
ee8e497d24 nor
1474d7ac2d updated the column count as
they should have.
2023-12-13 00:56:48 +00:00
David Tardon
38e1035bef openssl-util: avoid freeing invalid pointer 2023-12-13 07:28:30 +08:00
Lennart Poettering
3f8229fbb0 dissect-image: move comment to right place
The image name is extracted from the image path originally passed in,
i.e. not the contents of the image. And the image UUID is directly
retrieved from the partition table, hence also not from the contents.
Let's hence move the comment to separate out the stuff extract from the
file systems (and thus only available when mounting/with privs/with
block devices) from the data available without any of that.
2023-12-12 16:20:10 +01:00
Lennart Poettering
8d5e61db43 dissect-image: fix fd leak in dissected_image_acquire_metadata()
We have to go through the "finish" label to properly close all pipes in
the error path, so that we don't leak them.
2023-12-12 16:19:50 +01:00
Lennart Poettering
a8e8bcfb7d dissect-image: don't try to validate an extension release file with no image name
Otherwise we might validate the OS release file instead…
2023-12-12 16:19:31 +01:00
Lennart Poettering
29b4db7ede dissect-image: handle 'continue' event in metadata acquisition uniformly
Let's jump to the same label in all cases, that closes the associated
pipe, systematically.
2023-12-12 16:19:21 +01:00
Lennart Poettering
3ee413e632 dissect-image: path[] is now defined for all metadata fields
There's no point in handling a case that never can happen.
2023-12-12 16:19:05 +01:00
Lennart Poettering
026a8b022e execute: improve log message about TTY ownership reset failures 2023-12-12 16:06:08 +01:00
Yu Watanabe
41231f2697 test-network: add test for ManageForeignNextHops=no 2023-12-13 00:02:36 +09:00
Yu Watanabe
e7660b9aff test-network: reduce indent for verification 2023-12-12 23:51:10 +09:00
Yu Watanabe
77633317ce test-network: drop redundant call of tearDown() 2023-12-12 23:51:10 +09:00
Yu Watanabe
bbc05bec98 network/nexthop: introduce ManageForeignNextHops= boolean setting
Closes #29034.
2023-12-12 23:51:10 +09:00
Frantisek Sumsal
28a2d27650 test: "never" is not a valid value for Restart=
[  154.140565] testsuite-07.sh[1014]: + systemctl start badbin_assert.socket
[  154.738606] testsuite-07.sh[1014]: + socat - ABSTRACT-CONNECT:badbin_assert.socket
[  154.768418] systemd[1]: Cannot find unit for notify message of PID 1021, ignoring.
[  154.812357] systemd[1]: /run/systemd/system/badbin_assert.service:3: Failed to parse service restart specifier, ignoring: never
[  155.347350] testsuite-07.sh[1014]: + timeout 10 sh -c 'while systemctl is-active badbin_assert.service; do sleep .5; done'
[  155.669695] (badbin)[1045]: badbin_assert.service: Failed to execute /tmp/badbin: Exec format error
[  155.676596] systemd[1]: badbin_assert.service: Failed with result 'exit-code'.
[  156.081953] testsuite-07.sh[1051]: failed
[  156.132018] testsuite-07.sh[1054]: ++ systemctl show -P ExecMainStatus badbin_assert.service
[  156.326583] (badbin)[1050]: badbin_assert.service: Failed to execute /tmp/badbin: Exec format error
[  156.343566] systemd[1]: badbin_assert.service: Failed with result 'exit-code'.
[  156.904658] (badbin)[1055]: badbin_assert.service: Failed to execute /tmp/badbin: Exec format error
[  156.913709] systemd[1]: badbin_assert.service: Failed with result 'exit-code'.
[  157.066900] testsuite-07.sh[1014]: + [[ 0 == 203 ]]
[  157.081588] testsuite-07.sh[618]: + echo 'Subtest /usr/lib/systemd/tests/testdata/units/testsuite-07.issue-30412.sh failed'

Follow-up for 1eeaa93de3.
2023-12-12 13:36:28 +00:00
Yu Watanabe
b37e2261fb
Merge pull request #30445 from mrc0mmand/networkd-test-skip
Temporarily skip tests with known issues in the systemd-networkd test suite
2023-12-12 22:02:44 +09:00
Lennart Poettering
f121efd392 execute: handle gracefully if we cannot lock /dev/console when resetting tty due to perms
This is the common case in --user instances, hence handle this
gracefully.

This should be safe since user instances won't get access to
/dev/console-related ttys anyway, but only their own ptys.
2023-12-12 22:02:12 +09:00
Yu Watanabe
1c860010ce
Merge pull request #30441 from poettering/nspawn-fixlets
nspawn: two trivial nspawn tweaklets
2023-12-12 22:00:35 +09:00
Yu Watanabe
61738a1a92
Merge pull request #30437 from YHNdnzj/job-start-msg
core/job: emit job start message if we're only waiting for unit state
2023-12-12 21:59:34 +09:00
Mike Yuan
6cfce71b50 hibernate-resume: don't wait forever if hibernate info is from EFI 2023-12-12 12:36:58 +00:00
Frantisek Sumsal
e4a80de119 test: temporarily skip checking NFT sets in test_address_static
Until https://github.com/systemd/systemd/issues/30427 is resolved.
2023-12-12 12:25:47 +01:00
Frantisek Sumsal
8ed7800d7b test: temporarily disable test_sysctl
Until https://github.com/systemd/systemd/issues/30056 is resolved.
2023-12-12 12:20:41 +01:00
Lennart Poettering
af255804b2 nspawn: drop redundant assignments 2023-12-12 12:06:34 +01:00
Lennart Poettering
1f87cc8cd9 nspawn: suffix some paths in log messages with /, as per coding style 2023-12-12 12:06:21 +01:00
Yu Watanabe
2527b725ba
Merge pull request #30156 from yuwata/network-mtu
network: accept arbitrary size of MTU in .network
2023-12-12 19:03:21 +09:00
Yu Watanabe
b0e2245219
Merge pull request #30426 from mrc0mmand/nft-shenanigans
network: show the reason why NFT operation failed
2023-12-12 18:56:57 +09:00
Frantisek Sumsal
b7d435925d network: actually show the unexpected flags
The original version would yield a slightly _unexpected_ message for
this [Address] section:

[Address]
Address=10.9.3.1/24
HomeAddress=yes
ManageTemporaryAddress=yes

systemd-networkd[68396]: /run/systemd/network/25-address-static.network: unexpected address flags "n/a" were configured. Ignoring [Address] section from line 144.

Let's instead show the unexpected flags:

systemd-networkd[69160]: /run/systemd/network/25-address-static.network: unexpected address flags "home-address,manage-temporary-address" were configured. Ignoring [Address] section from line 144.
2023-12-12 18:56:43 +09:00
Mike Yuan
d8deb18720
core/job: emit job start message if we're only waiting for unit state
Currently, start/stop messages for device units are not used, since
job_perform_on_unit() does nothing and we simply wait for unit status
change. I think we still want some nice log messages explaining what
the start jobs for devices are doing, so let's fix this.
2023-12-12 17:04:30 +08:00
Mike Yuan
3f4a7a472f
core/device: add stopping job message
The use case for stopping a device unit is indeed narrow,
but we still want to show a clear message.

Preparation for later commits.
2023-12-12 16:45:30 +08:00
Oğuz Ersen
04651f7564 po: Translated using Weblate (Turkish)
Currently translated at 100.0% (227 of 227 strings)

Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/tr/
Translation: systemd/main
2023-12-11 21:04:30 +00:00
Yu Watanabe
60f4cfe4fc network: drop redundant 'struct' 2023-12-11 20:11:06 +00:00
Luca Boccassi
bf8726d1ee
Merge pull request #30363 from yuwata/analyze-find-template
analyze: also find template unit when an instance is specified
2023-12-11 15:56:21 +00:00
Luca Boccassi
1eeaa93de3 executor: don't duplicate FD array to avoid double closing
Just use ExecParam directly, as these are all internal to sd-exec now
anyway. Avoids double close when execution fails after FDs are set up
for inheritance and were already re-arranged.

Fixes https://github.com/systemd/systemd/issues/30412
2023-12-11 15:55:50 +00:00
Yu Watanabe
a9235a9488
Merge pull request #30422 from yuwata/network-tiny-fixes
network: tiny fixes
2023-12-12 00:23:11 +09:00
Frantisek Sumsal
13b8fb98b9 network: show the reason why NFT operation failed 2023-12-11 15:28:02 +01:00
Frantisek Sumsal
4d9a30f14f network: add a missing space 2023-12-11 14:50:32 +01:00
Daan De Meyer
dbab005645 kernel-install: Fix inspect with --root= when no version is specified
Using the kernel version from the host is incorrect in this case, so
fix the logic so it handles no version being specified correctly with
--root=.
2023-12-11 12:06:51 +00:00
ksaleem
9fb2a61830 bootctl: fix case-sensitive comparisons in reporting bootloader entries
Fixes #30159
2023-12-11 10:51:56 +00:00
Yu Watanabe
004e22412e
Merge pull request #30389 from keszybz/test-ukify-du
Remove temporary directories created by test_ukify
2023-12-11 18:37:05 +09:00
Daan De Meyer
fc7cdb2dde kernel-install: Look for uki.conf in /usr/lib/kernel as well 2023-12-11 10:29:57 +01:00
Yu Watanabe
cfe69f962b network: drop unused Manager.routes_foreign 2023-12-11 15:44:08 +09:00
Yu Watanabe
e924dc598e network: adjust log message
The address or neighbor processed here may not be foreign.
2023-12-11 15:43:03 +09:00