Commit graph

22840 commits

Author SHA1 Message Date
Thomas Hindoe Paaboel Andersen 2366ab3026 shared: remove an unused variable 2015-10-11 19:40:54 +02:00
Thomas Hindoe Paaboel Andersen ac9455efdd rfkill: consistently use = in designator 2015-10-11 19:40:54 +02:00
Tom Gundersen ce6c77ebf1 networkd: address - introduce address_is_ready()
Checks that a given address is not tentative nor deprecated.
2015-10-11 15:04:16 +02:00
Tom Gundersen 91b5f99731 networkd: make address_{establish,release}() static
No need to expose these functions, but rather call them from address_{add,drop}.
2015-10-11 15:04:16 +02:00
Tom Gundersen 054f0db487 networkd: manager - avoid unnecessary memory allocation
Don't allocate Address objects only to free them again when processing
rtnl events.
2015-10-11 15:04:16 +02:00
Tom Gundersen cf1d700da3 networkd: address - store active addresses in a Set rather than a List
We need to be able to look these things up quickly as we will be updating them
continuously and there can in principle be many of them.
2015-10-11 15:04:16 +02:00
Tom Gundersen 200a0868fc networkd: address - process in manager.c rather than link.c 2015-10-11 15:04:16 +02:00
Tom Gundersen 957325b763 networkd: link - refactor (un)ref 2015-10-11 15:04:16 +02:00
Tom Gundersen 5c416fc408 networkd: link - fix error handling in link_add() 2015-10-11 15:04:16 +02:00
Tom Gundersen 87e4c847f6 sd-netlink: add support for subscribing to ROUTE messages
Also, explicitly don't support subscribing to GET or SET messages, as these will
never be emitted by the kernel.
2015-10-11 15:04:16 +02:00
Tom Gundersen ad70f78936 sd-netlink: rtnl - add route_get_{scope,tos,table,protocol}() 2015-10-11 15:04:16 +02:00
Tom Gundersen 129dc1b489 sd-ipv4ll: allow initial address to be set explicitly
This is useful in case the daemon is restarted and the state of the IPv4LL client should
be serialized/deserialized.
2015-10-11 15:04:16 +02:00
Tom Gundersen a2fae7bbb2 networkd: link/network - correctly align log messages 2015-10-11 15:04:16 +02:00
Tom Gundersen ed19c567e5 libsystemd-network: limit accuracy of timestamps in logging
We don't care about timestamps down to the last usec, round to the closest sec
as that will be plenty for debugging purposes.
2015-10-11 15:04:15 +02:00
Tom Gundersen 3ac8e5433f networkd: address - add hash helpers for Address objects
Add compare_func and hash_func for the Address object. The notion of
address equality is the same as in the kernel, and hashing preserves
preserves equality.

Two addresses are considered equal if:
   - they have the same address family, and
     - they are neither IPv4 nor IPv6 addresses, or
     - the local addresses are identical, and
       - they are IPv6 addresses, or
         - they have the same prefixlength, and
         - their peer prefixes are identical

This fixes a bug in the old equality check, which got the local address
and the peer prefix mixed up.
2015-10-11 15:03:04 +02:00
Tom Gundersen 7d20d3759e networkd: manager - free bus after own objects
Freeing links/addresses may trigger sending signals over the bus, so let's make sure
the bus stays around until our own objects have been freed.
2015-10-11 14:21:41 +02:00
Tom Gundersen f0213e3796 networkd: route/address - simplify and unify creators
Rename new_dynamic() to simply _new() and reuse that from new_static().
2015-10-11 14:21:41 +02:00
Zbigniew Jędrzejewski-Szmek 9f35e8b458 test-compress-benchmark: test three cases (zeros, simple, semi-random)
Existing test would use highly-compressible repeatable
input. Two types of input are added:
- zeros
- random blocks interspersed with zeros

The idea is to get more information about behaviour in various cases.

On Intel Xeon the results are:

% ./test-compress-benchmark
XZ/zeros: compressed & decompressed 2535301373 bytes in 32.56s (74.26MiB/s), mean compresion 99.96%, skipped 3160 bytes
LZ4/zeros: compressed & decompressed 2535304362 bytes in 1.16s (2088.69MiB/s), mean compresion 99.60%, skipped 171 bytes
XZ/simple: compressed & decompressed 2535300963 bytes in 30.42s (79.48MiB/s), mean compresion 99.95%, skipped 3570 bytes
LZ4/simple: compressed & decompressed 2535303543 bytes in 1.22s (1978.86MiB/s), mean compresion 99.60%, skipped 990 bytes
XZ/random: compressed & decompressed 381756649 bytes in 60.02s (6.07MiB/s), mean compresion 39.64%, skipped 27813723 bytes
LZ4/random: compressed & decompressed 2507385036 bytes in 0.97s (2477.52MiB/s), mean compresion 54.77%, skipped 27919497 bytes

If someone has ideas for more realistic test cases, they can be easily
added to this framework.
2015-10-10 23:05:44 -04:00
Zbigniew Jędrzejewski-Szmek 4b5bc5396c coredump: use lz4frame api to compress coredumps
This converts the stream compression to use the new lz4frame api,
compatible with lz4cat. Previous code used custom headers, so the
compressed file was not compatible with lz4 command line tools.
I considered this the last blocker to using lz4 by default.

Speed seems to be reasonable, although a bit (a few percent) slower
than the lz4 binary, even though compression is the same. I don't
consider this important. It could be caused by the overhead of library
calls, but is probably caused by slightly different buffer sizes or
such. The code in this patch uses mmap, since since this allows the
buffer to be reused while not making the code more complicated at all.
In my testing, this version is noticably faster (~20%) than a naive
single-buffered version. mmap can cause the program to be killed with
SIGBUS, if the underlying file is truncated or a disk error occurs. We
only use this from within coredump and coredumpctl, so I don't
consider this an issue.

Old decompression code is retained and is used if the new code fails
indicating a format error. There have been reports of various smaller
distributions using previous lz4 code, i.e. the old format, and it is
nice to provide backwards compatibility. We can remove the legacy code
in a few versions.

The way that blobs are compressed in the journal is not affected.
2015-10-10 23:05:21 -04:00
Zbigniew Jędrzejewski-Szmek 898d5660eb build-sys: use pkgconfig and lz4 and bump version
The new frame api was released in v. 125.
2015-10-10 23:00:15 -04:00
Daniel Mack 0a41d91f30 Merge pull request #1524 from Danielmachon/catalog-danish-translation
catalog: added systemd.da.catalog
2015-10-10 19:15:28 +02:00
Danielmachon e06055d77c catalog: added systemd.da.catalog 2015-10-10 18:35:44 +02:00
Lennart Poettering e930d14ac8 Merge pull request #1510 from mirco/fix-nspawn
nspawn: create /sys/fs/cgroup for unified hierarchy as well
2015-10-09 18:45:42 +03:00
Martin Pitt 88ef5e639b Merge pull request #1516 from poettering/dontisolaterootslice
Don't isolate `-.slice`
2015-10-09 17:32:30 +02:00
Lennart Poettering 417800228f core: ignore -.slice and init.scope when isolating
Otherwise, we might end up trying to isolate it away when starting user
instances.

While we are at it, also prohibit manual start/stop of these two units.

Fixes: #1507
2015-10-09 17:20:32 +02:00
Lennart Poettering c463a6f1c4 sd-daemon: simply code simplification
No change in behaviour, just make the code more obvious.
2015-10-09 17:20:32 +02:00
Lennart Poettering b492ce8a22 core: remove taint flag about /etc/mtab not being a symlink.
We already stop boot if /etc/mtab is not a symlink right now, and most
likely we'll stop referecing it at all in the future, either way there's
no point in keeping it around as taint flag.
2015-10-09 17:20:32 +02:00
Lennart Poettering b3ccac01cc zsh: don't mention /etc/mtab
The file is obsolete, use /proc/self/mounts instead.

Also, yuck, the code is so awful...
2015-10-09 17:20:32 +02:00
Lennart Poettering 2c882b8bfa Merge pull request #1512 from evverx/systemd-run-syslog-properties
systemd-run can launch units with SyslogIdentifier and SyslogLevelPrefix
2015-10-09 17:06:22 +03:00
Lennart Poettering ce3cef2c52 Merge pull request #1501 from fbuihuu/fix-requires-mounts-for-directives
Make sure the mount units pulled by 'RequiresMountsFor=' are loaded, if they exist
2015-10-09 17:04:36 +03:00
Evgeny Vereshchagin dc800d8406 shell-completion: systemd-run: add new properties 2015-10-09 12:42:34 +00:00
Evgeny Vereshchagin de53c41748 systemd-run can now launch units with SyslogIdentifier 2015-10-09 12:37:50 +00:00
Evgeny Vereshchagin 047d99337f systemd-run can now launch units with SyslogLevelPrefix 2015-10-09 12:17:41 +00:00
Mirco Tischler 88e1057286 nspawn: create /sys/fs/cgroup for unified hierarchy as well 2015-10-09 13:12:08 +02:00
Michal Sekletar 63b20d5c0f update TODO 2015-10-09 12:21:34 +02:00
Daniel Mack 3a3f71e5f0 Merge pull request #1504 from evverx/systemd-run-new-properties
shell-completion: systemd-run: add new properties
2015-10-09 08:52:55 +02:00
Evgeny Vereshchagin f961371fb7 shell-completion: systemd-run: add new properties
See:
* 602b83559a
* b9c50073fc
2015-10-09 06:49:46 +03:00
Franck Bui c7c89abb9e Make sure the mount units pulled by 'RequiresMountsFor=' are loaded (if they exist)
We should make sure that mount units involved by 'RequiresMountsFor='
directives are really loaded if not required by any others units so
that Requires= dependencies on the mount units are applied and thus
the mount unit dependencies are started.
2015-10-08 21:24:22 +02:00
Lennart Poettering 767e2d52d0 Merge pull request #1499 from evverx/system-conf-update
core: system.conf: add DefaultTasksAccounting
2015-10-08 19:57:36 +03:00
Evgeny Vereshchagin b3972d454d core: system.conf: add DefaultTasksAccounting 2015-10-08 17:48:45 +03:00
Daniel Mack ad86c1335a Merge pull request #1496 from poettering/stdin-fd
allow passing in fds for stdin/stdout/stderr for transient services
2015-10-08 16:09:09 +02:00
Tom Gundersen 8f3db94d9d Merge pull request #1497 from bengal/lldp-rename-struct
lldp: rename publicly visible structure
2015-10-08 15:57:23 +02:00
Beniamino Galvani adf88a70f0 lldp: rename publicly visible structure
Rename struct 'tlv_packet' to 'sd_lldp_packet' and struct
'tlv_section' to 'sd_lldp_section' since the former is referenced in
public header sd-lldp.h.

Signed-off-by: Beniamino Galvani <bgalvani@redhat.com>
2015-10-08 15:48:33 +02:00
Lennart Poettering 1af1f2f92e shell-completion: add pseudo machine ".host" to shell completion 2015-10-08 15:14:27 +02:00
Lennart Poettering 4d860b20a1 Merge pull request #1492 from evverx/manager-dbus-properties
core: manager: add some missing properties
2015-10-08 16:07:06 +03:00
Lennart Poettering 4478f292ce Merge pull request #1494 from reverendhomer/patch-1
networkd-link: remove unused variable assignment in link_save()
2015-10-08 16:05:27 +03:00
Lennart Poettering 024a8ec137 run: various modernizations and smaller fixes
Including a fix for properly freeing a calendarspec object after use.
2015-10-08 15:03:31 +02:00
Lennart Poettering 56f3cb335a shell-completion: add "machinectl shell" to bash completion logic 2015-10-08 15:03:31 +02:00
Lennart Poettering 1ba239315f util: minor modernization of vt_disallocate() 2015-10-08 15:03:31 +02:00
Lennart Poettering 3d18b16755 util: do not reset terminal in acquire_terminal()
Before, we'd always reset acquired terminals, which is not really
desired, as we expose a setting TTYReset= which is supposed to control
whether the TTY is reset or not. Previously that setting would only
enable a second resetting of the TTY, which is of course pointless...

Hence, move the implicit resetting out of acquire_terminal() and make
the callers do it if they need it.
2015-10-08 15:03:31 +02:00