Commit graph

40022 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 9fd1a0babd tests: install perl for CI
It is useful for various tests (test-directives, test-udev, …).
2019-05-20 15:47:28 +02:00
Zbigniew Jędrzejewski-Szmek c6448ee39e test: run check-directives.sh as part of the test suite 2019-05-20 15:44:31 +02:00
Yu Watanabe a188bcffc3
Merge pull request #12577 from yuwata/test-network-issue-12344
test-network: fix test_bond_operstate
2019-05-19 09:26:14 +09:00
Yu Watanabe b26ea30801 network: tighten the condition whether link has carrier
ip command requires that IFF_RUNNING is set for that the link has
carrier.
2019-05-19 05:39:45 +09:00
Yu Watanabe 2700d2c7dc test-network: wait for bond interface to be no-carrier operational state 2019-05-19 05:39:45 +09:00
Yu Watanabe ce87a19087 test-network: enable universal_newline= flag for subprocess.check_output() 2019-05-19 05:39:21 +09:00
Yu Watanabe 4b3cf93507 test-network: remove unnecessary links 2019-05-19 05:29:25 +09:00
Yu Watanabe 3ccf7af087 test-network: fix underlying device name 2019-05-19 05:27:56 +09:00
Yu Watanabe 791c1140c9 test-network: use check_operstate() helper function where applicable 2019-05-19 05:27:56 +09:00
Yu Watanabe 2be0b6fc5e test-network: add get_operstate() and check_operstate() helper functions 2019-05-19 05:27:46 +09:00
David Tardon 525b95f10e timer: simplify computation of unit activation time 2019-05-18 16:58:27 +02:00
Yu Watanabe e7b621ee1f
Merge pull request #12586 from ssahani/route-properties
Route properties
2019-05-18 10:31:37 +09:00
Susant Sahani 9b88f20aba networkd: route add MPLS TTL propagate 2019-05-18 10:30:41 +09:00
Yu Watanabe c9f0f21e28
Merge pull request #12593 from AdrianBunk/master
Small changes from Yocto/musl builds
2019-05-18 10:25:59 +09:00
Susant Sahani 8f02c9b085 networkd: FOU netdev add support to configure peer port 2019-05-18 10:25:36 +09:00
Zbigniew Jędrzejewski-Szmek be44e09162 shared/varlink: add missing setting of output_buffer_allocated
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14708,
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14735,
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14725,
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14720,
and probably others.
2019-05-17 15:09:32 +02:00
Susant Sahani cb7e98ab05 sd-netlink: add route netlink properties 2019-05-17 13:44:33 +05:30
Martin Pitt 21f0c55a2c semaphore: switch to Debian experimental packaging branch
Debian unstable is frozen for the Debian 9 release, current development
happens in experimental. After the release, this can be switched back to
master, and the branch set through the `$BRANCH` env variable in the
semaphore config.
2019-05-17 11:04:49 +03:00
Andrej Valek 56e3c9581e fs-util.h: add missing sys/stat include
fix error:
| error: passing argument 5 of 'chase_symlinks_and_stat' from incompatible pointer type [-Werror=incompatible-pointer-types]
2019-05-17 09:40:46 +03:00
Adrian Bunk 8a8e84d297 Replace the legacy ULONG_LONG_MAX with the C99 ULLONG_MAX 2019-05-17 09:39:46 +03:00
Chen Qi 56fb30d93e socket-util.h: include string.h
Fix the following compile error:
src/basic/socket-util.h:187:30: error: implicit declaration of function 'strnlen'; did you mean 'strlen'? [-Werror=implicit-function-declaration]
2019-05-17 09:38:06 +03:00
Adrian Bunk 010f917cf2 src/udev/udev-event.c must #include <sys/wait.h>
Fixes the following build failure with musl:
../git/src/udev/udev-event.c: In function 'spawn_wait':
../git/src/udev/udev-event.c:600:53: error: 'WEXITED' undeclared (first use in this function); did you mean 'WIFEXITED'?
         r = sd_event_add_child(e, NULL, spawn->pid, WEXITED, on_spawn_sigchld, spawn);
                                                     ^~~~~~~

This looks like a bug in udev-event.c that could also have broken
the compilation after some future glibc header reshuffle.
2019-05-17 09:35:43 +03:00
Michael Biebl dadc7f2e43 meson: stop creating .wants directories for {multi-user,getty}.target (#12569)
Since preset is supposed to be used to enable the services, there is no
need to pre-create those directories either.

Follow-up for #12164
2019-05-17 08:02:45 +02:00
Franck Bui 88bd5a32e8 udevd: change the default value of udev.children-max (again)
Follow-up for faae64fa3d, which increased the
default number of udev workers per cpu regardless of how big the system is.

It's not really clear from the commit message if the new number of workers
improved the overall time for the boot process or only reduced the number of
times the max number of children limit was reached (and in this case
5406c36844 commit might have been more appropriate in the first place).

But systems with ~1000 CPUs are not rare these days and the worker numbers get
quite large with CPU factor of 8. Spawning more than 2000 workers can't be
healthy on any system, no matter how big.

Indeed the main mistake is the belief that udev is CPU-intensive, and thus the
number of allowed workers has to increase with the number of CPUs. It is not,
at probably has never been. It's I/O bound, and sometimes, bound by resources
such as locks.

This is an argument to:

 - scale only weakly with the number of CPUs, and the rationale to switch back
   to a scale factor C=2 but with a higher offset number which should affect
   systems with a small number of CPUs only. With this patch applied the offset
   is increased from O=8 to O=16.

 - put an absolute maximum limit to make sure no more than 2048 workers are
   spawned no matter how big the system is.

This still provides more workers for the laptop cases (where the number of CPUs
is limited), while avoiding sky-rocketing numbers for big systems.

Note that on most desktop systems, the memory limit will kick in. The following
table collects numbers about children-max. For each scenario, the first column
is the "cpu_limit" limit, and the second number is the minimum amount of memory
for the "cpu_limit" limit to become relevant (with less RAM, memory will limit
the number of children thus "mem_limit" will become the active limit).

       |    > v240    |    < v240     |  this patch   |
 CPUs  | C = 8, O = 8 | C = 2, O = 8  | C = 2, O = 16 |
-------------------------------------------------------
   1   |   16      2  |   10    1.3   |   18       2  |
   2   |   24      3  |   12    1.5   |   20       2  |
   4   |   40      5  |   16      2   |   24       3  |
   8   |   72      9  |   24      3   |   32       4  |
  16   |  136     17  |   40      5   |   48       5  |
  64   |  520     65  |  136     17   |  144      18  |
1024   | 8200   1025  | 2056    263   | 2048     256  |
2048   |16392   2049  | 4104    513   | 2048     256  |

This patch is mainly based on Martin Wilck's analyze and comments.
2019-05-16 23:09:41 +02:00
Zbigniew Jędrzejewski-Szmek 5cef20c80a
Merge pull request #12515 from evverx/fix-fuzzers-in-local-mode
travis: make sure the fuzzers can be built in "local" mode
2019-05-16 23:04:45 +02:00
Zbigniew Jędrzejewski-Szmek e6042f682f
Merge pull request #12535 from poettering/color-grey
redefine how we select the ANSI color grey
2019-05-16 21:15:06 +02:00
Lennart Poettering a305eda35f docs: add comment about high 32bit range and signed uids 2019-05-16 19:24:59 +02:00
Lennart Poettering 8550506439 random-util: add a longer comment explaining our RDRAND use 2019-05-16 19:23:08 +02:00
Evgeny Vereshchagin 63dc544b6f tests: make docker-run and helper.py happy by not using colons in filenames
This should address https://github.com/google/oss-fuzz/issues/2428
2019-05-16 20:08:00 +03:00
Frantisek Sumsal 6cda6774bd journalctl: return a non-zero EC when --grep returns no matches
When journalctl is compiled with PCRE2 support, let's return a non-zero
exit code when --grep is used and no match for given pattern is found.
This should allow users to use journalctl --grep in scripts instead of
piping journalctl into grep

Fixes #8152
2019-05-16 18:54:01 +02:00
Yu Watanabe 8688c29b5a varlink: initialize Varlink with 0
Closes oss-fuzz#14688.
2019-05-16 18:51:33 +02:00
Lennart Poettering 9725f1a10f
Merge pull request #12378 from rbalint/vt-kbd-reset-check
VT kbd reset check
2019-05-16 16:39:38 +02:00
Yu Watanabe a32a00831c
Merge pull request #12574 from yuwata/network-mtu-issue-12552
network: do not always bump MTU with additional 4bytes
2019-05-16 08:25:48 +02:00
Yu Watanabe fe0e16db09 network: do not use ordered_set_printf() for DOMAINS= or ROUTE_DOMAINS=
This partially reverts 5e2a51d588.

Fixes #12531.
2019-05-16 05:17:26 +02:00
Yu Watanabe 4e14e54638
Merge pull request #12549 from yuwata/network-sittun-disable-link-local-addressing-12547
network: disable LinkLocalAddressing on sit devices
2019-05-16 05:11:05 +02:00
Yu Watanabe db439337f9
Merge pull request #12576 from ssahani/fou
networkd: FOU tunnel support Local and Peer tunnel addresses
2019-05-16 05:10:35 +02:00
Yu Watanabe 86932c2161
Merge pull request #12578 from ssahani/ipvtap
networkd: introduce netdev ipvtap
2019-05-16 05:01:35 +02:00
Yu Watanabe 7d7be1b9d8 test-network: adjust mtu 2019-05-16 11:51:07 +09:00
Yu Watanabe f6fcc1c2a4 network: bump MTU bytes only when MTUByte= is not set 2019-05-16 11:51:03 +09:00
Yu Watanabe 933c70a0a4 network: honor MTUBytes= setting
Closes #12552.
2019-05-16 11:47:41 +09:00
Yu Watanabe 11309591a5 test-network: check tunnel netdevs become operstate 'routable' 2019-05-16 10:37:11 +09:00
Susant Sahani 4502a61c8a networkd: FOU tunnel support Local and Peer tunnel addresses 2019-05-16 10:24:48 +09:00
Susant Sahani 397a74ddea sd-netlink: Add Fou properties FOU_ATTR_LOCAL_V4/FOU_ATTR_PEER_V4
FOU_ATTR_LOCAL_V6
FOU_ATTR_PEER_V6
FOU_ATTR_PEER_PORT
FOU_ATTR_IFINDEX
2019-05-16 10:24:48 +09:00
Yu Watanabe a3824444e5 linux: update headers from current kernel master 2019-05-16 10:24:47 +09:00
Yu Watanabe 956c8feca4 test-network: add a basic test for ipvtap 2019-05-16 09:48:53 +09:00
Susant Sahani 69c317a07f networkd: introduce netdev ipvtap
This patch adds netdev ipvtap that is based on the
IP-VLAN network interface, called ipvtap. An ipvtap device can be created
in the same way as an ipvlan device, using 'kind ipvtap', and then accessed
using the tap user space interface.
2019-05-16 09:48:53 +09:00
Yu Watanabe af2fa2c116 network: disable link local addressing on ipip, gre, sit, and vti netdevs
Closes #12547.
2019-05-16 05:53:41 +09:00
Yu Watanabe b71d9a1296 wait-online: ignore -ENODATA on updating link information
When netdev is not created yet, the -ENODATA is returned.
2019-05-16 05:53:41 +09:00
Yu Watanabe 710ce9e537 network: link_check_ready() returns earlier if routes are not configured yet
link_request_set_routes() calls link_check_ready(), so it is not
necessary to continue that here.
2019-05-16 05:53:41 +09:00
Yu Watanabe 05dc2132e0
Merge pull request #12496 from yuwata/network-on-device-default-route
network: add DefaultRouteOnDevice= setting in [Network] section
2019-05-15 22:46:25 +02:00