]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
12 months agoReformat load-fragment-gperf.gperf.in 34597/head
Ryan Wilson [Tue, 15 Oct 2024 04:13:36 +0000 (21:13 -0700)] 
Reformat load-fragment-gperf.gperf.in

This commit reformats load-fragment-gperf.gperf.in after changes
made for adding the ManagedOOMMemoryPressureDurationSec= property.

12 months agocgroup: Add ManagedOOMMemoryPressureDurationSec= override setting for units
Ryan Wilson [Tue, 15 Oct 2024 03:49:54 +0000 (20:49 -0700)] 
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.

12 months agooomd: Refactor DefaultMemoryPressureDurationSec= to use conf parser
Ryan Wilson [Wed, 16 Oct 2024 17:40:30 +0000 (10:40 -0700)] 
oomd: Refactor DefaultMemoryPressureDurationSec= to use conf parser

Parsing DefaultMemoryPressureDurationSec= is currently split between
conf parser, main() and manager_start() methods. This commit centralizes
parsing and bounds checking logic within a single custom conf parser
function.

12 months agoMerge pull request #34793 from yuwata/journalctl-copy-arguments
Yu Watanabe [Wed, 16 Oct 2024 16:52:03 +0000 (01:52 +0900)] 
Merge pull request #34793 from yuwata/journalctl-copy-arguments

journalctl: copy arguments

12 months agodoc: fix typo
Yu Watanabe [Wed, 16 Oct 2024 15:49:56 +0000 (00:49 +0900)] 
doc: fix typo

Follow-up for b3b7cf8b7c35df14c6eb4f79da1a241dc0aa8c7e.

12 months agomachine: fix typo
Yu Watanabe [Wed, 16 Oct 2024 15:48:40 +0000 (00:48 +0900)] 
machine: fix typo

Follow-up for ad0d4f9a4c340f3fd5f0fcf646f7c762722737cd.

12 months agopidref: fix typo
Yu Watanabe [Wed, 16 Oct 2024 15:46:42 +0000 (00:46 +0900)] 
pidref: fix typo

Follow-up for de34ec188c4d4f682a337445aa7753259cd7f821.

12 months agoukify: fix typo
Yu Watanabe [Wed, 16 Oct 2024 15:44:38 +0000 (00:44 +0900)] 
ukify: fix typo

Follow-up for 02eabaffe98c9a3b5dec1c4837968a4d3e2ff7db.

12 months agoMerge pull request #34381 from DaanDeMeyer/extension-submounts
Yu Watanabe [Wed, 16 Oct 2024 15:11:17 +0000 (00:11 +0900)] 
Merge pull request #34381 from DaanDeMeyer/extension-submounts

sysext: Deal with nested mounts properly

12 months agoFix maybe-uninitialized warnings with gcc 14.2
Luca Boccassi [Wed, 16 Oct 2024 10:42:06 +0000 (11:42 +0100)] 
Fix maybe-uninitialized warnings with gcc 14.2

../src/resolve/resolved-bus.c: In function ‘call_link_method’:
../src/resolve/resolved-bus.c:1769:16: warning: ‘l’ may be used uninitialized [-Wmaybe-uninitialized]
 1769 |         return handler(message, l, error);
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~
../src/resolve/resolved-bus.c:1755:15: note: ‘l’ was declared here
 1755 |         Link *l;
      |               ^
../src/resolve/resolved-bus.c: In function ‘bus_method_get_link’:
../src/resolve/resolved-bus.c:1828:13: warning: ‘l’ may be used uninitialized [-Wmaybe-uninitialized]
 1828 |         p = link_bus_path(l);
      |             ^~~~~~~~~~~~~~~~
../src/resolve/resolved-bus.c:1816:15: note: ‘l’ was declared here
 1816 |         Link *l;
      |               ^

12 months agopid1: add env var to override default mount rate limit interval
xujing [Wed, 16 Oct 2024 07:19:09 +0000 (15:19 +0800)] 
pid1: add env var to override default mount rate limit interval

Similar to 24a4542c24a4542c can only be set 1 in 1s at most,
sometimes we may need to set to something else(such as 1 in 2s).
So it's best to let the user decide.

This also allows users to solve #34690.

12 months agojournalctl: do not directly use optarg, but copy optarg before use 34793/head
Yu Watanabe [Wed, 16 Oct 2024 10:34:18 +0000 (19:34 +0900)] 
journalctl: do not directly use optarg, but copy optarg before use

Otherwise, if the process forks child processes, then the arguments
cannot be used from them.
To avoid potential issues like the one fixed by
6d3012bab4ce4c1ed260598d05b4e9f2ea471658.

12 months agoMerge pull request #34791 from poettering/live-mount-tweak
Luca Boccassi [Wed, 16 Oct 2024 13:43:14 +0000 (14:43 +0100)] 
Merge pull request #34791 from poettering/live-mount-tweak

tweaks to live mount property logging

12 months agosysext: Deal with nested mounts properly 34381/head
Daan De Meyer [Thu, 12 Sep 2024 18:42:02 +0000 (20:42 +0200)] 
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.

12 months agosysext: Run unmerge in a subprocess
Daan De Meyer [Thu, 12 Sep 2024 18:28:01 +0000 (20:28 +0200)] 
sysext: Run unmerge in a subprocess

Preparation for later commit where we need a private mount namespace
for unmerge.

12 months agojournalctl: erase verify key before free
Yu Watanabe [Wed, 16 Oct 2024 10:27:36 +0000 (19:27 +0900)] 
journalctl: erase verify key before free

Even optarg is erased, copied string was not erased.
Let's erase the copied key for safety.

12 months agomount-util: Make get_submounts() a public function
Daan De Meyer [Thu, 12 Sep 2024 10:20:56 +0000 (12:20 +0200)] 
mount-util: Make get_submounts() a public function

12 months agoMerge pull request #34756 from yuwata/test-oomd-cleanups
Yu Watanabe [Wed, 16 Oct 2024 09:39:33 +0000 (18:39 +0900)] 
Merge pull request #34756 from yuwata/test-oomd-cleanups

TEST-55-OOMD: several cleanups

12 months agotest: fix TOCTOU in test-json
Yu Watanabe [Wed, 16 Oct 2024 05:35:32 +0000 (14:35 +0900)] 
test: fix TOCTOU in test-json

Follow-up for 60ae3b86fb52d545b279e3927d2214462385e734.
Fixes CID#1563782.

12 months agocore: move debug logging from _can_live_mount() functions to caller 34791/head
Lennart Poettering [Wed, 16 Oct 2024 08:45:10 +0000 (10:45 +0200)] 
core: move debug logging from _can_live_mount() functions to caller

Let's debug log the returned dbus error where we want the logging, but
don't log it, where we don't.

This removes the noisy logging from the property handler for the
CanLiveMount property, but keeps it in place for the MountImage() method
call where we want it.

Alternative to #34175

Follow-up for 5162829ec87df20c7af763bdf274735bf9e53552 and 1cafbecabecc619b4e147abd9925282d0ff323bd

12 months agocore: one more Mount -> LiveMount rename
Luca Boccassi [Thu, 29 Aug 2024 15:10:46 +0000 (16:10 +0100)] 
core: one more Mount -> LiveMount rename

Missed by earlier search-and-replace

Follow-up for 5162829ec87df20c7af763bdf274735bf9e53552

12 months agoMerge pull request #34742 from yuwata/test-storage
Frantisek Sumsal [Wed, 16 Oct 2024 08:21:22 +0000 (10:21 +0200)] 
Merge pull request #34742 from yuwata/test-storage

test: fix multipath test in TEST-64-STORAGE

12 months agoTEST-55-OOMD: check slice property before stressing slice 34756/head
Yu Watanabe [Wed, 16 Oct 2024 06:20:08 +0000 (15:20 +0900)] 
TEST-55-OOMD: check slice property before stressing slice

12 months agoTEST-55-OOMD: stop test units when unnecessary
Yu Watanabe [Wed, 16 Oct 2024 06:18:41 +0000 (15:18 +0900)] 
TEST-55-OOMD: stop test units when unnecessary

Then, sleep becomes not necessary anymore. This greatly improve performance.

12 months agoTEST-55-OOMD: check slice more in detail
Yu Watanabe [Wed, 16 Oct 2024 06:12:32 +0000 (15:12 +0900)] 
TEST-55-OOMD: check slice more in detail

system and user slice has same name, hence we need to check full path.

12 months agoTEST-55-OOMD: split into small testcases
Yu Watanabe [Wed, 16 Oct 2024 06:04:07 +0000 (15:04 +0900)] 
TEST-55-OOMD: split into small testcases

Then, we can run each small test cases separately.

12 months agoTEST-55-OOMD: check global config earlier
Yu Watanabe [Wed, 16 Oct 2024 05:52:49 +0000 (14:52 +0900)] 
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.

12 months agoTEST-55-OOMD: set ManagedOOMMemoryPressure= and friends in a drop-in config
Yu Watanabe [Fri, 11 Oct 2024 07:09:11 +0000 (16:09 +0900)] 
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.

12 months agogpt-auto: remove directory check for ESP mount
Michael Ferrari [Tue, 15 Oct 2024 16:42:20 +0000 (18:42 +0200)] 
gpt-auto: remove directory check for ESP mount

Ensure that we always attempt to mount the `ESP` partition to `/boot`
when there is no `XBOOTLDR` partition.

Fixes an issue when booting without a `XBOOTLDR` partition and an empty
root partition, since it would mount the `ESP` partition to `/efi/`
unconditionally causing boot entries to not be under `/boot/` as
recommended by the Boot Loader Specification.

12 months agoMerge pull request #34482 from bgurney-rh/alt-nvme-multins-symlink-fix
Yu Watanabe [Wed, 16 Oct 2024 01:05:46 +0000 (10:05 +0900)] 
Merge pull request #34482 from bgurney-rh/alt-nvme-multins-symlink-fix

Pin obsolete NVMe symlinks to namespace 1

12 months agoMerge pull request #34781 from poettering/write-string-rename-full
Yu Watanabe [Tue, 15 Oct 2024 21:18:57 +0000 (06:18 +0900)] 
Merge pull request #34781 from poettering/write-string-rename-full

fileio: write_string_file() naming clean-ups

12 months agoMerge pull request #34719 from poettering/pidref-remote
Yu Watanabe [Tue, 15 Oct 2024 21:15:26 +0000 (06:15 +0900)] 
Merge pull request #34719 from poettering/pidref-remote

pidref: add explicit concept of "remote" PidRef

12 months agojson-util: initialize "remote" flag for PidRef when parsing JSON pidref serializations 34719/head
Lennart Poettering [Fri, 11 Oct 2024 15:14:26 +0000 (17:14 +0200)] 
json-util: initialize "remote" flag for PidRef when parsing JSON pidref serializations

Now that we have a way to recognize "remoteness" of a PidRef, let's make
sure when we decode a JSON pidref we initialize things that way.

12 months agopidref: add explicit concept of "remote" PidRef
Lennart Poettering [Fri, 11 Oct 2024 09:33:42 +0000 (11:33 +0200)] 
pidref: add explicit concept of "remote" PidRef

This PidRef just track some data, but cannot be used for any active
operation.

Background: for https://github.com/systemd/systemd/pull/34703 it makes
sense to track explicitly if some PidRef is not a local one, so that we
never attempt to for example "kill a remote process" and thus
acccidentally hit the wrong process (i.e. a local one by the same PID).

12 months agodebug-generator: create prefix dir of generate unit file 34781/head
Lennart Poettering [Tue, 15 Oct 2024 13:36:06 +0000 (15:36 +0200)] 
debug-generator: create prefix dir of generate unit file

Strictly speaking, it's more correct if we create the prefix path before
writing our unit file.

12 months agodropin: use WRITE_STRING_FILE_MKDIR_0755 to create drop-in prefix path
Lennart Poettering [Tue, 15 Oct 2024 13:35:25 +0000 (15:35 +0200)] 
dropin: use WRITE_STRING_FILE_MKDIR_0755 to create drop-in prefix path

12 months agoshared: modernize drop_in_file() a bit
Lennart Poettering [Tue, 15 Oct 2024 13:34:35 +0000 (15:34 +0200)] 
shared: modernize drop_in_file() a bit

Make the return parameters optional, since we don't actually need them
in all cases (see later commits).

12 months agofileio: clean up write_string_file() naming
Lennart Poettering [Tue, 15 Oct 2024 13:32:55 +0000 (15:32 +0200)] 
fileio: clean up write_string_file() naming

let's rename the "_ts" flavour of these calls "_full" instead, exposing
the full functionality. And then keep two more minimal versions around:
one "_at" (which has the ts parameter suppressed, but keeps the dir_fd
one). And one without suffix (which supresses both).

Do the same for the label versions of these calls.

12 months agocore: do not fail if ignorable img.v/ vpick dir is missing
Luca Boccassi [Tue, 15 Oct 2024 13:05:50 +0000 (14:05 +0100)] 
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 00f546e25e8
Follow-up for 5e79dd96a88
Follow-up for 622efc544dc

12 months agoMerge pull request #34778 from poettering/userdb-error-tweak
Lennart Poettering [Tue, 15 Oct 2024 16:17:06 +0000 (18:17 +0200)] 
Merge pull request #34778 from poettering/userdb-error-tweak

userdb: handle userbd replies indicating invalid user/group names like record not found

12 months agoTEST-64-UDEV-STORAGE: test for absence of obsolete NVMe symlink 34482/head
Bryan Gurney [Tue, 15 Oct 2024 14:22:07 +0000 (10:22 -0400)] 
TEST-64-UDEV-STORAGE: test for absence of obsolete NVMe symlink

Signed-off-by: Bryan Gurney <bgurney@redhat.com>
12 months agoMerge pull request #34747 from yuwata/busctl-json-fd
Lennart Poettering [Tue, 15 Oct 2024 12:38:18 +0000 (14:38 +0200)] 
Merge pull request #34747 from yuwata/busctl-json-fd

busctl: dump passed fd info

12 months agouserdb: return ESRCH if userdb service refuses a user/group name as invalid 34778/head
Lennart Poettering [Tue, 15 Oct 2024 11:59:57 +0000 (13:59 +0200)] 
userdb: return ESRCH if userdb service refuses a user/group name as invalid

if a userdb service refuse a user/group name as invalid, let's turn this
into ESRCH client-side following that there definitely is no user/group
record for a completely invalid user/group name.

Replaces: #34558

12 months agosd-varlink: add new sd_varlink_error_is_invalid_parameter() helper
Lennart Poettering [Tue, 15 Oct 2024 11:40:24 +0000 (13:40 +0200)] 
sd-varlink: add new sd_varlink_error_is_invalid_parameter() helper

12 months agonetwork: add AF_TO_ADDRESS_FAMILY() helper
Lennart Poettering [Tue, 15 Oct 2024 09:38:55 +0000 (11:38 +0200)] 
network: add AF_TO_ADDRESS_FAMILY() helper

Make some code a bit shorter.

12 months agomachine: add MachineImage interface
Yu Watanabe [Tue, 15 Oct 2024 08:39:00 +0000 (17:39 +0900)] 
machine: add MachineImage interface

Follow-up for fb0ea6a6a36b5fa97e6c57d608bb9f7acb63c8b2.
Fixes #34772.

12 months agoMerge pull request #34771 from ZLima12/run0-root-working-directory
Yu Watanabe [Tue, 15 Oct 2024 11:43:47 +0000 (20:43 +0900)] 
Merge pull request #34771 from ZLima12/run0-root-working-directory

run: fix bug causing run0 to ignore `-D /`.

12 months agoMerge pull request #34442 from yuwata/network-dhcp6-information-requesting-ia-pd
Yu Watanabe [Tue, 15 Oct 2024 11:42:46 +0000 (20:42 +0900)] 
Merge pull request #34442 from yuwata/network-dhcp6-information-requesting-ia-pd

network/dhcp6: allow to request IA_PD on information requesting mode

12 months agobusctl: show information of passed file descriptor 34747/head
Yu Watanabe [Sun, 13 Oct 2024 04:17:26 +0000 (13:17 +0900)] 
busctl: show information of passed file descriptor

12 months agosd-json: introduce json_variant_new_fd_info()
Yu Watanabe [Sun, 13 Oct 2024 03:56:10 +0000 (12:56 +0900)] 
sd-json: introduce json_variant_new_fd_info()

Currently this is not used, but will be used later.

12 months agosd-json: introduce json_variant_new_devnum() and friends
Yu Watanabe [Tue, 15 Oct 2024 00:15:19 +0000 (09:15 +0900)] 
sd-json: introduce json_variant_new_devnum() and friends

12 months agofs-util: make readlink_malloc() inline
Yu Watanabe [Sun, 13 Oct 2024 03:07:25 +0000 (12:07 +0900)] 
fs-util: make readlink_malloc() inline

12 months agobusctl: minor coding style cleanups
Yu Watanabe [Sun, 13 Oct 2024 04:21:36 +0000 (13:21 +0900)] 
busctl: minor coding style cleanups

- rename output parameter of json_transform_and_append(),
- return from call() earlier to reduce indentation,
- add several missing error messages.

12 months agoTEST-74-AUX-UTILS: add tests for 'run0 -D' 34771/head
John A. Leuenhagen [Tue, 15 Oct 2024 06:00:18 +0000 (02:00 -0400)] 
TEST-74-AUX-UTILS: add tests for 'run0 -D'

12 months agorun: fix bug causing run0 to ignore `-D /`.
John A. Leuenhagen [Tue, 15 Oct 2024 04:57:52 +0000 (00:57 -0400)] 
run: fix bug causing run0 to ignore `-D /`.

Since the root directory was being suppressed to NULL, the subsequent
check would erroneously think that no working directory was specified.
This caused the default working directory to be applied instead.

12 months agoMerge pull request #34723 from poettering/machined-pidref-more
Lennart Poettering [Tue, 15 Oct 2024 09:37:39 +0000 (11:37 +0200)] 
Merge pull request #34723 from poettering/machined-pidref-more

machined: switch remaining Varlink overs over to use json_dispatch_pidref() and friends

12 months agonetwork/radv: update comment 34442/head
Yu Watanabe [Mon, 16 Sep 2024 02:37:35 +0000 (11:37 +0900)] 
network/radv: update comment

DHCPv6PrefixDelegation= is replaced with DHCPPrefixDelegation=.

12 months agoman/network: update example for router upstream interface
Yu Watanabe [Sun, 15 Sep 2024 20:12:50 +0000 (05:12 +0900)] 
man/network: update example for router upstream interface

This comments out all optional settings.

12 months agonetwork/dhcp6: process hostname and IA_PD on information requesting mode
Yu Watanabe [Sun, 15 Sep 2024 20:03:57 +0000 (05:03 +0900)] 
network/dhcp6: process hostname and IA_PD on information requesting mode

Fixes #34299.

12 months agosd-dhcp6-lease: adjust information refresh time with lifetime of IA_PD
Yu Watanabe [Sun, 15 Sep 2024 20:02:06 +0000 (05:02 +0900)] 
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.

12 months agosd-dhcp6-client: allow to request IA_PD on information requesting mode
Yu Watanabe [Sun, 15 Sep 2024 20:00:57 +0000 (05:00 +0900)] 
sd-dhcp6-client: allow to request IA_PD on information requesting mode

To support RFC 7084, WPD-4.

12 months agonetwork/dhcp6: set hostname even if UseAddress=no
Yu Watanabe [Sun, 15 Sep 2024 19:45:13 +0000 (04:45 +0900)] 
network/dhcp6: set hostname even if UseAddress=no

Follow-up for f963f8953daeab03b892616ce0c65f7572932187 and
1536b7b2d00819615bf8eba194de7ccd20c3689f.

12 months agosd-dhcp6-lease: use free_and_replace_full()
Yu Watanabe [Sun, 15 Sep 2024 19:12:02 +0000 (04:12 +0900)] 
sd-dhcp6-lease: use free_and_replace_full()

12 months agoMerge pull request #34769 from yuwata/machine-by-name-or-pid
Yu Watanabe [Tue, 15 Oct 2024 08:56:48 +0000 (17:56 +0900)] 
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

12 months agoman: update documents of "_outbound" addresses
Yu Watanabe [Tue, 15 Oct 2024 05:15:31 +0000 (14:15 +0900)] 
man: update documents of "_outbound" addresses

Follow-up for 4adf2653e2a68d4d593b46734fd9e24721a8d449.
Addresses https://github.com/systemd/systemd/issues/34739#issuecomment-2412904739.

12 months agoTEST-13-NSPAWN: several cleanups 34769/head
Yu Watanabe [Tue, 15 Oct 2024 05:03:02 +0000 (14:03 +0900)] 
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.

12 months agomachine: trivial coding style cleanups
Yu Watanabe [Tue, 15 Oct 2024 04:17:29 +0000 (13:17 +0900)] 
machine: trivial coding style cleanups

12 months agomachine: fix memleak in vl_method_list_images()
Yu Watanabe [Tue, 15 Oct 2024 04:14:15 +0000 (13:14 +0900)] 
machine: fix memleak in vl_method_list_images()

Fixes an issue in fb0ea6a6a36b5fa97e6c57d608bb9f7acb63c8b2.

12 months agomachine: lookup_machine_by_name_or_pid() may return 1 on error and it is already...
Yu Watanabe [Tue, 15 Oct 2024 02:20:13 +0000 (11:20 +0900)] 
machine: lookup_machine_by_name_or_pid() may return 1 on error and it is already replied

Follow-ups for 1bd979dddbb6ed3ffe410d78a7ff80cbb1c42a64 and later
commits.

Fixes #34764.

12 months agoMerge pull request #34752 from yuwata/udev-remove-database-on-remove
Yu Watanabe [Tue, 15 Oct 2024 04:06:00 +0000 (13:06 +0900)] 
Merge pull request #34752 from yuwata/udev-remove-database-on-remove

udev: remove database file on remove event

12 months agoMerge pull request #34736 from yuwata/network-mtu
Yu Watanabe [Tue, 15 Oct 2024 01:54:58 +0000 (10:54 +0900)] 
Merge pull request #34736 from yuwata/network-mtu

network: wait for IPv6 MTU being synced to link MTU

12 months agoMerge pull request #34744 from yuwata/oom-cleanups
Yu Watanabe [Tue, 15 Oct 2024 01:51:50 +0000 (10:51 +0900)] 
Merge pull request #34744 from yuwata/oom-cleanups

oom: sort output of oomctl by cgroup path

12 months agoTEST-17-UDEV: check if udev database file is removed on remove event 34752/head
Yu Watanabe [Sun, 13 Oct 2024 16:28:23 +0000 (01:28 +0900)] 
TEST-17-UDEV: check if udev database file is removed on remove event

12 months agoudev: do not try to lock whole block device on remove event
Yu Watanabe [Mon, 14 Oct 2024 21:22:24 +0000 (06:22 +0900)] 
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.

12 months agoMerge pull request #34755 from YHNdnzj/soft-reboot-generator-cmdline
Yu Watanabe [Tue, 15 Oct 2024 01:48:31 +0000 (10:48 +0900)] 
Merge pull request #34755 from YHNdnzj/soft-reboot-generator-cmdline

core/manager: pass soft-reboot count to generators

12 months agohibernate-resume-generator: don't initiate resume if soft-rebooted 34755/head
Mike Yuan [Mon, 14 Oct 2024 16:31:14 +0000 (18:31 +0200)] 
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.

12 months agogpt-auto: use RET_GATHER at one more place
Mike Yuan [Mon, 30 Sep 2024 19:21:53 +0000 (21:21 +0200)] 
gpt-auto: use RET_GATHER at one more place

12 months agocore/manager: pass soft-reboot count to generators
Mike Yuan [Sat, 28 Sep 2024 13:54:42 +0000 (15:54 +0200)] 
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.

12 months agocore/manager: minor cleanup for generator_path_any() and friends
Mike Yuan [Fri, 11 Oct 2024 15:57:06 +0000 (17:57 +0200)] 
core/manager: minor cleanup for generator_path_any() and friends

12 months agoshared/exec-util: modernize execute_strv() and friends a bit
Mike Yuan [Mon, 14 Oct 2024 16:13:35 +0000 (18:13 +0200)] 
shared/exec-util: modernize execute_strv() and friends a bit

do_spawn() is also called during execute_strv(), so rename
"direxec" to "exec-inner".

12 months agoshared/exec-util: minor rearrangement, drop unused EXEC_DIR_NONE
Mike Yuan [Fri, 11 Oct 2024 15:53:34 +0000 (17:53 +0200)] 
shared/exec-util: minor rearrangement, drop unused EXEC_DIR_NONE

12 months agobasic/stat-util: use xopenat() where appropriate
Mike Yuan [Fri, 11 Oct 2024 16:04:17 +0000 (18:04 +0200)] 
basic/stat-util: use xopenat() where appropriate

12 months agonetwork: wait for IPv6 MTU being synced to link MTU 34736/head
Yu Watanabe [Sat, 12 Oct 2024 07:43:15 +0000 (16:43 +0900)] 
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).

12 months agonetwork/sysctl: make link_set_ipv6_mtu() log failures
Yu Watanabe [Sat, 12 Oct 2024 07:45:05 +0000 (16:45 +0900)] 
network/sysctl: make link_set_ipv6_mtu() log failures

No functional change, just refactoring.

12 months agonetwork/route: use sysctl_read_ip_property_int() for reading route/max_size
Yu Watanabe [Mon, 14 Oct 2024 21:52:19 +0000 (06:52 +0900)] 
network/route: use sysctl_read_ip_property_int() for reading route/max_size

12 months agosysctl-util: introduce sysctl_read_ip_property_int() and _uint32()
Yu Watanabe [Sat, 12 Oct 2024 07:40:19 +0000 (16:40 +0900)] 
sysctl-util: introduce sysctl_read_ip_property_int() and _uint32()

Currently not used, but will be used later.

12 months agoudev: do not re-create database on remove event
Yu Watanabe [Sun, 13 Oct 2024 15:55:43 +0000 (00:55 +0900)] 
udev: do not re-create database on remove event

Fixes a bug introduced by f6bda694f908cc227b002570b893029aa4c9e173 (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.

12 months agooomd-util: use FOREACH_ARRAY() more 34744/head
Yu Watanabe [Sat, 12 Oct 2024 01:59:12 +0000 (10:59 +0900)] 
oomd-util: use FOREACH_ARRAY() more

12 months agosd-radv: drop sd_radv_prefix and friends, and use sd_ndisc_option to manage NDisc...
Yu Watanabe [Tue, 23 Apr 2024 04:15:49 +0000 (13:15 +0900)] 
sd-radv: drop sd_radv_prefix and friends, and use sd_ndisc_option to manage NDisc options

No effective functional change, just refactoring.

12 months agoMerge pull request #34738 from behrmann/ukifyoption
Yu Watanabe [Mon, 14 Oct 2024 20:58:49 +0000 (05:58 +0900)] 
Merge pull request #34738 from behrmann/ukifyoption

ukify: Add a config object

12 months agoTEST-13-NSPAWN: add test for 'machinectl terminate'
Yu Watanabe [Sat, 12 Oct 2024 20:15:18 +0000 (05:15 +0900)] 
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 164af66f9abdfd8935098d9f10c746ff29dea7df.

12 months agoMerge pull request #34743 from yuwata/bus-message-dump-fd
Yu Watanabe [Mon, 14 Oct 2024 20:58:03 +0000 (05:58 +0900)] 
Merge pull request #34743 from yuwata/bus-message-dump-fd

bus-message-util: introduce bus_message_dump_fd() and _string()

12 months agoMerge pull request #34745 from yuwata/local-outbounds-prefsrc
Yu Watanabe [Mon, 14 Oct 2024 20:57:34 +0000 (05:57 +0900)] 
Merge pull request #34745 from yuwata/local-outbounds-prefsrc

local-addresses: honor RTA_PREFSRC field of gateway

12 months agodocs: add a missing : character
Gaël PORTAY [Mon, 14 Oct 2024 17:16:07 +0000 (19:16 +0200)] 
docs: add a missing : character

This adds the missing colon character to the section systemd-sysusers.

12 months agoFix some typos in socket-util.h
Michiel [Mon, 14 Oct 2024 13:50:36 +0000 (15:50 +0200)] 
Fix some typos in socket-util.h

12 months agoman: document preference for secure_getenv() in coding style
Lennart Poettering [Mon, 14 Oct 2024 09:55:59 +0000 (11:55 +0200)] 
man: document preference for secure_getenv() in coding style

12 months agoMerge pull request #34749 from yuwata/network-address-parse-broadcast
Luca Boccassi [Mon, 14 Oct 2024 11:31:03 +0000 (12:31 +0100)] 
Merge pull request #34749 from yuwata/network-address-parse-broadcast

network/address: fix parser for Broadcast=

12 months agoupdatectl: remove unimplemented option
Antonio Alvarez Feijoo [Mon, 14 Oct 2024 10:02:04 +0000 (12:02 +0200)] 
updatectl: remove unimplemented option

12 months agoMerge pull request #34623 from ikruglov/ikruglov/io-systemd-Machine-Image
Lennart Poettering [Mon, 14 Oct 2024 11:27:46 +0000 (13:27 +0200)] 
Merge pull request #34623 from ikruglov/ikruglov/io-systemd-Machine-Image

machine: implement varlink interfaces io.systemd.MachineImage.{List, Update}

12 months agosd-json: drop sd_json_dispatch_pid() again, as we prefer json_dispatch_pidref() now 34723/head
Lennart Poettering [Fri, 11 Oct 2024 12:03:05 +0000 (14:03 +0200)] 
sd-json: drop sd_json_dispatch_pid() again, as we prefer json_dispatch_pidref() now

The calls are now unused, and we generally prefer if people send a PID
triplet rather than a single PID, hence stop supporting a high-level
dispacher for pid_t.