Commit graph

39663 commits

Author SHA1 Message Date
Frantisek Sumsal d7707faec2 semaphore: merge semaphore scripts to avoid code duplication (#12365) 2019-04-24 07:52:49 +02:00
Zbigniew Jędrzejewski-Szmek 31471d1ddb
Merge pull request #12320 from mrc0mmand/tweak-start-timeout-in-TEST-16-EXTEND-TIMEOUT
test: don't timeout while waiting for other test units
2019-04-23 15:48:47 +02:00
Zbigniew Jędrzejewski-Szmek f5f899ef04
Merge pull request #12346 from poettering/accept-flush
socket-util: make sure accept_flush() doesn't hang on EOPNOTSUPP
2019-04-23 15:03:29 +02:00
Piotr Drąg 4b198b2a44 catalog: update Polish translation 2019-04-23 14:43:47 +02:00
Jiri Pirko eaa9d507d8 udev: net_id: introduce predictable names for netdevsim
In order to properly and predictably name netdevsim netdevices,
introduce a separate implementation, as the netdevices reside on a
specific netdevsim bus. Note that this applies only to netdevsim devices
created using sysfs, because those expose phys_port_name attribute.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
2019-04-23 14:01:00 +02:00
Marc-André Lureau 0fde5a3591 udev-rules: add udmabuf to kvm group
It will have the default 0660 mode.

Fixes: #12283
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2019-04-23 13:00:21 +02:00
Chris Down 6610200d29
Merge pull request #12336 from anitazha/disablecontroller
core: support DisableControllers= for transient units
2019-04-23 10:42:37 +02:00
Anita Zhang 25cc30c4c8 core: support DisableControllers= for transient units 2019-04-22 11:52:08 -07:00
Lennart Poettering 6cdc62aa97 udev: whitespace fix 2019-04-18 15:18:12 +02:00
Lennart Poettering 5b116c37e1 test: add test for flush_accept()
Fixes: #12335
2019-04-18 15:18:12 +02:00
Lennart Poettering f3d75364fb socket-util: make sure flush_accept() doesn't hang on unexpected EOPNOTSUPP
So apparently there are two reasons why accept() can return EOPNOTSUPP:
because the socket is not a listening stream socket (or similar), or
because the incoming TCP connection for some reason wasn't acceptable to
the host. THe latter should be a transient error, as suggested on
accept(2). The former however should be considered fatal for
flush_accept(). Let's fix this by explicitly checking whether the socket
is a listening socket beforehand.
2019-04-18 15:18:12 +02:00
Yu Watanabe 528fcf8d1d bootspec: fix build when EFI support is disabled
Follow-up for ce4c4f8108.
2019-04-17 11:20:04 +02:00
Yu Watanabe ac9b17271f linux: import if_ether.h from kernel-5.0
kernel-4.15's if_ether.h has a bug that the header does not provide
'struct ethhdr'. The bug is introduced by
6926e041a8920c8ec27e4e155efa760aa01551fd (4.15-rc8)
and fixed by da360299b6734135a5f66d7db458dcc7801c826a (4.16-rc3).

This makes systemd built with kernel-4.15 headers.

Fixes #12319.
2019-04-16 10:27:01 +02:00
David Art ec8181d1c5 hwdb: Add Medion Akoya E3216 MD60900 (#12323)
Fixes: #12312
2019-04-16 10:23:28 +02:00
Frantisek Sumsal 772f15c1d8 test: don't timeout while waiting for other test units
The main testsuite service timeouts sporadically when waiting for
other testsuite-* units. As the test timeout is handled by
the "test executor" (test.sh), let's disable it for the service.

This should (hopefully) fix the test flakiness.
2019-04-15 13:59:27 +02:00
Lennart Poettering 4d48eabf37
Merge pull request #12305 from yuwata/import-more-headers-from-kernel-5-0
linux: import more headers from kernel-5.0
2019-04-15 11:33:06 +02:00
Lennart Poettering 929b02b5b8
Merge pull request #12301 from keszybz/silence-alignment-warning
Silence alignment warning
2019-04-15 11:21:15 +02:00
Lennart Poettering a4009bee4a
Merge pull request #12311 from yuwata/timeout_abort_set-change-bool
core: several follow-ups for timeout PR #11211
2019-04-15 11:14:18 +02:00
Florian Dollinger 5a1ee07302 Check for final assignments in RUN keys (#12309)
As described in #12291
2019-04-15 15:59:36 +09:00
Benjamin Robin c424bed180 basic/fileio: Fix memory leak if READ_FULL_FILE_SECURE flag is used
The memory leak introduced in #12223 (15f8f02)
2019-04-15 13:54:19 +09:00
Florian Dollinger 967de8face Document (final) assignment on the RUN (#12310)
As described in #12291, final assignments and assignments are clearing both command types.
2019-04-14 21:26:39 +09:00
Yu Watanabe dcab85be18 core: do not show TimeoutStopSec= in dump message if it is not set 2019-04-14 20:47:13 +09:00
Yu Watanabe 9c79f0e0a0 core: add assertion in two inline functions 2019-04-14 20:46:24 +09:00
Yu Watanabe 3bf0cb65f5 core: use BUS_DEFINE_PROPERTY_GET() macro at more places 2019-04-14 20:45:31 +09:00
Yu Watanabe 54c1a6ab8c core: change type of Service::timeout_abort_set to bool
Follow-up for dc653bf487 (#11211).
2019-04-14 20:13:47 +09:00
Yu Watanabe aa81290495 linux: also import l2tp.h from kernel-5.0
The L2TP_ATTR_UDP_ZERO_CSUM6_{TX,RX} attributes are introduced by
6b649feafe10b293f4bd5a74aca95faf625ae525, which is included in
kernel-3.16. To support older kernel, let's import the header.

Fixes #12300.
2019-04-13 22:51:05 +09:00
Yu Watanabe 7057b6144f linux: also import linux/in.h and in6.h from kernel-5.0
Now linux/in.h has better conflict detection with glibc's
netinet/in.h. So, let's import the headers.

Note that our code already have many workarounds for the conflict,
but in this commit does not drop them. Let's do that in the later
commits if this really helps.
2019-04-13 22:44:21 +09:00
Yu Watanabe 76566792e3 linux: move netdevice.h from shared/linux to basic/linux
As the header linux/if_arp.h includes linux/netdevice.h.
2019-04-13 22:43:59 +09:00
Yu Watanabe d90a044f49
Merge pull request #12288 from yuwata/resolve-bond-rafactoring
resolve,network: tiny cleanups
2019-04-13 22:43:21 +09:00
Franck Bui 63f28cad3e tmpfiles: split tmp.conf out
tmp.conf was dealing with 2 different kind of paths: one dealing with general
temporary paths such as /var/tmp and /tmp and the other one dealing with
temporary directories owned by systemd.

If for example a user wants to adjust the age argument of the general paths
only, he had to overload the whole file which is cumbersome and error prone
since any future changes in tmp.conf shipped by systemd will be lost.

So this patch splits out tmp.conf so the systemd directories are dealt
separately in a dedicated conf file. It's named "systemd-tmp.conf" based on the
naming recommendation made in tmpfiles.d man page.

In practice it shouldn't cause any regression since it's very unlikely that
users override paths owned by systemd.
2019-04-13 12:07:03 +02:00
Dominick Grift 8f1ed04ad6 nspawn: Fix volatile SELinux label
nspawn should associate the specified nspawn container apifs object label instead of the nspawn container process label with the volatile tmpfs
2019-04-13 12:03:02 +02:00
Zbigniew Jędrzejewski-Szmek b48ccda84f sd-netlink: align table 2019-04-13 11:57:42 +02:00
Zbigniew Jędrzejewski-Szmek e61614099f network: avoid warning about unaligned pointers
With gcc-9.0.1-0.10.fc30.x86_64:
../src/network/netdev/macsec.c: In function ‘config_parse_macsec_port’:
../src/network/netdev/macsec.c:584:24: warning: taking address of packed member of ‘struct <anonymous>’ may result in an unaligned pointer value [-Waddress-of-packed-member]
  584 |                 dest = &c->sci.port;
      |                        ^~~~~~~~~~~~
../src/network/netdev/macsec.c:592:24: warning: taking address of packed member of ‘struct <anonymous>’ may result in an unaligned pointer value [-Waddress-of-packed-member]
  592 |                 dest = &b->sci.port;
      |                        ^~~~~~~~~~~~

(The alignment was probably OK, but it's nicer to avoid the warning anyway.)
2019-04-13 11:55:04 +02:00
Yu Watanabe cc83684947
Merge pull request #12296 from poettering/coding-style-sections
split CODING_STYLE document into multiple thematic sections
2019-04-13 18:23:13 +09:00
Yu Watanabe eeda619a1e
Merge pull request #12290 from poettering/json-foreach-love
some small JSON foreach macro love
2019-04-13 18:19:38 +09:00
Yu Watanabe c12e138f21
Merge pull request #12293 from poettering/tiny-journal-modernizations
four simple journal modernizations
2019-04-13 18:19:15 +09:00
Yu Watanabe 3e8afae5b5 network: re-indent conf parser and wrap long lines in bond.c 2019-04-13 17:52:00 +09:00
Yu Watanabe 674c96fc44 network: use OrderedSet for bond ARP ip targets 2019-04-13 17:52:00 +09:00
Yu Watanabe 45f735815e ordered-set: add missing ordered_set_size() 2019-04-13 17:52:00 +09:00
Yu Watanabe 1e2a490e91 network: drop allocation for Bond::ad_actor_system 2019-04-13 17:51:59 +09:00
Yu Watanabe f200093337 network: drop bond_mode_to_kernel() and bond_xmit_hash_policy_to_kernel() 2019-04-13 17:51:59 +09:00
Yu Watanabe ae695a9eda arp-util: use net/ethernet.h instead of netinet/if_ether.h
The header net/ethernet.h is used at all other places where
'struct ether_addr' is required.
2019-04-13 17:51:59 +09:00
Yu Watanabe 603192b2e8 resolve: use log_link_*() macro 2019-04-13 17:51:59 +09:00
Yu Watanabe 6ff79f7640 resolve: rename Link.name -> Link.ifname
This also changes the type from char[IF_NAMESIZE] to char*.
By changing the type, now resolved-link.h can drop the dependency to
the header net/if.h.
2019-04-13 17:51:59 +09:00
Jan Klötzke dc653bf487 service: handle abort stops with dedicated timeout
When shooting down a service with SIGABRT the user might want to have a
much longer stop timeout than on regular stops/shutdowns. Especially in
the face of short stop timeouts the time might not be sufficient to
write huge core dumps before the service is killed.

This commit adds a dedicated (Default)TimeoutAbortSec= timer that is
used when stopping a service via SIGABRT. In all other cases the
existing TimeoutStopSec= is used. The timer value is unset by default
to skip the special handling and use TimeoutStopSec= for state
'stop-watchdog' to keep the old behaviour.

If the service is in state 'stop-watchdog' and the service should be
stopped explicitly we still go to 'stop-sigterm' and re-apply the usual
TimeoutStopSec= timeout.
2019-04-12 17:32:52 +02:00
Sebastian Jennen 1ace223ca7 code style format: clang-format applied to src/a*/*
[zj: this is a subset of changes generated by clang-format, just the ones
  I think improve readability or consistency.]

This is a part of https://github.com/systemd/systemd/pull/11811.
2019-04-12 17:26:33 +02:00
Chris Down c52db42b78 cgroup: Implement default propagation of MemoryLow with DefaultMemoryLow
In cgroup v2 we have protection tunables -- currently MemoryLow and
MemoryMin (there will be more in future for other resources, too). The
design of these protection tunables requires not only intermediate
cgroups to propagate protections, but also the units at the leaf of that
resource's operation to accept it (by setting MemoryLow or MemoryMin).

This makes sense from an low-level API design perspective, but it's a
good idea to also have a higher-level abstraction that can, by default,
propagate these resources to children recursively. In this patch, this
happens by having descendants set memory.low to N if their ancestor has
DefaultMemoryLow=N -- assuming they don't set a separate MemoryLow
value.

Any affected unit can opt out of this propagation by manually setting
`MemoryLow` to some value in its unit configuration. A unit can also
stop further propagation by setting `DefaultMemoryLow=` with no
argument. This removes further propagation in the subtree, but has no
effect on the unit itself (for that, use `MemoryLow=0`).

Our use case in production is simplifying the configuration of machines
which heavily rely on memory protection tunables, but currently require
tweaking a huge number of unit files to make that a reality. This
directive makes that significantly less fragile, and decreases the risk
of misconfiguration.

After this patch is merged, I will implement DefaultMemoryMin= using the
same principles.
2019-04-12 17:23:58 +02:00
Lennart Poettering b4f12824a0 CODING_STYLE: rename "Others" section to "Code Organization and Semantics"
This is a bit of a grabbag, but it's the best I could come up with
without having lots of single-item sections.
2019-04-12 17:01:05 +02:00
Lennart Poettering 4467d39315 CODING_STYLE: split out section about runtime behaviour 2019-04-12 16:59:48 +02:00
Lennart Poettering 78e5b4d7ee CODING_STYLE: add section about C constructs use 2019-04-12 16:53:27 +02:00