Commit Graph
76855 Commits
Author SHA1 Message Date
Yu Watanabe daf9f42f91 man/network: update example for router upstream interface
This comments out all optional settings.
2024-10-15 18:23:59 +09:00
Yu Watanabe 1918eda30d network/dhcp6: process hostname and IA_PD on information requesting mode
Fixes #34299.
2024-10-15 18:23:59 +09:00
Yu Watanabe cf7a403e47 sd-dhcp6-lease: adjust information refresh time with lifetime of IA_PD
For the case when IRT is too large but lifetime of IA_PD is too short.
2024-10-15 18:23:59 +09:00
Yu Watanabe 180cc5421d sd-dhcp6-client: allow to request IA_PD on information requesting mode
To support RFC 7084, WPD-4.
2024-10-15 18:23:59 +09:00
Yu Watanabe 8fead9c9e4 network/dhcp6: set hostname even if UseAddress=no
Follow-up for f963f8953d and
1536b7b2d0.
2024-10-15 18:23:59 +09:00
Yu Watanabe 7860677e03 sd-dhcp6-lease: use free_and_replace_full() 2024-10-15 18:23:59 +09:00
Yu Watanabe 35c279478f Merge pull request #34769 from yuwata/machine-by-name-or-pid
machine: lookup_machine_by_name_or_pid() may return 1 on error and it is already replied
2024-10-15 17:56:48 +09:00
Yu Watanabe 71a886518b man: update documents of "_outbound" addresses
Follow-up for 4adf2653e2.
Addresses https://github.com/systemd/systemd/issues/34739#issuecomment-2412904739.
2024-10-15 09:25:13 +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 10230b8251 machine: trivial coding style cleanups 2024-10-15 14:24:58 +09:00
Yu Watanabe d1ac7d76b4 machine: fix memleak in vl_method_list_images()
Fixes an issue in fb0ea6a6a3.
2024-10-15 14:24:58 +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
Yu Watanabe 11a8cb490f Merge pull request #34736 from yuwata/network-mtu
network: wait for IPv6 MTU being synced to link MTU
2024-10-15 10:54:58 +09:00
Yu Watanabe 5f49e48b39 Merge pull request #34744 from yuwata/oom-cleanups
oom: sort output of oomctl by cgroup path
2024-10-15 10:51:50 +09:00
Yu Watanabe 49c46fbaf1 TEST-17-UDEV: check if udev database file is removed on remove event 2024-10-15 10:51:25 +09:00
Yu Watanabe e8df18c9e1 udev: do not try to lock whole block device on remove event
As another device may be created with the same device node while udevd
is processing the remove event of the previous owner of the device node.

This also adds comment why we skip watching device node on remove.
2024-10-15 10:51:19 +09:00
Yu Watanabe a104a0e2eb Merge pull request #34755 from YHNdnzj/soft-reboot-generator-cmdline
core/manager: pass soft-reboot count to generators
2024-10-15 10:48:31 +09:00
Mike Yuan 70ae9dc4f6 hibernate-resume-generator: don't initiate resume if soft-rebooted
This is just paranoia, to ensure that we don't accidentally
initiate resume if the initrd is entered through soft-reboot
rather than the initial one for booting up.
2024-10-15 01:18:26 +02:00
Mike Yuan 1cfe9737cf gpt-auto: use RET_GATHER at one more place 2024-10-15 01:18:26 +02:00
Mike Yuan 86eb3a8fdd core/manager: pass soft-reboot count to generators
soft-reboot allows switching into a different root/installation,
i.e. potentially invalidate settings from kernel cmdline and such.
Let's hence inform generators about soft-reboots.
2024-10-15 01:18:26 +02:00
Mike Yuan de41622bf3 core/manager: minor cleanup for generator_path_any() and friends 2024-10-15 01:18:26 +02:00
Mike Yuan f5dc74de2e shared/exec-util: modernize execute_strv() and friends a bit
do_spawn() is also called during execute_strv(), so rename
"direxec" to "exec-inner".
2024-10-15 01:16:57 +02:00
Mike Yuan 8e39ba3e5a shared/exec-util: minor rearrangement, drop unused EXEC_DIR_NONE 2024-10-15 01:16:57 +02:00
Mike Yuan e472238525 basic/stat-util: use xopenat() where appropriate 2024-10-15 01:16:57 +02:00
Yu Watanabe 39283a1f27 network: wait for IPv6 MTU being synced to link MTU
The kernel resets the IPv6 MTU of an interface when its link MTU is changed.
But it seems the operation is asynchronous, and even when we detect that
the link MTU is changed, the IPv6 MTU may not be reset yet.
====
[ 2257.067613] systemd-networkd[447122]: veth99: MTU is changed: 1500 →1600 (min: 68, max: 65535)
[ 2257.067641] systemd-networkd[447122]: Setting '/proc/sys/net/ipv6/conf/veth99/mtu' to '1410'
[ 2257.067711] systemd-networkd[447122]: No change in value '1410', suppressing write
====
As you can see, even if the link MTU is changed to 1600, the IPv6 MTU is
unchanged (in this case, still 1410).
2024-10-15 06:56:06 +09:00
Yu Watanabe 7edfbf4130 network/sysctl: make link_set_ipv6_mtu() log failures
No functional change, just refactoring.
2024-10-15 06:53:01 +09:00
Yu Watanabe ea684ccb6d network/route: use sysctl_read_ip_property_int() for reading route/max_size 2024-10-15 06:52:19 +09:00
Yu Watanabe d56d07fc1e sysctl-util: introduce sysctl_read_ip_property_int() and _uint32()
Currently not used, but will be used later.
2024-10-15 06:42:12 +09:00
Yu Watanabe 5b2dce150d udev: do not re-create database on remove event
Fixes a bug introduced by f6bda694f9 (v256).

With the offending commit, on remove event, database file for a device is once
removed in event_execute_rules_on_remove(), but later re-created here.
This fixes the issue, and makes the database file not re-created on remove event.
2024-10-15 06:32:39 +09:00
Yu Watanabe d4ad878b9a oomd-util: use FOREACH_ARRAY() more 2024-10-15 06:02:39 +09:00
Yu Watanabe 098f32e2a1 sd-radv: drop sd_radv_prefix and friends, and use sd_ndisc_option to manage NDisc options
No effective functional change, just refactoring.
2024-10-15 05:59:20 +09:00
Yu Watanabe f121d8179a Merge pull request #34738 from behrmann/ukifyoption
ukify: Add a config object
2024-10-15 05:58:49 +09:00
Yu Watanabe 841988f80d TEST-13-NSPAWN: add test for 'machinectl terminate'
This also fixes the test for io.systemd.Machine.Terminate.

When systemd-nspawn@.service receives stop signal, then systemd-nspawn
sends SIGRTMIN+3 to the container, which was previously ignored by the
custom init script used by the container.
Let's introduce another trap for the signal, and correctly handle it.

Follow-up for 164af66f9a.
2024-10-15 05:58:25 +09:00
Yu Watanabe c9dea52941 Merge pull request #34743 from yuwata/bus-message-dump-fd
bus-message-util: introduce bus_message_dump_fd() and _string()
2024-10-15 05:58:03 +09:00
Yu Watanabe 40fbde9571 Merge pull request #34745 from yuwata/local-outbounds-prefsrc
local-addresses: honor RTA_PREFSRC field of gateway
2024-10-15 05:57:34 +09:00
Gaël PORTAY 8ef5ea2bf6 docs: add a missing : character
This adds the missing colon character to the section systemd-sysusers.
2024-10-14 20:11:44 +01:00
Michiel 2053182bd1 Fix some typos in socket-util.h 2024-10-14 16:09:41 +02:00
Lennart Poettering c9b477415a man: document preference for secure_getenv() in coding style 2024-10-14 12:31:37 +01:00
Luca Boccassi 4881dd5cf5 Merge pull request #34749 from yuwata/network-address-parse-broadcast
network/address: fix parser for Broadcast=
2024-10-14 12:31:03 +01:00
Antonio Alvarez Feijoo 5b9de8adef updatectl: remove unimplemented option 2024-10-14 13:30:46 +02:00
Lennart Poettering 8c7c016635 Merge pull request #34623 from ikruglov/ikruglov/io-systemd-Machine-Image
machine: implement varlink interfaces io.systemd.MachineImage.{List, Update}
2024-10-14 13:27:46 +02:00
Lennart Poettering 8d24b2f017 Merge pull request #34716 from dvdhrm/pr/derand
Clarify nameing-scheme in DESKTOP_ENVIRONMENT documentation
2024-10-14 11:51:43 +02:00
Ivan Kruglov 62593c6abb machine: tests for varlink interfaces
- io.systemd.MachineImage.List
- io.systemd.MachineImage.Update
2024-10-14 11:09:18 +02:00
Ivan Kruglov 84d7447a88 machine: listen on io.systemd.MachineImage socket 2024-10-14 11:09:18 +02:00
Ivan Kruglov 7809bd3ba7 machine: introduce io.systemd.MachineImage.Update varlink method
io.systemd.MachineImage.Update implements the following dbus org.freedesktop.machine1.Manager interfaces:

- RenameImage
- MarkImageReadOnly
- SetImageLimit
2024-10-14 11:09:18 +02:00
Ivan Kruglov fb0ea6a6a3 machine: introduce io.systemd.MachineImage.List varlink method
io.systemd.MachineImage.List implements the following dbus org.freedesktop.machine1.Manager interfaces:

- GetImage
- ListImages
- GetImageHostname
- GetImageMachineID
- GetImageMachineInfo
- GetImageOSRelease
2024-10-14 10:57:36 +02:00
Ivan Kruglov dd2d5952c9 machine: generalize rename_image_and_update_cache() logic
This is a prep step to reuse the function in varlink interface
2024-10-14 10:42:47 +02:00
Ivan Kruglov ad0d4f9a4c machine: move manager_acquire_image to src/machine/machined-core.c
This is a prep step to reuse the function in varlink interface.
2024-10-14 10:42:47 +02:00
Ivan Kruglov 4439679892 machine: fix misnamed params in src/shared/discover-image.h 2024-10-14 10:42:47 +02:00