summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tree-wide: use the usual SPDX header for our own filesZbigniew Jędrzejewski-Szmek2020-10-2919-0/+37
|
* NEWS: v247-rc1v247-rc1Zbigniew Jędrzejewski-Szmek2020-10-261-1/+1
|
* NEWS: update contributors list for v247-rc1Zbigniew Jędrzejewski-Szmek2020-10-261-15/+15
|
* NEWS: mention IPv6PrefixDelegation→IPv6SendRA renamingZbigniew Jędrzejewski-Szmek2020-10-261-0/+5
|
* tmpfiles: Handle filesystems without ACL support in more cases.Pat Coulthard2020-10-261-11/+16
|
* NEWS: fix typo (`systemd-userdb` > `systemd-userdbd`)Elias Probst2020-10-241-1/+1
|
* test-network: add a test case for DNSSL in RAYu Watanabe2020-10-243-0/+8
| | | | Closes #4590.
* Merge pull request #17430 from ↵Zbigniew Jędrzejewski-Szmek2020-10-244-152/+249
|\ | | | | | | | | yuwata/network-drop-foreign-routes-managed-by-manager network: drop routes managed by Manager when they are not requested
| * test-network: add tests for routes managed by ManagerYu Watanabe2020-10-231-0/+60
| |
| * network: drop routes managed by Manager when link is removedYu Watanabe2020-10-231-2/+77
| | | | | | | | | | Also, foreign routes managed by Manager are dropped in link_drop_foreign_routes().
| * network: specify route type in route_remove()Yu Watanabe2020-10-231-146/+108
| | | | | | | | | | This factors out the common netlink message handling in route_remote() and route_configure() to route_set_netlink_message().
| * network: link may be NULLYu Watanabe2020-10-231-1/+1
| |
| * network: ignore error in writing proxy_ndpYu Watanabe2020-10-231-2/+2
| | | | | | | | | | | | This partially reverts the commit fd773a11d8e2b01e9e6d234ca5693417c0101fca. As, IPv6 may be disabled by kernel.
| * network: fix typoYu Watanabe2020-10-231-1/+1
| |
* | test: ignore ENOMEDIUM error from sd_pid_get_cgroup()Dan Streetman2020-10-241-1/+1
| | | | | | | | | | | | | | Ubuntu builds on the Launchpad infrastructure run inside a chroot that does not have the sysfs cgroup dirs mounted, so this call will return ENOMEDIUM from cg_unified_cached() during the build-time testing, for example when building the package in a Launchpad PPA.
* | tree-wide: fix typos found by Fossies codespell reportYu Watanabe2020-10-249-11/+11
| |
* | Revert "sd-dhcp-client: use asynchronous_close()"Yu Watanabe2020-10-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This effectively reverts the commit 22fc2420b2a7220addcee33c2fa17ada44d87f9c. The function `asynchronous_close()` confuses valgrind. Before this commit, valgrind may report the following: ``` HEAP SUMMARY: in use at exit: 384 bytes in 1 blocks total heap usage: 4,787 allocs, 4,786 frees, 1,379,191 bytes allocated 384 bytes in 1 blocks are possibly lost in loss record 1 of 1 at 0x483CAE9: calloc (vg_replace_malloc.c:760) by 0x401456A: _dl_allocate_tls (in /usr/lib64/ld-2.31.so) by 0x4BD212E: pthread_create@@GLIBC_2.2.5 (in /usr/lib64/libpthread-2.31.so) by 0x499B662: asynchronous_job (async.c:47) by 0x499B7DC: asynchronous_close (async.c:102) by 0x4CFA8B: client_initialize (sd-dhcp-client.c:696) by 0x4CFC5E: client_stop (sd-dhcp-client.c:725) by 0x4D4589: sd_dhcp_client_stop (sd-dhcp-client.c:2134) by 0x493C2F: link_stop_clients (networkd-link.c:620) by 0x4126DB: manager_free (networkd-manager.c:867) by 0x40D193: manager_freep (networkd-manager.h:97) by 0x40DAFC: run (networkd.c:20) LEAK SUMMARY: definitely lost: 0 bytes in 0 blocks indirectly lost: 0 bytes in 0 blocks possibly lost: 384 bytes in 1 blocks still reachable: 0 bytes in 0 blocks suppressed: 0 bytes in 0 blocks For lists of detected and suppressed errors, rerun with: -s ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) ```
* | Merge pull request #17429 from keszybz/revert-17188Yu Watanabe2020-10-245-49/+45
|\ \ | | | | | | Revert the change to allow arbitrary environment variable names
| * | man: document what variables are allowedZbigniew Jędrzejewski-Szmek2020-10-232-16/+28
| | |
| * | Revert "basic/env-util: (mostly) follow POSIX for what variable names are ↵Zbigniew Jędrzejewski-Szmek2020-10-233-29/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | allowed" This reverts commit b45c068dd8fac7661a15e99e7cf699ff06010b13. I think the idea was generally sound, but didn't take into account the limitations of show-environment and how it is used. People expect to be able to eval systemctl show-environment output in bash, and no escaping syntax is defined for environment *names* (we only do escaping for *values*). We could skip such problematic variables in 'systemctl show-environment', and only allow them to be inherited directly. But this would be confusing and ugly. The original motivation for this change was that various import operations would fail. a4ccce22d9552dc74b6916cc5ec57f2a0b686b4f changed systemctl to filter invalid variables in import-environment. https://gitlab.gnome.org/GNOME/gnome-session/-/issues/71 does a similar change in GNOME. So those problematic variables should not cause failures, but just be silently ignored. Finally, the environment block is becoming a dumping ground. In my gnome session 'systemctl show-environment --user' includes stuff like PWD, FPATH (from zsh), SHLVL=0 (no idea what that is). This is not directly related to variable names (since all those are allowed under the stricter rules too), but I think we should start pushing people away from running import-environment and towards importing only select variables. https://github.com/systemd/systemd/pull/17188#issuecomment-708676511
| * | basic/env-util: make function shorterZbigniew Jędrzejewski-Szmek2020-10-231-4/+1
| | |
* | | Merge pull request #17427 from poettering/v247-bumpLennart Poettering2020-10-237-5057/+5934
|\ \ \ | |_|/ |/| | preparation for v247-rc1
| * | build-sys: prepare 247-rc1Lennart Poettering2020-10-232-2/+33
| | | | | | | | | | | | Interestingly, the libudev so version was already bumped.
| * | update hwdbLennart Poettering2020-10-235-5055/+5901
| |/
* | update TODOLennart Poettering2020-10-231-0/+3
|/
* Merge pull request #16859 from poettering/loop-eagainLennart Poettering2020-10-239-203/+847
|\ | | | | loop: handle EAGAIN on LOOP_SET_STATUS64
| * test: add heavy load loopback block device testLennart Poettering2020-10-224-1/+264
| |
| * loop-util: wait a random time before trying againLennart Poettering2020-10-221-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's try to make collisions when multiple clients want to use the same device less likely, by sleeping a random time on collision. The loop device allocation protocol is inherently collision prone: first, a program asks which is the next free loop device, then it tries to acquire it, in a separate, unsynchronized setp. If many peers do this all at the same time, they'll likely all collide when trying to acquire the device, so that they need to ask for a free device again and again. Let's make this a little less prone to collisions, reducing the number of failing attempts: whenever we notice a collision we'll now wait short and randomized time, making it more likely another peer succeeds. (This also adds a similar logic when retrying LOOP_SET_STATUS64, but with a slightly altered calculation, since there we definitely want to wait a bit, under all cases)
| * dissect: retrigger devices if we missed ueventsLennart Poettering2020-10-221-1/+85
| | | | | | | | | | | | | | | | On systems that have a udev before a7fdc6cbd399acdb1a975a7f72b9be4504a38c7c uevents would sometimes be eaten because of device node collisions that caused the ruleset to fail. Let's add an (ugly) work-around for this, so that we can even work with such an older udev.
| * udev-util: use absolute rather than relative timeout when waiting for devicesLennart Poettering2020-10-224-12/+17
| | | | | | | | This makes it easier to accurately wait for a overall deadline.
| * loop-util: if a loopback device we want to use still has partitions, do ↵Lennart Poettering2020-10-221-17/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | something about it On current kernels (5.8 for example) under some conditions I don't fully grok it might happen that a detached loopback block device still has partition block devices around. Accessing these partition block devices results in EIO errors (that also fill up dmesg). These devices cannot be claned up with LOOP_CLR_FD (since the main device already is officially detached), nor with LOOP_CTL_DELETE (returns EBUSY as long as the partitions still exist). This is a kernel bug. But it appears to apply to all recent kernels. I cannot really pin down what triggers this, suffice to say our heavy-duty test can trigger it. Either way, let's do something about it: when we notice this state we'll attach an empty file to it, which is guaranteed to have to part table. This makes the partitions go away. After closing/reoping the device we hence are good to go again. ugly workaround, but I think OK enough to use. The net result is: with this commit, we'll guarantee that by the time we attach a file to the loopback device we have zero kernel partitions associated with it. Thus if we then wait for the kernel partitions we need to appear we should have entirely reliable behaviour even if loopback devices by the name are heavily recycled and udev events reach us very late. Fixes: #16858
| * dissect-image: rework how we wait for partitionsLennart Poettering2020-10-221-131/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we'd just wait for the first moment where the kernel exposes the same numbre of partitions as libblkid tells us. After that point we enumerate kernel partitions and look for matching libblkid partitions. With this change we'll instead enumerate with libblkid only, and then wait for each kernel partition to show up with the exact parameters we expect them to show up. Once that happens we are happy. Care is taken to use the udev device notification messages only as hint to recheck what the kernel actually says. That's because we are otherwise subject to a race: we might see udev events from an earlier use of a loopback device. After all these devices are heavily recycled. Under the assumption that we'll get udev events for *at least* all partitions we care about (but possibly more) we can fix the race entirely with one more fix coming in a later commit: if we make sure that a loopback block device has zero kernel partitions when we take possession of it, it doesn't matter anymore if we get spurious udev events from a previous use. All we have to do is notice when the devices we need all popped up.
| * dissect-image: wait for udev device to be initialized earlyLennart Poettering2020-10-221-20/+24
| | | | | | | | | | If we allocate the sd_device early we can already use it as path when looking at whole-device fs images.
| * loop-util: LOOP_CLR_FD is async, don't retry to reuse a device right after ↵Lennart Poettering2020-10-221-39/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | issuing it When we fall back to classic LOOP_SET_FD logic in case LOOP_CONFIGURE didn't work we issue LOOP_CLR_FD first. But that call turns out to be potentially async in the kernel: if something else (let's say udev/blkid) is accessing the device the ioctl just sets the autoclear flag and exits. Hence quite often the LOOP_SET_FD will subsequently fail. Let's avoid the trouble, and immediately exit with EBUSY if LOOP_CONFIGURE fails, and but remember that LOOP_CONFIGURE is not available so that on the next iteration we go directly for LOOP_SET_FD instead.
| * loop-util: handle EAGAIN on LOOP_SET_STATUS64Lennart Poettering2020-10-221-4/+36
| | | | | | | | | | | | | | | | | | Since https://github.com/torvalds/linux/commit/5db470e229e22b7eda6e23b5566e532c96fb5bc3 (i.e. kernel 5.0) changing the .lo_offset field via LOOP_SET_STATUS64 might result in EAGAIN. Let's handle that. Fixes: #16858
* | Merge pull request #17417 from anitazha/more_systoomdZbigniew Jędrzejewski-Szmek2020-10-238-3/+175
|\ \ | | | | | | More systemd-oomd tweaks
| * | oomd: make start up swap check more robustAnita Zhang2020-10-221-2/+13
| | |
| * | test: add basic memory pressure extended test for oomdAnita Zhang2020-10-226-0/+161
| | | | | | | | | | | | | | | Simple test to generate a lot of pressure in one unit and assert that systemd-oomd kills the right one.
| * | oomd: use ERRNO_IS_NOT_SUPPORTED and ERRNO_IS_PRIVILEGEAnita Zhang2020-10-211-1/+1
| | |
* | | Merge pull request #17185 from yuwata/ethtool-updateZbigniew Jędrzejewski-Szmek2020-10-232-17/+190
|\ \ \ | | | | | | | | ethtool: add several link modes
| * | | ethtool: add several new link modesYu Watanabe2020-09-281-0/+23
| | | |
| * | | ethtool: convert underscore to hyphenYu Watanabe2020-09-281-15/+15
| | | |
| * | | shared/linux: update ethtool.hYu Watanabe2020-09-281-2/+152
| | | |
* | | | Merge pull request #17357 from yuwata/network-dhcp6-pd-announce-17353Yu Watanabe2020-10-2312-170/+294
|\ \ \ \ | | | | | | | | | | network: add an option to control announcement of delegated prefix
| * | | | test-network: use new IPv6SendRA= settingYu Watanabe2020-10-192-3/+3
| | | | |
| * | | | man: update documents about IPv6 RA and DHCPv6-PDYu Watanabe2020-10-191-29/+49
| | | | |
| * | | | fuzz: move DNSDefaultRoute= setting to [Network] sectionYu Watanabe2020-10-191-1/+1
| | | | |
| * | | | network: rename IPv6PrefixDelegation= to IPv6SendRA=Yu Watanabe2020-10-195-16/+78
| | | | |
| * | | | network: introduce Announce= in [DHCPv6PrefixDelegation]Yu Watanabe2020-10-195-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When disabled, the delegated prefixes are not emit by RA. Closes #17353.
| * | | | network: introduce DHCPv6PrefixDelegation= settingYu Watanabe2020-10-196-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | Then, the link can configure prefix delegated by DHCPv6 without emitting RA.