Commit Graph
36053 Commits
Author SHA1 Message Date
Yu Watanabe e5a7570188 Merge pull request #21226 from yuwata/network-tc-cake
network: add several CAKE settings
2021-11-09 14:18:41 +09:00
Yu Watanabe 2c7b14fa19 Merge pull request #21268 from yuwata/network-ndisc-use-gateway
network: ndisc: introduce UseGateway= and UseRoutePrefix=
2021-11-09 11:33:21 +09:00
Yu Watanabe 1c7a81e626 network: tc/cake: introduce UseRawPacketSize= setting 2021-11-09 10:58:44 +09:00
Yu Watanabe 35896db489 network: tc/cake: introduce SplitGSO= setting 2021-11-09 10:58:44 +09:00
Yu Watanabe d05dce95d8 network: tc/cake: introduce Wash= setting 2021-11-09 10:58:44 +09:00
Yu Watanabe 049b66ccdd network: tc/cake: introduce FirewallMark= setting 2021-11-09 10:58:44 +09:00
Yu Watanabe fe8e156e7a network: tc/cake: introduce PriorityQueueingProfile= setting 2021-11-09 10:58:44 +09:00
Yu Watanabe 863542e1ce network: tc/cake: introduce MPUBytes= setting 2021-11-09 10:58:44 +09:00
Yu Watanabe 4bff808648 network: tc/cake: introduce NAT= setting 2021-11-09 10:58:44 +09:00
Yu Watanabe a049cf166c network: tc/cake: introduce FlowIsolationMode= setting 2021-11-09 10:58:44 +09:00
Yu Watanabe b6eccfda1a network: tc/cake: introduce CompensationMode= setting 2021-11-09 10:58:44 +09:00
Yu Watanabe 3a86a31e0c network: tc/cake: do not pass 0 if OverheadBytes= is not specified 2021-11-09 10:58:44 +09:00
Yu Watanabe 025cd94e1c network: tc/cake: introduce AutoRateIngress= setting 2021-11-09 10:58:44 +09:00
Yu Watanabe fb076d5f6c sd-netlink: add more attributes for CAKE 2021-11-09 10:58:44 +09:00
Yu Watanabe 0295b2fd1d netif-util: split net_get_unique_predictable_data() into two 2021-11-09 08:24:10 +09:00
Yu Watanabe 043b193f6e netif-util: rename net_get_name_persistent() -> net_get_persistent_name() 2021-11-09 08:24:10 +09:00
Yu Watanabe 4eef6fad31 netif-util: rename link_get_type_string() -> net_get_type_string() 2021-11-09 08:24:10 +09:00
Yu Watanabe b5cc5591fa netif-util: move several functions from network-util.[ch] to shared/netif-util.[ch]
These functions are not relevant to sd-network, and only used by
networkd, networkctl, and udevd.
2021-11-09 08:24:10 +09:00
Yu Watanabe 91961fff43 arphrd-util: introduce arphrd_to_hw_addr_len() 2021-11-09 08:24:10 +09:00
Yu Watanabe f09d20256a arphrd-util: rename arphrd-list.[ch] -> arphrd-util.[ch] 2021-11-09 08:24:10 +09:00
Yu Watanabe de0f157984 ether-addr-util: make hw_addr_is_null() return true also for all zero address
This fixes the following error:
---
systemd-networkd[1449490]: ip6tnl0: Saved hardware address: 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
systemd-networkd[1449490]: ip6tnl0: Failed to manage link by its new hardware address, ignoring: File exists
---
2021-11-09 08:20:51 +09:00
Yu Watanabe 1f86a3fe52 ether-addr-util: introduce several helper functions 2021-11-09 08:20:51 +09:00
Yu Watanabe 610c0db126 network: ndisc: introduce UseGateway= and UseRoutePrefix= settings
Closes #21263.
2021-11-09 08:12:36 +09:00
Yu Watanabe ad0b2df635 network: ndisc: do not read DNSSL option when UseDomains=no
Previously, the following confing did not work:
```
[IPv6AcceptRA]
UseDNS=no
UseDomains=yes
```
2021-11-09 08:09:48 +09:00
Yu Watanabe fbdda4bb53 network: ndisc: split out prefix option handling into ndsic_router_process_prefix() 2021-11-09 08:09:04 +09:00
Lennart Poettering 18e94a40b8 userwork: make sure to return correct errors when service is not specified correctly
Fixes: #21215 #21222
2021-11-08 21:42:53 +01:00
Lennart Poettering 790e3ed3cc userdbctl: always show summary after printing table (unless legend is off)
We do this in many (most?) other tools, do so here too. It's quite
useful info to count users/groups/…
2021-11-08 21:40:30 +01:00
Lennart Poettering 4083d825e9 userdbctl: add a switch for explicitly enabling/disabling multiplexer-based lookups
This is incredibly useful for debugging.
2021-11-08 21:40:30 +01:00
Lennart Poettering e032cbd591 userdbctl: make JSON output mode details configurable like in the other tools
Let's add --json= with the same parser as in the other tools, and honour
it.
2021-11-08 21:40:30 +01:00
Lennart Poettering 0595ff1680 userdbctl: explicitly handle ESRCH/ENOLINK from userdb_all()
Similar in style to previous commit, let's handle these two errors
properly, i.e. as equivalent to no entries found. Let's debug log about
them, to make things either to deal with when debugging (after all
userdbctl to a large degree are debugging tools).
2021-11-08 21:40:30 +01:00
Lennart Poettering e908961d2e userwork: properly handle ENOLINK error from lower-level userdb code
The lower-level userdb code will return ENOLINK if varlink lookups are
disabled explicitly and we couldn#t find an answer any other way. Let's
not propagate this to clients, since they don't have control over this
feature anyway: we decide internally when to disable varlink lookups
(e.g. if DropIn lookups are requested we disable them) and to the client
side that should not be visible: if we can't find a record with the
flags we pick then we should report then we can't find any, and that's
it.

Fixes: #21223
2021-11-08 21:40:30 +01:00
Zbigniew Jędrzejewski-Szmek e2de2d28f4 Merge pull request #20813 from unusual-thoughts/exittype_v2
Reintroduce ExitType
2021-11-08 15:06:37 +01:00
Albert Brox da845dabf5 implement aliasing for systemd-analyze verify 2021-11-08 12:08:23 +00:00
Christian Brauner a6d1760024 build: preserve correct mode when generating files via jinja2
When using "capture : true" in custom_target()s the mode of the source
file is not preserved when the generated file is not installed and so
needs to be tweaked manually. Switch from output capture to creating the
target file and copy the permissions from the input file.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-11-08 12:06:48 +00:00
Henri Chain e83a422797 Use ExitType=cgroup for autostart generated services
This fixes a bug[1] with some generated autostart app services which
fork and exit immediately after main application process start,
that caused them not to launch during session startup, as the entire
cgroup was immediately killed by systemd.

This can also happen with apps such as file browsers, whose initial
process will exit after the window is closed, but who intend to leave a
daemon child running.

Since the forking model of a .desktop application cannot be known at
service generation time otherwise, ExitType=cgroup is the only effective
way to fix this bug.

[1] https://bugs.kde.org/show_bug.cgi?id=433299
2021-11-08 10:15:24 +01:00
Henri Chain 596e447076 Reintroduce ExitType
This introduces `ExitType=main|cgroup` for services.
Similar to how `Type` specifies the launch of a service, `ExitType` is
concerned with how systemd determines that a service exited.

- If set to `main` (the current behavior), the service manager will consider
  the unit stopped when the main process exits.

- The `cgroup` exit type is meant for applications whose forking model is not
  known ahead of time and which might not have a specific main process.
  The service will stay running as long as at least one process in the cgroup
  is running. This is intended for transient or automatically generated
  services, such as graphical applications inside of a desktop environment.

Motivation for this is #16805. The original PR (#18782) was reverted (#20073)
after realizing that the exit status of "the last process in the cgroup" can't
reliably be known (#19385)

This version instead uses the main process exit status if there is one and just
listens to the cgroup empty event otherwise.

The advantages of a service with `ExitType=cgroup` over scopes are:
- Integrated logging / stdout redirection
- Avoids the race / synchronisation issue between launch and scope creation
- More extensive use of drop-ins and thus distro-level configuration:
  by moving from scopes to services we can have drop ins that will affect
  properties that can only be set during service creation,
  like `OOMPolicy` and security-related properties
- It makes systemd-xdg-autostart-generator usable by fixing [1], as obviously
  only services can be used in the generator, not scopes.

[1] https://bugs.kde.org/show_bug.cgi?id=433299
2021-11-08 10:15:23 +01:00
Dan Streetman bf47f71c1c test: refactor test-procfs-util for clarity and skip test on perm failure
After commit c3dead53d5 the test can fail
if the procfs file(s) aren't writable, because the check for permission
failure happens after a call that will never fail, since setting the
limit to the existing limit will always pass.

This also refactors the function slightly to make the test var names
clearer.
2021-11-08 08:37:08 +01:00
Luca Boccassi 5df64f148d Merge pull request #21237 from bluca/analyze_skip
analyze: allow a custom policy to skip a check
2021-11-06 11:19:40 +00:00
Lennart Poettering 0cdb32ef52 Merge pull request #21171 from DaanDeMeyer/tty-dimensions
exec: Add TTYRows and TTYColumns properties to set TTY dimensions
2021-11-06 10:16:45 +01:00
Lennart Poettering 84f261853c user-record: show CIFS extra mount options, in output too
Follow-up for 4c2ee5c7f2
2021-11-06 00:27:34 +01:00
xdavidwu 0cfb0971f0 coredump: fix filename in journal when not compressed
Since 587f2a5e56, filename for
not-compressed coredump is missing from save_external_coredump, making
it write COREDUMP_FILENAME= (empty) in journal, making `coredumpctl`
report it missing but it is actually saved.
This fixes it.
2021-11-05 22:47:16 +00:00
Luca Boccassi 82100ef486 analyze: allow a custom policy to skip a check with weight=0
In some cases an offline analysis should ignore some fields, for example
a portable service in an image will never list RootImage/RootDirectory, as
they are added at runtime, and thus can be skipped.
2021-11-05 22:37:34 +00:00
Daan De Meyer 51462135fb exec: Add TTYRows and TTYColumns properties to set TTY dimensions 2021-11-05 21:32:14 +00:00
Jan Janssen ad102dd09a sd-boot: Add .osrel section
This allows starting systemd-boot from \EFI\Linux for easier testing
and bisection without risking an unbootable system as the user does not
need to replace their working loader.
2021-11-05 22:11:43 +01:00
Lennart Poettering 874cbf675d Merge pull request #21252 from poettering/homed-record-dir-env-var
homed: add env var to override dir where we fine stored user records
2021-11-05 21:52:00 +01:00
Lennart Poettering 7cdd5c0d4c user-record: fix display of access mode 2021-11-05 21:37:45 +01:00
Lennart Poettering 30df35869c user-record: show fs/luks/gpt UUIDs as proper UUIDs
These are not defined by us, but are defined as proper UUIDs by their
respective specs, hence show them as such.
2021-11-05 21:37:20 +01:00
Lennart Poettering 005daeed2b homed: add env var to override dir where we fine stored user records
This adds an env var which we can use to redirect where homed stores and
looks for user records kept on the host. This is useful for debugging
purposes so that one can easily run another homed instnce that doesn't
interfere with the main instance.
2021-11-05 18:35:28 +01:00
Jan Janssen d874a13efc test: Add test for flag macros 2021-11-05 16:27:41 +01:00
Luca Boccassi 8389fd19d2 Merge pull request #20138 from keszybz/coding-style-variable-decls
A coding style tweak and checking of sd_notify() calls and voidification of pager_open()
2021-11-05 13:57:30 +00:00