Commit graph

3303 commits

Author SHA1 Message Date
Jan Synacek 0cde65e263 test-cpu-set-util.c: fix typo in comment (#6916) 2017-09-26 16:07:34 +02:00
Zbigniew Jędrzejewski-Szmek 1b7ac91f94 man: add missing verb in timedatectl(1) (#6896)
As noted by Michael Biebl.
2017-09-23 16:51:41 +02:00
Lennart Poettering b887cfa652 Merge pull request #6892 from keszybz/enablement-work
Fix various issues with enabled/disabled units
2017-09-23 12:44:49 +02:00
John Lin a195dd8e5a man: Requires= needs After= to deactivate "this unit" (#6869)
Fixes: #6856
2017-09-22 19:15:28 +02:00
Zbigniew Jędrzejewski-Szmek d9b4b48f3f install: consider non-Alias=/non-DefaultInstance= symlinks as "indirect" enablement
I think this matches the spirit of "indirect" well: the unit
*might* be active, even though it is not "installed" in the
sense of symlinks created based on the [Install] section.

The changes to test-install-root touch the same lines as in the previous
commit; the change in each case is from
   assert_se(unit_file_get_state(...) >= 0 && state == UNIT_FILE_ENABLED)
to
   assert_se(unit_file_get_state(...) >= 0 && state == UNIT_FILE_DISABLED)
to
   assert_se(unit_file_get_state(...) >= 0 && state == UNIT_FILE_INDIRECT)
in the last two commits.
2017-09-22 18:23:02 +02:00
Zbigniew Jędrzejewski-Szmek 5cd8ae3152 install: only consider names in Alias= as "enabling"
When a unit has a symlink that makes an alias in the filesystem,
but that name is not specified in [Install], it is confusing
is the unit is shown as "enabled". Look only for names specified
in Alias=.

Fixes #6338.

v2:
- Fix indentation.
- Fix checking for normal enablement, when the symlink name is the same as the
  unit name. This case wasn't handled properly in v1.

v3:
- Rework the patch to also handle templates properly:
  A template templ@.service with DefaultInstance=foo will be considered
  enabled only when templ@foo.service symlink is found. Symlinks with
  other instance names do not count, which matches the logic for aliases
  to normal units. Tests are updated.
2017-09-22 18:12:52 +02:00
Lennart Poettering 1c382774c5 man: document two more special units 2017-09-22 15:28:05 +02:00
Lennart Poettering 1180181a51 man: remove double newlines in systemd.special man page header
The <!-- --> comment lines resulted in double newlines in the man page
header, which looks quite ugly. Let's rearrange a bit so that these
comments don't result in changes in the output.
2017-09-22 15:28:05 +02:00
Lennart Poettering ee859930d3 man: drop misplaced "," before "-.slice" 2017-09-22 15:28:05 +02:00
Daniel Mack 8d8631d4c9 man: document the new ip accounting and filting directives 2017-09-22 15:24:55 +02:00
Lennart Poettering ec20fe5ffb journald: make maximum size of stream log lines configurable and bump it to 48K (#6838)
This adds a new setting LineMax= to journald.conf, and sets it by
default to 48K. When we convert stream-based stdout/stderr logging into
record-based log entries, read up to the specified amount of bytes
before forcing a line-break.

This also makes three related changes:

- When a NUL byte is read we'll not recognize this as alternative line
  break, instead of silently dropping everything after it. (see #4863)

- The reason for a line-break is now encoded in the log record, if it
  wasn't a plain newline. Specifically, we distuingish "nul",
  "line-max" and "eof", for line breaks due to NUL byte, due to the
  maximum line length as configured with LineMax= or due to end of
  stream. This data is stored in the new implicit _LINE_BREAK= field.
  It's not synthesized for plain \n line breaks.

- A randomized 128bit ID is assigned to each log stream.

With these three changes in place it's (mostly) possible to reconstruct
the original byte streams from log data, as (most) of the context of
the conversion from the byte stream to log records is saved now. (So,
the only bits we still drop are empty lines. Which might be something to
look into in a future change, and which is outside of the scope of this
work)

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=86465
See: #4863
Replaces: #4875
2017-09-22 10:22:24 +02:00
Zbigniew Jędrzejewski-Szmek 3ec530a189 timedatectl: be more explicit what "ntp synchronized" means
The documentation explained that the message doesn't really mean what it says,
but I think it's better to just make the message more straightforward.

Fixes #6554.
2017-09-21 16:16:45 +02:00
Lennart Poettering 70b089d7dc Merge pull request #6847 from keszybz/disable-enable-generators
Disable and optionally again enable generators in test mode
2017-09-20 19:51:44 +02:00
Zbigniew Jędrzejewski-Szmek 641c0fd14e analyze-verify: add --generators switch to enable generators again 2017-09-19 20:14:22 +02:00
Susant Sahani 983226f35a networkd: route - support unicast,blackhole,unreachable and prohibited (#6861)
Resolves issues #797 and #967.

Conf

```
[Route]
Type=blackhole
Destination=202.54.1.2
```

ip route

```
blackhole 202.54.1.2 proto static
2017-09-19 16:28:26 +02:00
Ivan Kurnosov 54d3be9772 Added docs for new timezone support added at #6788 (#6865) 2017-09-19 11:23:34 +02:00
Susant Sahani ffa69a04be systemd-link: Add support to configure tx-tcp6-segmentation (#6859)
closes #6854

tcp-segmentation-offload: off
	tx-tcp-segmentation: off
	tx-tcp-ecn-segmentation: off [fixed]
	tx-tcp-mangleid-segmentation: off
	tx-tcp6-segmentation: off <==========================
2017-09-19 10:49:58 +02:00
Lennart Poettering c9f7fb0f3c Merge pull request #6855 from keszybz/more-docs
More docs
2017-09-19 10:38:40 +02:00
Dimitri John Ledkov 22043e4317 networkd: change UseMTU default to true. (#6837)
Typically when DHCP server sets MTU it is a lower one. And a lower than usual
MTU is then thus required on said network to have operational networking. This
makes networkd's dhcp client to work in more similar way to other dhcp-clients
(e.g. isc-dhcp). In particular, in a cloud setting, without this default
instances have resulted in timing out talking to cloud metadata source and
failing to provision.

This does not change this default for the Annonymize code path.
2017-09-19 10:26:17 +02:00
Zbigniew Jędrzejewski-Szmek f2adcd22d5 build-sys: bump xslt maxdepth limit (#6863)
With libxslt-1.30, builds were failing on some recursion depth limit
with systemd.index.xml. Bumping the limit fixes the issue.
2017-09-19 15:04:02 +09:00
Ansgar Burchardt e80f1a7928 typo: chache → cache (#6864) 2017-09-19 06:48:09 +02:00
Alan Jenkins 6cc9a5bf42 man/systemd.special: correct what slices.target pulls in (#6862) 2017-09-18 17:43:19 +02:00
Zbigniew Jędrzejewski-Szmek f8f1e666a6 man: describe user@host:machine syntax
Fixes #6734.
2017-09-17 21:08:56 +02:00
Zbigniew Jędrzejewski-Szmek 9610fb3814 man: update limits on seat and session identifiers in sd-login(3)
For the session identifier, the code is currently slightly stricter, because it
only uses digits and letters, than the description. This should be OK.

Fixes #6745.
2017-09-17 21:08:56 +02:00
Zbigniew Jędrzejewski-Szmek 0ae42c9b7a man: import "Multi-Seat on Linux" into sd-login(3)
The document on the wiki is partially outdated and not very visible.  Let's
import the gist of it here. The original text is retained, with only grammar
and stylistic and formatting changes.
2017-09-17 21:08:56 +02:00
Lennart Poettering 27cb01b0f0 Merge pull request #6840 from keszybz/more-docs
Some more documentation updates
2017-09-17 11:56:24 +02:00
Zbigniew Jędrzejewski-Szmek 3d7d3cbbda Merge pull request #6832 from poettering/keyring-mode
Add KeyringMode unit property to fix cryptsetup key caching
2017-09-15 21:24:48 +02:00
Zbigniew Jędrzejewski-Szmek 1245e4132b man: use "filename" not "file name" by default
We settled on "filename" and "file system", so change a couple of places for
consistency. The exception is when there's an adjective before "file" that
binds more strongly then "name": "password file name", "output file name", etc.
Those cases are left intact.
2017-09-15 17:18:29 +02:00
Russell Stuart cd9363b11c man: update udevadm -y/--sysname-match documentation
Fixes #6792.

[zj: reorganize the sentece for grammatical correctness.]
2017-09-15 17:18:29 +02:00
Lennart Poettering 157148d6d3 man: add a whole section detailing journal stdout/stderr stream logging
Details about EPIPE/SIGPIPE handling, metadata and more.

Fixes: #6620
2017-09-15 17:18:26 +02:00
Lennart Poettering b1edf4456e core: add new per-unit setting KeyringMode= for controlling kernel keyring setup
Usually, it's a good thing that we isolate the kernel session keyring
for the various services and disconnect them from the user keyring.
However, in case of the cryptsetup key caching we actually want that
multiple instances of the cryptsetup service can share the keys in the
root user's user keyring, hence we need to be able to disable this logic
for them.

This adds KeyringMode=inherit|private|shared:

    inherit: don't do any keyring magic (this is the default in systemd --user)
    private: a private keyring as before (default in systemd --system)
    shared: the new setting
2017-09-15 16:53:35 +02:00
Jan Synacek 91a8f867b6 doc: document service exit codes
(Heavily reworked by Lennart while rebasing)

Fixes: #3545
Replaces: #5159
2017-09-15 16:44:06 +02:00
Zbigniew Jędrzejewski-Szmek fa69a4c74b man: update the description of machinectl -M
Fixes #6621.

Also rework the introduction a bit.
2017-09-15 11:47:46 +02:00
Zbigniew Jędrzejewski-Szmek 1c12694439 man: explain when networkd removed existing configuration and when not
Fixes #6693.
2017-09-15 11:23:57 +02:00
Patrik Flykt 760021c02c man: Document Domains for Router Advertisement network configuration 2017-09-15 10:34:57 +03:00
Zbigniew Jędrzejewski-Szmek 6e2f5000c7 man: delete note about propagating signal termination
That advice is generally apropriate for "user" programs, i.e. programs which
are run interactively and used pipelines and such. But it makes less sense for
daemons to propagate the exit signal. For example, if a process receives a SIGTERM,
it is apropriate for it to exit with 0 code. So let's just delete the whole
paragraph, since this page doesn't seem to be the right place for the longer
discussion which would be required to mention all the caveats and considerations.

Fixes #6415.
2017-09-15 09:33:25 +02:00
Martin Pitt 6d44591141 Revert "device : reload when udev generates a "changed" event" (#6836)
This reverts commit 0ffddc6e2c. That
causes a rather severe disruption of D-Bus and other services when e. g.
restarting local-fs.target (as spotted by the "storage" test regression).

Fixes #6834
2017-09-15 09:21:49 +02:00
Lennart Poettering ab2116b140 core: make sure that $JOURNAL_STREAM prefers stderr over stdout information (#6824)
If two separate log streams are connected to stdout and stderr, let's
make sure $JOURNAL_STREAM points to the latter, as that's the preferred
log destination, and the environment variable has been created in order
to permit services to automatically upgrade from stderr based logging to
native journal logging.

Also, document this behaviour.

Fixes: #6800
2017-09-15 08:26:38 +02:00
Susant Sahani bce67bbee3 networkd: add support to configure IP Rule (#5725)
Routing Policy rule manipulates rules in the routing policy database control the
route selection algorithm.

This work supports to configure Rule
```
[RoutingPolicyRule]
TypeOfService=0x08
Table=7
From= 192.168.100.18

```

```
ip rule show
0:	from all lookup local
0:	from 192.168.100.18 tos 0x08 lookup 7
```

V2 changes:

1. Added logic to handle duplicate rules.
2. If rules are changed or deleted and networkd restarted
   then those are deleted when networkd restarts next time

V3:

1. Add parse_fwmark_fwmask
2017-09-14 21:51:39 +02:00
Lennart Poettering 21f0669163 Merge pull request #6801 from johnlinp/master
man: explicitly distinguish "implicit dependencies" and "default dependencies"
2017-09-14 21:41:13 +02:00
Zbigniew Jędrzejewski-Szmek 8b5c528ce8 Merge pull request #6818 from poettering/nspawn-whitelist
convert nspawn syscall blacklist into a whitelist (and related stuff)
2017-09-14 19:47:59 +02:00
Zbigniew Jędrzejewski-Szmek 6579a622ec Merge pull request #6790 from poettering/unit-unsetenv
add UnsetEnvironment= unit file setting, in order to fix #6407
2017-09-14 19:46:55 +02:00
Lennart Poettering 71b514298b Merge pull request #6820 from keszybz/sysusers-doc-update
Assorted updates to man pages
2017-09-14 19:12:51 +02:00
Lennart Poettering 60c776fd75 Merge pull request #6746 from yuwata/parse-empty-string
allow to input empty string to config_parse_xxx()
2017-09-14 16:49:09 +02:00
Lennart Poettering 960d20e1a9 man: minor correction for systemd-run
The meaning was acidentally inverted in
156d6036be, let's correct this.
2017-09-14 15:45:21 +02:00
Lennart Poettering 96bedbe2e5 nspawn: replace syscall blacklist by a whitelist
Let's lock things down a bit, and maintain a list of what's permitted
rather than a list of what's prohibited in nspawn (also to make things a
bit more like Docker and friends).

Note that this slightly alters the effect of --system-call-filter=, as
now the negative list now takes precedence over the positive list.
However, given that the option is just a few days old and not included
in any released version it should be fine to change it at this point in
time.

Note that the whitelist is good chunk more restrictive thatn the
previous blacklist. Specifically:

- fanotify is not permitted (given the buffer size issues it's
  problematic in containers)
- nfsservctl is not permitted (NFS server support is not virtualized)
- pkey_xyz stuff is not permitted (really new stuff I don't grok)
- @cpu-emulation is prohibited (untested legacy stuff mostly, and if
  people really want to run dosemu in nspawn, they should use
  --system-call-filter=@cpu-emulation and all should be good)
2017-09-14 15:45:21 +02:00
Lennart Poettering cd0ddf6f75 seccomp: add four new syscall groups
These groups should be useful shortcuts for sets of closely related
syscalls where it usually makes more sense to allow them altogether or
not at all.
2017-09-14 15:45:21 +02:00
Lennart Poettering 00819cc151 core: add new UnsetEnvironment= setting for unit files
With this setting we can explicitly unset specific variables for
processes of a unit, as last step of assembling the environment block
for them. This is useful to fix #6407.

While we are at it, greatly expand the documentation on how the
environment block for forked off processes is assembled.
2017-09-14 15:17:40 +02:00
Lennart Poettering 3b22864e20 Merge pull request #6428 from boucman/device_reload
device : reload when udev generates a "changed" event
2017-09-14 12:46:23 +02:00
Zbigniew Jędrzejewski-Szmek 1b934761ae man: add a note about Name=eth0 being bad
Fixes #2657.
2017-09-14 12:13:31 +02:00