1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-25 23:21:33 +03:00
Commit Graph

5889 Commits

Author SHA1 Message Date
Lennart Poettering
04955f7c61
Merge pull request #18694 from keszybz/links-and-syntax-highlighting
Links and syntax highlighting
2021-02-19 15:27:41 +01:00
Zbigniew Jędrzejewski-Szmek
3d81e41190
Merge pull request #18646 from yuwata/network-ip-masquerade-follow-ups
network: several follow-ups for recent IPMasquerade= change
2021-02-19 12:43:37 +01:00
Zbigniew Jędrzejewski-Szmek
d80961720c man: fix links to various pages
nss-dns doesn't have any man page that I could find.
2021-02-19 09:28:13 +01:00
Yu Watanabe
b480543cf0 tree-wide: fix typo 2021-02-19 07:56:22 +01:00
Yu Watanabe
4c72d851cd network: warn when any positive boolean string is specified for IPMasquerade=
Previously, any positive boolean string for IPMasquerade= enables only IPv4
masquerade. The commit 48ed276647 adds
IPv6 masquerade support. However, only "yes" is handled as "ipv4", and other
positive boolean strings are handled as "both".

This makes all positive boolean strings considered as "ipv4", warn that they
are deprecated, and suggest to use "ipv4" or "both".

Follow-up for 48ed276647.
2021-02-19 14:24:10 +09:00
Yu Watanabe
5be5d1f2a1
Merge pull request #18659 from poettering/permyriadification
use scaling relative to UINT32_MAX instead of percentages/permyriads wherever we can
2021-02-19 14:22:10 +09:00
Zbigniew Jędrzejewski-Szmek
09db71a4a3 Recommend drop-ins over modifications to the main config file
As discussed in https://github.com/systemd/systemd/pull/18347.
2021-02-19 14:05:42 +09:00
Lennart Poettering
d06e7fb532 oomd: increase accuracy of SwapUsedLimit= to permyriads too
oomd.conf has two parameters with fractionals: SwapUsedLimit= and
DefaultMemoryPressureLimit=, but one accepts permyriads, the other only
percentages, for no apparent reason. One carries the "Percent" in the
name, the other doesn't.

Let's clean this up: always accept permyriads, and drop the suffix,
given that it is misleading.

I figure we should internally try to focus on scaling everything
relative to UINT32_MAX, and if that isn't in the cards at least 10000,
but never permille nor percent unless there's a really really good
reason for it (e.g. interface defined by someone else).
2021-02-18 22:40:47 +01:00
Lennart Poettering
d9d3f05def core: use our usual UINT32_MAX scaling for OOMD limits
So far OOMD limits used permyriads, as an upgrade from the original
percent.

The rest of our codebase typically scales stuff relative to UINT32_MAX.
Let's clean this up, an make sure this happens here too. This is
particularly relevant, as this is exposed in unit files and API, and
before we mark this stable we should get the APIs right.
2021-02-18 22:39:37 +01:00
Yu Watanabe
38ba3da0a1 network: rename UseFQDN= -> UseHostname=
Prompted by
https://github.com/systemd/systemd/pull/18543#issuecomment-780798451.
2021-02-18 21:47:37 +01:00
Дамјан Георгиевски
95aa3937da man: Rename duplicate Credentials section name
A "Credentials" section name in systemd.exec man page was used
both for User/Group and for actual credentials support in systemd.

Rename the first instance to "User/Group Identity"
2021-02-18 15:40:47 +01:00
Susant Sahani
d75bf6cfe2 network: Add "route_localnet" sysctl support 2021-02-18 21:04:17 +09:00
Richard Laager
f542f3b2ed Remove outdated disable_ipv6 docs
This was changed in commit 482efedc08,
which was released in v243, to only enable and never disable IPv6.

Signed-off-by: Richard Laager <rlaager@wiktel.com>
2021-02-18 16:51:27 +09:00
Lennart Poettering
dc288ffeab
Merge pull request #18596 from keszybz/systemctl-quiet-legend
systemctl: hide legends with --quiet, allow overriding
2021-02-17 23:40:04 +01:00
Zbigniew Jędrzejewski-Szmek
6906da2692 systemctl: hide legends with --quiet, allow overriding
--no-legend is replaced by --legend=no.

--quiet now implies --legend=no, but --legend=yes may be used to override that.
--quiet controls hints and warnings and such, and --legend controls just the
legends. I think it makes sense to allow both to controlled independently, in
particular --quiet --legend makes sense when using systemctl in a script to
provide some user-visible output.

Fixes #18560.
2021-02-17 21:09:14 +01:00
Yu Watanabe
26ff450550 man: update explanations of settings in [NextHop] section 2021-02-17 15:55:37 +09:00
Giedrius Statkevičius
68337e55f6 condition: add CPUFeature
Taking a stab at implementing #14479.

Add {Condition,Assert}CPUFeature to `systemd-analyze` & friends. Implement it
by executing the CPUID instruction. Add tables for common x86/i386
features.

Tested via unit tests + checked that commands such as:

```bash
systemd-analyze condition 'AssertCPUFeature = rdrand'
```

Succeed as expected and that commands such as

```bash
systemd-analyze condition 'AssertCPUFeature = foobar'
```

Fail as expected. Finally, I have amended the `systemd.unit` manual page
with the new condition and the list of all currently supported flags.
2021-02-17 15:31:29 +09:00
Lennart Poettering
b1b4e9204c
Merge pull request #18007 from fw-strlen/ipv6_masq_and_dnat
Support ipv6 for masquerade and dnat in nspawn and networkd
2021-02-16 23:41:35 +01:00
Lennart Poettering
696e5a8a73 man: make clear that sd-journal notifications always come with extra latency
Replaces: #17699
2021-02-16 22:16:17 +01:00
Yu Watanabe
ccb4072e21 man: fix indentation 2021-02-16 17:59:21 +01:00
Lennart Poettering
018b642a98 resolvectl: clarify IDNA and search path logic in combination with "resolvectl query --type="
When low-level RR resolution is requested from "resolvectl query" via
"--type=" or "--class=" no search domain logic is applied and no IDNA
translation.

Explain this in detail in the documentation, and also mentions this when
users attempt to resolve single-label names or names with international
characters in the output.

I believe the current behaviour is correct, but it is indeed surprising.
Hence the documentation and output improvement.

Fixes: #11325 #10737
2021-02-16 09:51:17 +01:00
Zbigniew Jędrzejewski-Szmek
e557c82dd5
Merge pull request #18571 from bluca/portable_dbus_doc
portable: use helpers for DBUS registration and document DBUS interface
2021-02-16 08:30:27 +01:00
Zbigniew Jędrzejewski-Szmek
8f50eb04ac
Merge pull request #18481 from keszybz/rpm-restart-post-trans
Restart units after the rpm transaction
2021-02-16 08:25:49 +01:00
Luca Boccassi
23e5c8d296 portabled: add DBUS documentation 2021-02-15 21:34:00 +00:00
Zbigniew Jędrzejewski-Szmek
c9615f7352 systemctl: add "reload-or-restart --marked"
This is almost equivalent to 'busctl call-method org.freedesktop.systemd1
/org/freedesktop/systemd1 org.freedesktop.systemd1.Manager EnqueueMarkedJobs',
but waits for the jobs to finish.
2021-02-15 20:49:14 +01:00
Zbigniew Jędrzejewski-Szmek
70666e28a1 core: add EnqueueMarkedJobs method to reload/restart marked units
We support two return types for methods that start jobs. EnqueueJob support the
full-monty mode with affected jobs. I didn't do this here, since it seems
unlikely to be used. In the common case there'd be a huge list of jobs and
affected jobs. EnqueueMarkedJobs() just returns a list of jobs that we can wait
upon.

The name of the method is generic in case we decide to add something other than
just reload/restart later on.

When errors occur, resource errors are treated as fatal, but for other error
types we queue up other jobs, and only return an error at the end. The
assumption is that the caller will ignore the result error anyway, so it's
better to try to reload/restart as much as possible.
2021-02-15 20:49:14 +01:00
Zbigniew Jędrzejewski-Szmek
ff68472a20 core: add Unit.Markers property
The property is never set by systemd, only reset after a stop or restart or
reload. It may externally be set to mark the unit for a later restart/reload.

I wasn't sure whether to configure the property only for the types where this
makes sense (Service, Swap, etc). But Restart() method is defined on the unit,
and also having this always under the same property name is more convenient.
2021-02-15 20:49:14 +01:00
Lennart Poettering
458ab40f35
Merge pull request #18580 from keszybz/signal-list
Add systemctl --signal=list
2021-02-15 14:37:03 +01:00
Zbigniew Jędrzejewski-Szmek
97ab9dfc0d systemctl,loginctl,machinectl: add --signal=list
This lists numerical signal values:
$ systemctl --signal list
SIGNAL NAME
1      SIGHUP
2      SIGINT
3      SIGQUIT
...
62     SIGRTMIN+28
63     SIGRTMIN+29
64     SIGRTMIN+30

This is useful when trying to kill e.g. systemd with a specific signal number
using kill. kill doesn't accept our fancy signal names like RTMIN+4, so one
would have to calculate that value somehow. Doing
  systemctl --signal list | grep -F RTMIN+4
is a nice way of doing that.
2021-02-15 08:50:40 +01:00
Lennart Poettering
d711322c13 resolvectl: add support for various new flags 2021-02-15 10:47:41 +09:00
Zbigniew Jędrzejewski-Szmek
86beb21302 systemctl,loginctl,machinectl: use a shared helper for arg_signal
I seems frivolous to yet another two -util.[ch] files, but the helper
should be in shared/ and it doesn't seem to fit anywhere else.
2021-02-14 15:59:09 +01:00
Zbigniew Jędrzejewski-Szmek
b3c57df0f5
Merge pull request #18401 from anitazha/oomdxattr
oomd: implement avoid/omit support for cgroups
2021-02-13 10:00:31 +01:00
Anita Zhang
d8a4d64bc3 man: document ManagedOOMPreference= 2021-02-12 12:46:22 -08:00
Zbigniew Jędrzejewski-Szmek
63ab06c4d2 sd-bus: extend sd_bus_message_read_strv() to paths and signatures
It's rather convenient to be able to read all three types with this function.
Strictly speaking this change is not fully compatible, in case someone was
relying on sd_bus_message_read_strv() returning an error for anything except
"as", but I hope nobody was doing that.
2021-02-12 11:36:24 +01:00
Vinnie Magro
f963f8953d networkd: add UseFQDN option for DHCPv6
Similar to DHCPv4's UseHostname option, add a UseFQDN config option in
[DHCPv6] to set the system's transient hostname if the FQDN option is
set in the DHCPv6 response from the server.
2021-02-11 13:30:04 +09:00
Luca Boccassi
e26fe5f911 portable: add 'reattach' verb and DBUS interface
Add 'reattach' verb to portablectl, and corresponding DBUS interface
to systemd-portabled.
Takes the same parameters as 'attach', but it will do a 'detach' (and
it will refuse to proceed if it cannot be done) first, matching on
the unversioned prefix of the new image. Eg:

portablectl reattach /tmp/foo_2.raw

will cause foo_1.raw to be detached, and foo_2.raw to be attached.

The key difference with a manual 'detach old' plus 'attach new' is that
the running units are not disturbed until after the attach completed,
and if --now is passed they are then restarted.
A 'detach' is not allowed normally if the units are running.

By using a restart-after-deploy method, 'reattach' allows for minimal
interruption of service and also for features that only work on restart
(eg: file descriptor store) to work as intended.

The DBUS interface returns two lists: first the removals from the detach
that were not immediately re-added in the attach, so that the caller
can stop the relevant units, and then the list of additions that are
either new or updates, so that the caller can restart/enable the
relevant units. portablectl already implements this with the existing
--now/--enable switches.
2021-02-10 19:07:36 +00:00
Lennart Poettering
bbd86b72f1 man: document new coredumpctl features 2021-02-10 12:22:03 +01:00
Zbigniew Jędrzejewski-Szmek
ad22e7cf5c
Merge pull request #18375 from yuwata/cli-tools-also-read-kernel-command-line
tree-wide: make CLI tools also read kernel command line when run as service
2021-02-08 11:45:42 +01:00
Julia Cartwright
afe6a9c48e man: fix misspellings of "NameSeviceSwitch"
Fixup NameSeviceSwitch -> NameServiceSwitch spelling error in
documentation.

Found through inspection of documentation.
2021-02-06 00:00:44 +00:00
Lennart Poettering
cb3363ef7a
Merge pull request #18318 from yuwata/network-route-table-name
network: RouteTable= improvements
2021-02-05 18:08:56 +01:00
Lennart Poettering
ca9fab8896 Revert "resolvectl: Add show-multicast verb to show discovered LLMNR/mDNS hosts" 2021-02-05 09:23:05 +09:00
Yu Watanabe
7bac23e8af man: fix typo 2021-02-04 19:17:50 +01:00
Zbigniew Jędrzejewski-Szmek
a7a1887869 man: reword the description of "main conf file"
While not really "wrong", the text we had could use a little editing.

Fixes #18458.
2021-02-04 14:32:28 +01:00
Zbigniew Jędrzejewski-Szmek
3d0112878f
Merge pull request #18444 from anitazha/proprename
oom: parse properties with 1/10000 precision instead of 1/100
2021-02-04 12:53:10 +01:00
Zbigniew Jędrzejewski-Szmek
5623600c6e
Merge pull request #18355 from DaanDeMeyer/resolved-discover
resolvectl: Add show-multicast verb to show discovered LLMNR/mDNS hosts
2021-02-04 10:37:21 +01:00
Yu Watanabe
face9fcc16 network,udev: move TransmitQueues=/ReceiveQueues= from .network to .link
As the settings are mostly hardware setup, and merely see from network
layer.

See also discussions in
https://github.com/systemd/systemd/pull/18170#issuecomment-758807497
https://github.com/orgs/systemd/teams/systemd/discussions/1
2021-02-03 14:44:51 +09:00
Yu Watanabe
1f8dc96c06 udev: rename TxQueueLength= -> TransmitQueueLength=
As we usually (unfortunately not always though) do not use abbreviations.

Tx may be standard abbreviation, but we already have e.g.
TransmitChecksumOffload=. So, let's use Transmit instead of Tx.

Follow-up for ef4a91a7e8.
2021-02-03 14:43:49 +09:00
Yu Watanabe
310eff7274 network: make RouteTable= setting can take multiple name:number pairs in a line
Follow-up for c038ce4606.
2021-02-03 14:32:26 +09:00
Anita Zhang
0a9f93443b oom: rework *MemoryPressureLimit= properties to have 1/10000 precision
Requested in
https://github.com/systemd/systemd/pull/15206#discussion_r505506657,
preserve the full granularity for memory pressure limits (permyriad)
instead of capping out at percent.
2021-02-02 17:52:48 -08:00
Zbigniew Jędrzejewski-Szmek
7e215af765 man: move content from the wiki to systemd.preset(5)
The wiki was slightly stale, and almost all the information there
was already present in the man page. I moved the remaing part (discussion)
into the man page and adjusted all links to point to the man page instead.

daemon(7) has a some examples of packaging scriptlets… I don't think it fits
there very well. Most likely they should be moved to systemd.preset(5) or maybe
even removed, but I'm leaving that for later.
2021-02-02 14:20:23 +01:00