summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert "core: Propagate condition failed state to triggering units."Daan De Meyer2021-12-1713-72/+28
| | | | This reverts commit 12ab94a1e4961a39c32efb60b71866ab588d3ea2.
* test: adjust MemoryHigh= on oomd extended test unitsAnita Zhang2021-12-173-2/+3
| | | | | | | | | | | | | | | | On some runs `sleep infinity` run by the user manager uses over 3M of memory, which is higher than the MemoryHigh= set on testbloat and testmunch. If no pgscan is generated, then systemd-oomd sorts by memory usage which leads to a situation where testchill (using 3M) could be targeted over testbloat (1M-2M). Fix this by setting reasonable MemoryHigh= values for all of these test units. Even if somehow testchill throttles a bit at 3M, testbloat and testmunch should still be trying to use over 100M at memory and will throttle down to 5M and 6M with the new values. This should reflect the desired state in pgscan and memory usage during the test run. Fixes #21684
* kernel-install: replace 00-entry-directory with K_I_LAYOUT in k-iнаб2021-12-177-70/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 341890de866f2ee34919a47ce3fc6c8cd3c1924c made "bootctl install" create ESP\MID, in preparation of cf73f650890b56a59bfb713c4c82b4e29daa7316 that followed it and created 00-entry-directory.install to make ESP\MID\KVER if ESP\MID existed ‒ this meant that "bootctl install" followed by "kernel-install $(uname -r) /boot/vml*$(uname -r) /boot/ini*$(uname -r)" actually installed the kernel correctly. Later, 31e57550b552e113bd3d44355b237c41e42beb58 reverted the first commit, meaning, that now running those two commands first installs sd-boot, but then does nothing. Everything appears to work right, nothing errors out, but no changes are actually done. To the untrained eye (all of them), even running with -v appears to work: all the hooks are run, as is depmod, but, again, nothing happens. This is horrible. Nothing in either manpage suggests what to do (nor should it, really), but the user is left with a bootloader that appears fully funxional, since nothing suggests a failure in the output, but with an unbootable machine, /no way to boot it/, even if they drop to an EFI shell, since the boot bundle isn't present on the ESP, and no real recourse even if they boot into a recovery system, apart from installing like GRUB or whatever. 00- is purely instrumentation for 90-, and separating one from the other has led to downstream dissatisfaxion (indeed, the last mentioned commit cited cited exactly that as the reversion reason), while creating $ENTRY_DIR_ABS is only required for bootloaders using the BLS, and shouldn't itself toggle anything. To that end, introduce an /{e,l}/k/install.conf file that allows overriding the detected layout, and detect it as "bls" if $BOOT_ROOT/$MACHINE_ID ($ENTRY_DIR_ABS/..) exists, otherwise "other" ‒ if a user wishes to select a different bootloader, like GRUB, they (or, indeed, the postinst script) can specify layout=grub. This disables 90- and $ENTRY_DIR_ABS manipulation.
* logind: add a comment with a reminder why we don't use ProtrectProc=Luca Boccassi2021-12-171-0/+1
| | | | Follow-up for https://github.com/systemd/systemd/pull/21785
* logind: allow to read /procLudwig Nussel2021-12-171-1/+0
| | | | | User name and tty are used for wall messages. For that to work logind must be able to poke around in proc entries of other processes.
* network: dhcp: logs received 6rd optionYu Watanabe2021-12-171-9/+18
| | | | Addresses https://github.com/systemd/systemd/pull/21625#issuecomment-996109051.
* test: mark TEST-46-HOMED as skipped if feature is disabledMichael Biebl2021-12-161-1/+1
| | | | See https://github.com/systemd/systemd/pull/21253#issuecomment-995721856
* test: record missing openssl as a failureMichael Biebl2021-12-161-0/+7
| | | | | | | | | The openssl binary is an optional dependency. If systemd has been built with OpenSSL support, we want to test its OpenSSL functionality. So record a failure message in /failed if the binary is missing. See https://github.com/systemd/systemd/pull/21724#issuecomment-992707614
* NEWS: fix typoYu Watanabe2021-12-161-1/+1
|
* boot: fix typoYu Watanabe2021-12-161-1/+1
|
* Merge pull request #21786 from keszybz/dirent-workYu Watanabe2021-12-1679-332/+214
|\ | | | | Make FOREACH_DIRENT and FOREACH_DIRENT_ALL declare the iterator variables
| * meson: drop three more single-use convenience librariesZbigniew Jędrzejewski-Szmek2021-12-162-68/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way that the cryptsetup plugins were built was unnecessarilly complicated. We would build three static libraries that would then be linked into dynamic libraries. No need to do this. While at it, let's use a convenience library to avoid compiling the shared code more than once. We want the output .so files to be located in the main build directory, like with all consumable build artifacts, so we need to maintain the split between src/cryptsetup/cryptsetup-token/meson.build and the main meson.build file. AFAICT, the build artifacts are the same: exported and undefined symbols are identical. There is a tiny difference in size, but I think it might be caused by a different build directory name.
| * meson: drop convenience library that was only used in one placeZbigniew Jędrzejewski-Szmek2021-12-161-7/+1
| | | | | | | | | | | | | | | | | | | | | | | | It doesn't make much sense to do this, the result is very similar to including to objects directly in the output binary without going through an intermediate target. The linkage of test-libudev was rather strange too: udev_link_with is used to allow udev to be linked to a static version of libshared, so that udev is not linked to libshared.so. But here we were using both, defeating the purpose of udev_link_with. I don't think it matters what the test is linked to, so let's use the non-static linkage to save space.
| * meson: stop building out convenience libraries by defaultZbigniew Jędrzejewski-Szmek2021-12-1616-18/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The meson default for static_library() are: build_by_default=true, install=false. We never interact with the static libraries, and we only care about them as a stepping-stone towards the installable executables or libraries. Thus let's only build them if they are a dependency of something else we are building. While at it, let's drop install:false, since this appears to be the default. This change would have fixed the issue with lib_import_common failing to build too: we wouldn't attempt to build it. In practice this changes very little, because we generally only declare static libraries where there's something in the default target that will make use of them. But it seems to be a better pattern to set build_by_default to false.
| * meson: don't compile import sources four timesZbigniew Jędrzejewski-Szmek2021-12-162-55/+49
| | | | | | | | | | | | | | | | | | | | Use a 'convenience library' to do the compilation once and then link the objects into all the files that need it. Those files are small, so this probably doesn't matter too much for speed, but has the advantage that we don't get the same error four times if something goes wrong. The library is conditionalized in the same way importd itself, because we cannot build it without the deps.
| * Define FOREACH_DIRENT through FOREACH_DIRENT_ALLZbigniew Jędrzejewski-Szmek2021-12-1531-69/+18
| | | | | | | | As in the previous commit, 'de' is used as the iterator variable name.
| * tree-wide: make FOREACH_DIRENT_ALL define the iterator variableZbigniew Jędrzejewski-Szmek2021-12-1531-116/+71
| | | | | | | | | | | | | | | | | | The variable is not useful outside of the loop (it'll always be null after the loop is finished), so we can declare it inline in the loop. This saves one variable declaration and reduces the chances that somebody tries to use the variable outside of the loop. For consistency, 'de' is used everywhere for the var name.
* | Merge pull request #21736 from yuwata/network-cleanups-for-drop-foreign-configsYu Watanabe2021-12-163-13/+23
|\ \ | | | | | | network: cleanups for dropping foreign configs
| * | test-network: wait for veth99 being configuredYu Watanabe2021-12-161-5/+4
| | | | | | | | | | | | | | | As the address, which should be kept, may not be just removed yet. Let's check that the address is actually kept.
| * | network: route: link_drop_foreign_routes() must be called only for managed ↵Yu Watanabe2021-12-161-2/+3
| | | | | | | | | | | | interfaces
| * | networkd: check the existence of the routeYu Watanabe2021-12-161-0/+4
| | |
| * | network: address: minor optimization for link_drop_foreign_addresses()Yu Watanabe2021-12-161-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | link_address_is_dynamic() is costful in general. Call it only when KeepConfiguration= is set. Note, it is not necessary to check link->network in the loop, as we have the assertion for that in the beginning of the function.
| * | network: drop IPv6LL addresses manually configured in .network fileYu Watanabe2021-12-161-2/+5
| | |
* | | Merge pull request #21790 from keszybz/network-generator-alwaysLuca Boccassi2021-12-163-8/+13
|\ \ \ | | | | | | | | Enable systemd-network-generator by default
| * | | man: split out a paragraph and shorten the text about sd-network-generatorZbigniew Jędrzejewski-Szmek2021-12-161-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | The ordering of the service wrt. to udevd is enforced by unit configuration, so no need to tell the user about this. From users' POV, the only thing that counts is that the unit is enabled and then the right thing happens.
| * | | units: enable systemd-network-generator by defaultZbigniew Jędrzejewski-Szmek2021-12-162-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | It is used by udevd and networkd. Since udevd is enabled statically, let's also change the preset to "on". networkd is opt-in, so let's pull in the generator when enabling networkd too.
* | | | Merge pull request #21791 from mrc0mmand/TEST-64-tweaksFrantisek Sumsal2021-12-162-2/+8
|\ \ \ \ | |_|/ / |/| | | A couple of TEST-64-UDEV-STORAGE tweaks
| * | | test: bump the timeout when collecting test coverageFrantisek Sumsal2021-12-161-2/+6
| | | |
| * | | test: settle before checking logsFrantisek Sumsal2021-12-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise we might miss the "Device path too long" message: ``` [ 21.083274] testsuite-64.sh[374]: swapoff /dev/vda1 [ 21.089841] testsuite-64.sh[376]: ++ mktemp [ 21.095115] testsuite-64.sh[271]: + logfile=/tmp/tmp.a1MULA35wL [ 21.095115] testsuite-64.sh[271]: + journalctl -b -q --no-pager -o short-monotonic -p info --grep 'Device path.*vda.?'\'' too long to fit into unit name' ... [ 21.277360] systemd[1]: testsuite-64.service: Main process exited, code=exited, status=1/FAILURE [ 21.277508] systemd[1]: testsuite-64.service: Failed with result 'exit-code'. ... [ 21.323500] systemd[1]: Device path '/sys/devices/pci0000:00/0000:00:03.0/0000:01:00.0/0000:02:00.0/0000:03:00.0/0000:04:00.0/0000:05:00.0/0000:06:00.0/0000:07:00.0/0000:08:00.0/0000:09:00.0/0000:0a:00.0/0000:0b:00.0/0000:0c:00.0/0000:0d:00.0/0000:0e:00.0/0000:0f:00.0/0000:10:00.0/0000:11:00.0/0000:12:00.0/0000:13:00.0/0000:14:00.0/0000:15:00.0/0000:16:00.0/0000:17:00.0/0000:18:00.0/0000:19:00.0/0000:1a:00.0/virtio0/block/vda/vda1' too long to fit into unit name, ignoring device. ```
* | | | NEWS: update againZbigniew Jędrzejewski-Szmek2021-12-161-39/+65
| | | |
* | | | Merge pull request #21757 from DaanDeMeyer/boot-idZbigniew Jędrzejewski-Szmek2021-12-164-2/+41
|\ \ \ \ | | | | | | | | | | kernel-install: Introduce KERNEL_INSTALL_MACHINE_ID in /etc/machine-info
| * | | | kernel-install: Introduce KERNEL_INSTALL_MACHINE_ID in /etc/machine-infoDaan De Meyer2021-12-164-1/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If KERNEL_INSTALL_MACHINE_ID is defined in /etc/machine-info, prefer it over the machine ID from /etc/machine-id. If a machine ID is defined in neither /etc/machine-info nor in /etc/machine-id, generate a new UUID and try to write it to /etc/machine-info as KERNEL_INSTALL_MACHINE_ID and use it as the machine ID if writing it to /etc/machine-info succeeds. In practice, this means we have a more robust fallback if there's no machine ID in /etc/machine-id than just using "Default" and allows image builders to force kernel-install to use KERNEL_INSTALL_MACHINE_ID by simply writing it to /etc/machine-info themselves.
| * | | | kernel-install: Remove "Default" from list of suffixes checkedDaan De Meyer2021-12-151-1/+1
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | This was an undocumented change in behavior introduced by 9e82a74cb0f08a288f9db228a0b5bec8a7188cdb. Previously, we only checked for "Default" if we didn't find a machine ID. Let's make sure we keep the previous behavior intact.
* | | | Merge pull request #20559 from tomty89/stub_check_in_getZbigniew Jędrzejewski-Szmek2021-12-166-34/+46
|\ \ \ \ | |_|/ / |/| | | resolved: filter stub listeners in manager_get_dns_server()
| * | | resolved: filter out our own stub resolvers when parsing serversZbigniew Jędrzejewski-Szmek2021-12-155-23/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We get "upstream" dns server config from ~three places: /etc/resolv.conf, config files, and runtime config via dbus. With this commit, we'll filter out our own stub listeners if they are configured in either of the first two sources. For /etc/resolv.conf this is done quitely, and for our own config files, a LOG_INFO message is emitted, since this is a small inconsistency in the config. Setting loops like this over dbus is still allowed. The reason is that in the past we didn't treat this as an error, and if we were to start responding with an error, we could break a scenario that worked previously. E.g. NM sends us a list of servers, and one happens to be the our own. We would just not use that stub server before, but it'd still be shown in the dbus properties and such. We would have to return error for the whole message, also rejecting the other valid servers. I think it's easier to just keep that part unchanged. Test case: $ ls -l /etc/resolv.conf -rw-r--r-- 1 root root 57 Dec 15 10:26 /etc/resolv.conf $ cat /etc/resolv.conf nameserver 192.168.150.1 options edns0 trust-ad search . $ cat /etc/systemd/resolved.conf.d/stub.conf [Resolve] DNSStubListenerExtra=192.168.150.1 $ resolvectl ... Global resolv.conf mode: foreign DNS Servers: 192.168.150.1 Fallback DNS Servers: ... (with the patch): Global resolv.conf mode: foreign Fallback DNS Servers: ...
| * | | resolved: return immediately if we already know what to returnZbigniew Jędrzejewski-Szmek2021-12-151-10/+2
| | | |
| * | | resolved: filter stub listeners in manager_get_dns_server()Tom Yan2021-12-131-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 49ef064c8dcd8ed12d98e6c705e676babade0897 attempts to handle "stub loop" by switching to the next server *after the query has been made*. The approach may be good enough for link scopes. However, for the manager / global scope, it is not. First of all, there are more than one types (SYSTEM and FALLBACK) of servers it can use. Also, whether those of type FALLBACK should be used depends. Besides, dns_scope_good_domain() determines whether things should be routed to a scope by checking whether the scope has a server. The decision made would be incorrect if stubs were not filtered beforehand. Therefore, to avoid failing query unnecessarily, and to make sure that extra stub listeners will not trigger unexpected and/or inconsistent behavior, make manager_get_dns_server() do what it should have done.
* | | | Merge pull request #21766 from yuwata/network-generator-name-policyZbigniew Jędrzejewski-Szmek2021-12-1614-90/+256
|\ \ \ \ | | |_|/ | |/| | network-generator: support setting NamePolicy=
| * | | test: add testcases for net.ifname-policy= kernel command line argumentYu Watanabe2021-12-151-2/+18
| | | |
| * | | network-generator: support to set NamePolicy= through kernel command line ↵Yu Watanabe2021-12-155-20/+164
| | | | | | | | | | | | | | | | | | | | | | | | argument Closes #16296.
| * | | udev: move NamePolicy to netif-naming-scheme.[ch]Yu Watanabe2021-12-154-39/+42
| | | |
| * | | network-generator: support MAC address longer or shorter than ETH_ALENYu Watanabe2021-12-152-8/+14
| | | |
| * | | meson: build network-generator unconditionallyYu Watanabe2021-12-154-20/+17
| | | | | | | | | | | | | | | | The service also generates .link files for udevd.
| * | | unit: run network-generator before starting udevdYu Watanabe2021-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | Otherwise, .link files generated by the service may not be loaded by udevd.
* | | | Merge pull request #21784 from DaanDeMeyer/issue-21675Luca Boccassi2021-12-151-10/+13
|\ \ \ \ | | | | | | | | | | journal: Hole punching improvements
| * | | | journal: Stop reading in increments of block size during hole punchingDaan De Meyer2021-12-151-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's not try to be overly clever here. This code path is not overly performance sensitive and we should avoid trying to outsmart the kernel without proper benchmarking.
| * | | | journal: Use 16kb buffer during hole punchingDaan De Meyer2021-12-151-1/+2
| | | | | | | | | | | | | | | | | | | | Let's use the same buffer size as used in as copy.h.
| * | | | journal: Correctly advance offset when iterating hash table entriesDaan De Meyer2021-12-151-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pread() is not guaranteed to completely fill up the given buffer with data which we assumed until now. Instead, only increment the offset by the number of bytes that were actually read.
| * | | | journal: Add a minimum hole size for hole punchingDaan De Meyer2021-12-151-0/+5
| | |_|/ | |/| | | | | | | | | | | | | | Let's not bother punching extremely small holes to avoid unnecessary file fragmentation.
* | | | network: route: update commentYu Watanabe2021-12-151-3/+2
| | | |