1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-10 05:18:17 +03:00
Commit Graph

71114 Commits

Author SHA1 Message Date
Franck Bui
190ff0d0a8 vconsole-setup: don't fail if the only found vc is already used by plymouth
During the boot process, systemd-vconsole-setup can be started when the only
allocated VC is already taken by plymouth.

This case is expected when a boot splash is displayed hence
systemd-vconsole-setup.service should not fail if it happens.

However rather than doing nothing, the sysfs utf8 flag is set before exiting
early.
2024-02-19 09:25:14 +01:00
Frantisek Sumsal
78bbc7d5d4 test: make testcase_owneridmap() compatible with coverage runs
Follow-up for 614d09a.
2024-02-18 13:44:24 +00:00
Luca Boccassi
8d2a38ef6c man: fix typo in uid0.xml
Follow-up for 72eb3081b2
2024-02-18 13:01:21 +00:00
Yu Watanabe
ff509772f1 TODO: fix typo
Follow-up for 10e3f15ac1.
2024-02-18 07:15:01 +09:00
Yu Watanabe
20fedbe32b
Merge pull request #31318 from mrc0mmand/test-switch-to-btrfs
test: use btrfs by default on Arch as well
2024-02-18 04:55:56 +09:00
Yu Watanabe
9736839d0c
Merge pull request #31362 from yuwata/network-fix-dhcp-pd-ready
network: do not request DHCP addresses configured on checking prefix delegation
2024-02-18 04:55:13 +09:00
Frantisek Sumsal
7e2bf4c5ee test: "modernize" TEST-55-OOMD's init 2024-02-17 12:49:44 +01:00
Frantisek Sumsal
bce0fa7da1 test: don't abbreviate log messages when dumping the test journal
To make debugging test fails easier.
2024-02-17 12:49:44 +01:00
Frantisek Sumsal
1b0cf03668 test: use btrfs' mkswapfile on btrfs
So it's created automagically with proper attributes.
2024-02-17 12:49:44 +01:00
Frantisek Sumsal
e073c1d8ed test: make TEST-08-INITRD slightly less annoying to debug
Forward journal to console, since we won't have any journal from initrd
and shutdown/exit initrd phases. Also, mention
systemd.journald.max_level_console=debug that is very handy for
debugging initrd shenanigans, but don't use it by default since it
sends a _lot_ of stuff to the serial console, which slows down the test
a lot.
2024-02-17 12:49:44 +01:00
Frantisek Sumsal
adafa3b2f8 test: always try to install the ext4 module
So the tests work even if the base image filesystem is not ext4.
2024-02-17 12:49:44 +01:00
Frantisek Sumsal
7eb7e3ec4f test: use btrfs by default on Arch as well 2024-02-17 12:49:44 +01:00
Yu Watanabe
3b677c6f94 test-network: add one more test case for DHCP prefix delegation
For issue #31349.
2024-02-17 11:48:25 +00:00
Yu Watanabe
ab06b74fd3 test-network: split test_dhcp6pd() into small pieces 2024-02-17 11:48:25 +00:00
Yu Watanabe
b4054aff24 network: do not request DHCP addresses configured on checking prefix delegation
This does not change anything for DHCPv4, as a DHCPv4 address is always
requested anyway. However for DHCPv6, the client may not request IA_NA
addresses by UseAddress=no, or even if it is requested, the server may
not provide any IA_NA addresses. Even in such cases, here the check is
for delegated prefixes, hence it is not necessary to check if DHCPv6
IA_NA addresses are configured.

Fixes a bug introduced by 195b83edf8.

Fixes #31349.
2024-02-17 11:48:25 +00:00
Yu Watanabe
43a752669e network/dhcp6: deem DHCPv6 configuration to be finished even if no IA_NA is provided
Follow-up for fc4aa64c2d.

Otherwise, even if we request no address, Link.dhcp6_configured stuck on
false.
2024-02-17 11:48:25 +00:00
Luca Boccassi
70247b103a
Merge pull request #31367 from yuwata/cgroup-runtime-fix
core/cgroup: several follow-up about CGroupRuntime
2024-02-17 10:24:06 +00:00
Yu Watanabe
160d636ff4 resolve: name field may be NULL
Follow-up for e1634bb832.

Fixes #31361.
2024-02-17 10:22:53 +00:00
Yu Watanabe
ad48cc6f81 core/unit: fix superficial NULL-pointer dereference
Though, when unit_prepare_exec() is called, the unit should always
have the cgroup runtime context 'crt'. So, I think we can insert assert().
But, for consistency with other places that call unit_get_cgroup_runtime(),
here use the simple non-NULL check for 'crt' instead of using assert().

Follow-up for 9cc545447e.

Fixes CID#1534667.
2024-02-17 16:50:46 +09:00
Yu Watanabe
e7cf5c82da core/cgroup: drop duplicated free()s
Follow-up for 9cc545447e.

Fixes CID#1534665 and CID#1534666.
2024-02-17 16:46:19 +09:00
Luca Boccassi
67065a7fa1
Merge pull request #31127 from poettering/cgroup-runtime2
core: split out cgroup specific state fields from Unit → CGroupRuntime
2024-02-16 23:38:53 +00:00
Yu Watanabe
e21dd22040
Merge pull request #31338 from ssahani/network-bond-missed
network: netdev - bond add support for ARP missed max
2024-02-17 06:16:42 +09:00
Vishal Chillara Srinivas
e1634bb832 resolve: provide service resolve over varlink
ported the d-bus implementation of service resolve to varlink
extended TEST-75-RESOLVED to cover this use-case
2024-02-16 16:24:08 +01:00
Luca Boccassi
92d1419eb8
Merge pull request #31218 from CodethinkLabs/vmspawn/journal_forwarding
vmspawn: support journal forwarding
2024-02-16 12:09:52 +00:00
Tomáš Pecka
9f78da68ac varlink: fix varlink_collect_full not resetting state
The varlink_collect_full function did not set varlink client's state
when the reply was an error. The state was stuck in "collecting-reply".

I discovered that while hacking on network varlink interface (adding a
new varlink method). The debug logs shows the process of performing the
first query which replies with an error:

  varlink: Setting state idle-client
  network: Sending message: {"method":"io.systemd.Network.LLDPNeighbors","parameters":{"ifindex":1},"more":true}
  network: Changing state idle-client → collecting
  network: Received message: {"error":"org.varlink.service.MethodNotFound","parameters":{"method":"io.systemd.Network.LLDPNeighbors"}}
  network: Changing state collecting → collecting-reply

Now another varlink_collect call is being made, but

  network: Connection busy.
  Failed to execute varlink call: Device or resource busy

This was not caught by the tests because there were no varlink_collect
calls that resulted in error reply.
2024-02-16 12:08:31 +00:00
Luca Boccassi
5ea0da03d4
Merge pull request #31311 from yuwata/journal-user-corruption
journal: fix user journal corruption on rotation
2024-02-16 12:07:50 +00:00
Colin Geniet
bd083fc2eb hwdb: Remove version check in CH Pro Pedals rule
CH Pedals are incorrectly reported as an accelerometer [1], because they
have no button.  This is fixed by a rule in 60-input-id.hwdb [2], but
the rule checks id/version="0100", while my pedals report id/version="0111".

So there are several versions of the pedals, presumably all affected
by the bug. Remove the version check in the rule to fix them all.

[1] https://bugs.freedesktop.org/show_bug.cgi?id=81889
[2] commit: 230ed4c4ba (hwdb: CH Pro Pedals not classified correctly due to no buttons, 2022-01-19)
    PR: https://github.com/systemd/systemd/pull/22184
2024-02-16 12:07:17 +00:00
Sam Leonard
ec3d2f2e9d vmspawn: fix possible NULL dereference in discover_boot_entry 2024-02-16 12:45:08 +01:00
Lennart Poettering
f03e8f19b7
Merge pull request #30263 from msizanoen1/fix-onboot-rotate-2
journal: Reset runtime seqnum data when flushing to system journal
2024-02-16 12:02:09 +01:00
Frantisek Sumsal
7bd41e63f7 test: properly preserve journal from sd-bsod tests
I (incorrectly) assumed that --relinquish-var does everything --flush
does, including moving already existing stuff from /var/log/journal/ to
/run/log/journal/, but that's not the case. To actually do that we need
to shuffle things manually, so let's do just that.

This should make issues like #31334 easier to debug, since with this
patch we now have a coredump in the test journal as well:

~# make -C test/TEST-04-JOURNAL/ clean setup run TEST_MATCH_SUBTEST=bsod BUILD_DIR=$PWD/build TEST_NO_NSPAWN=1
...
[   12.176089] testsuite-04.sh[712]: + echo 'Subtest /usr/lib/systemd/tests/testdata/units/testsuite-04.bsod.sh failed'
[   12.176089] testsuite-04.sh[712]: Subtest /usr/lib/systemd/tests/testdata/units/testsuite-04.bsod.sh failed
[   12.176089] testsuite-04.sh[712]: + return 1
[   12.177347] systemd[1]: testsuite-04.service: Failed with result 'exit-code'.
[   12.220580] systemd[1]: Failed to start testsuite-04.service.
Spawning getter /home/mrc0mmand/repos/@systemd/systemd/build/journalctl -o export -D /var/tmp/systemd-tests/systemd-test.Qtqmmr/root/var/log/journal...
Finishing after writing 7649 entries
TEST-04-JOURNAL: (failed; see logs)
-rw-r----- 1 root root 16777216 Feb 15 21:13 /var/tmp/systemd-tests/systemd-test.Qtqmmr/system.journal
...

~# coredumpctl --file /var/tmp/systemd-tests/systemd-test.Qtqmmr/system.journal
TIME                        PID UID GID SIG     COREFILE EXE                           SIZE
Thu 2024-02-15 21:13:38 CET 812   0   0 SIGABRT journal  /usr/lib/systemd/systemd-bsod    -
2024-02-16 10:37:37 +01:00
Susant Sahani
d2d0a8d45d test-network: Add test for bond arp_missed_max option 2024-02-16 15:03:58 +05:30
Lennart Poettering
10e3f15ac1 update TODO 2024-02-16 10:17:57 +01:00
Lennart Poettering
9cc545447e core: split out cgroup specific state fields from Unit → CGroupRuntime
This refactors the Unit structure a bit: all cgroup-related state fields
are moved to a new structure CGroupRuntime, which is only allocated as
we realize a cgroup.

This is both a nice cleanup and should make unit structures considerably
smaller that have no cgroup associated, because never realized or
because they belong to a unit type that doesn#t have cgroups anyway.

This makes things nicely symmetric:

        ExecContext → static user configuration about execution
        ExecRuntime → dynamic user state of execution
        CGroupContext → static user configuration about cgroups
        CGroupRuntime → dynamic user state of cgroups

And each time the XyzContext is part of the unit type structures such as
Service or Slice that need it, but the runtime object is only allocated
when a unit is started.
2024-02-16 10:17:40 +01:00
Lennart Poettering
3f236f24ba cgroup: normalize parameter order in format_cgroup_memory_comparison()
We usually put the return parameter last. Do so here too.
2024-02-16 10:17:16 +01:00
Susant Sahani
b33bba0434 network: netdev - bond add support for ARP missed max
Allows to configure bond arp_missed_max is the maximum number of arp_interval monitor cycle
for missed ARP replies. If this number is exceeded, link is reported as
down.
2024-02-16 14:44:51 +05:30
mooo
7ad0a7b2b6 po: Translated using Weblate (Lithuanian)
Currently translated at 69.6% (158 of 227 strings)

Co-authored-by: mooo <hazap@hotmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/lt/
Translation: systemd/main
2024-02-16 09:29:40 +01:00
Daan De Meyer
55c2350e85
Merge pull request #31320 from DaanDeMeyer/versioning
meson: Start adding devel and rc suffixes to the project version
2024-02-15 20:15:04 +01:00
Frantisek Sumsal
8cc42169f1 test: add test cases for journal corruption on btrfs
For issue #24150 and #31222.
2024-02-16 03:48:18 +09:00
Yu Watanabe
18d4e475c7 journal-file-util: use COPY_VERIFY_LINKED
As the main thread may call journal_directory_vacuum() ->
unlinkat_deallocate() while another thread is copying the file.

Fixes #24150 and #31222.
2024-02-16 03:48:18 +09:00
Yu Watanabe
72ef2a617f copy: introduce COPY_VERIFY_LINKED flag
If the flag is set, then copy_file() and friends check if the source
file still exists when the copy operation finished.
2024-02-16 03:48:18 +09:00
Yu Watanabe
cb0d5f73e6 sd-journal: use stat_verify_linked() 2024-02-16 03:48:18 +09:00
Yu Watanabe
a6d0cf939c stat-util: introduce {stat,fd}_verify_linked() 2024-02-16 03:48:18 +09:00
Yu Watanabe
dd7fa015a6 stat-util: rebreak comment 2024-02-16 03:48:18 +09:00
Yu Watanabe
f0455cec53 bsod: fix -c/--continuous support
Fixes a bug introduced by f7f062bf9f.

Fixes #31334.
2024-02-16 02:21:11 +09:00
Yu Watanabe
3900255ac1
Merge pull request #31331 from yuwata/xopenat
tree-wide: several cleanups related to xopenat()
2024-02-16 01:32:21 +09:00
Yu Watanabe
f73ad0a9fb journal-file-util: use the file descriptor of journal file on copy
No effective functionality changed, just refactoring.
2024-02-16 00:25:37 +09:00
Yu Watanabe
0f938a024e test: add test for copying symlink with copy_tree_at() 2024-02-16 00:25:37 +09:00
Yu Watanabe
d1553bfd20 copy: use xopenat() to make 'from' argument optional 2024-02-16 00:25:37 +09:00
Yu Watanabe
e40b11be04 fs-util: rename xopenat() -> xopanat_full() 2024-02-16 00:25:37 +09:00
Yu Watanabe
6383abd62c loop-util: fix error handling
Follow-up for 972c8db589.
2024-02-16 00:25:37 +09:00