Commit graph

27705 commits

Author SHA1 Message Date
Robert Scheck 5ac8b50d58 network, meson: allow statically linked build
Build option "link-networkd-shared" to build a statically linked
systemd-networkd by using

  -Dlink-udev-shared=false -Dlink-networkd-shared=false

on systems with full systemd stack except systemd-networkd, such
as RHEL/CentOS 8.
2020-01-08 09:50:32 +01:00
Zbigniew Jędrzejewski-Szmek 31ffbfd101
Merge pull request #14510 from poettering/net-naming-scheme-fixlets
some net naming scheme documentation fixes
2020-01-08 09:46:49 +01:00
Lennart Poettering 4353974d75 boot: fix osrel parser
let's check VERSION instead of VERSION_ID where appropriate.

Fixes: #14493
2020-01-07 19:32:14 +00:00
Lennart Poettering 65ad4ad89d
Merge pull request #14499 from yuwata/network-gateway-dhcp
network: static route via DHCP gateway
2020-01-07 19:17:51 +01:00
Lennart Poettering 3ce252d0e0 udev: use dot_or_dot_dot() where appropriate 2020-01-07 18:02:53 +01:00
Yu Watanabe 7a182f1034 udev: do not use exact match of file permission
This partially reverts 25de7aa7b9.

Fixes #14473.
2020-01-07 15:16:52 +01:00
Lennart Poettering 983ffdb0bf
Merge pull request #14481 from yuwata/virt-string-table
virt: use string table to detect VM or container
2020-01-07 15:16:31 +01:00
Yu Watanabe 6b50cb5ca9 nspawn: set original ifname as alternative if it is truncated 2020-01-07 15:15:59 +01:00
Lennart Poettering 67861acdf3 locale-util: extend comments on unicode glyph use, and drop mdash (that actually was an ndash)
Let's add the actual unicode names of the glyphs we use. Let's also add
in comments what the width expectations of these glyphs are on the
console.

Also, remove the "mdash" definition. First of all it wasn't used, but
what's worse the glyph encoded was actually an "ndash"...

Fixes: #14075
2020-01-07 13:21:22 +01:00
Lennart Poettering a2a64d3ac9
Merge pull request #14420 from DaanDeMeyer/nspawn-fix-read-only-overlay-rootfs
nspawn: Don't mount read-only if we have a custom mount on root.
2020-01-07 12:14:24 +01:00
Yu Watanabe 1985c54ff3 network: static routes via DHCP gateway
This makes Gateway= also take "DHCP". If "DHCP" is set, then the gateway
address provided by DHCP or IPv6 RA is used.

Closes #8213.
2020-01-07 19:10:54 +09:00
Yu Watanabe 25454a0c34 virt: drop trailing white spaces 2020-01-07 11:50:36 +09:00
Yu Watanabe 735ea55f5c virt: use string table to detect VM or container 2020-01-07 11:50:36 +09:00
Frantisek Sumsal 0e97a910a6 pkcs11-util: don't mask return value of the first asprintf()
Fixes CID#1409666
2020-01-07 10:30:52 +09:00
Yu Watanabe d6246fd498 network: lower the log-level of harmless message
Closes #14285.
2020-01-07 10:29:40 +09:00
Yu Watanabe 11b8568f26 meson: drop unnecessary linking of libudev_core 2020-01-07 10:29:17 +09:00
Yu Watanabe a26c307320 sd-netlink: fix copy and paste mistake 2020-01-06 19:18:19 +01:00
Yu Watanabe 14b6e6b6f3 sd-netlink: use uint8_t* for non-character data 2020-01-06 14:50:41 +01:00
Topi Miettinen ec04aef442 dbus-execute: avoid extra strdup()
bind_mount_add does the strdup(), so we can avoid
strdup()ing the strings.
2020-01-04 10:47:28 +01:00
Kevin Kuehler 097537f07a job: Don't mark as redundant if deps are relevant
In the steps given in #13850, the resulting graph looks like:

    C (Anchor) -> B -> A

Since B is inactive, it will be flagged as redundant and removed from
the transaction, causing A to get garbage collected. The proposed fix is
to not mark nodes as redundant if doing so causes a relevant node to be
garbage collected.

Fixes #13850
2020-01-03 15:58:10 +01:00
Lennart Poettering dc5737470e
Merge pull request #14194 from yuwata/network-multipath-routing-12541
network: introduce multipath routing
2020-01-03 15:38:03 +01:00
Daan De Meyer 2436ea761b nspawn: Make a custom mount on root imply --read-only. 2020-01-03 14:06:38 +01:00
Daan De Meyer bbd407ea2b nspawn: Don't mount read-only if we have a custom mount on root. 2020-01-03 14:06:38 +01:00
Lennart Poettering 12da859a3f
Merge pull request #14401 from DaanDeMeyer/nspawn-move-veth-back-to-host
nspawn: move virtual interfaces added with --network-interface back to the host
2020-01-03 12:47:03 +01:00
Kai Krakow bc5ea049f2 nspawn: Generate unique short veth names
This commit lowers the chance of having veth name conflicts for machines
created with similar names.

Replaces: #12865
Fixes: #13417
2020-01-02 20:05:42 +01:00
Lennart Poettering b355d0c9af udev: move naming-scheme.[ch] into src/shared/
That way we can use it from non-udev code too, for example nspawn.
2020-01-02 19:34:00 +01:00
Frantisek Sumsal b01c1f305c systemctl: show 'VENDOR PRESET' column in 'list-unit-files'
Show the install value presets would suggest for each service in a
separate column.
2020-01-02 15:35:40 +01:00
Frantisek Sumsal a25457f5b7 systemctl: skip non-existent units in the 'cat' verb
When processing list of units (either provided manually or as a
wildcard), let's skip units for which we don't have an on-disk
counterpart, but note the -ENOENT error code and propagate it back to
the user.

Fixes: #14082
2020-01-02 15:27:25 +01:00
Lennart Poettering 49d418d4ab
Merge pull request #14444 from yuwata/network-codel-more
network: more CoDel settings
2020-01-02 14:51:55 +01:00
Daan De Meyer 5b4855ab73 nspawn: Move --network-interface interfaces back to the host. 2020-01-02 14:13:03 +01:00
Lennart Poettering cb68406c6a
Merge pull request #14441 from GothAck/gothack_type.d_dropin_test_master
Fix type.d drop-in ordering for #14439 - duplicate against master
2020-01-02 13:41:16 +01:00
Frantisek Sumsal e514aa1eea tree-wide: yet another batch of coccinelle recommendations
Prettify certain parts of the codebase using coccinelle transformations
(no functional changes).
2020-01-02 13:32:55 +01:00
Yu Watanabe 48d0248e6d network: bump netlink receive buffer size to 128M
Prompted by #14417.
2020-01-02 10:29:41 +01:00
Yu Watanabe b078e52855 network: add more settings for CoDel 2019-12-28 22:25:12 +09:00
Susant Sahani c695dcf929 network: Add support to configure DHCPv4 route MTU
This is useful for transitioning systems from small frames to jumbo frames.

Closes #14302
2019-12-28 21:37:26 +09:00
Susant Sahani a9a5d632da network: tc introduce codel
Please see http://man7.org/linux/man-pages/man8/tc-codel.8.html
2019-12-28 21:35:39 +09:00
Greg "GothAck" Miell e6627f2392 unit drop-in: Fix ordering of special type.d drop-ins 2019-12-27 15:10:24 +00:00
Felipe Sateler 98cd752a28 test-condition: fix group check condition
We were checking the uid, whereas we should have checked the gid
2019-12-26 12:07:54 +09:00
Leonid Evdokimov 6e3c443b56 Fix typo 2019-12-26 12:07:08 +09:00
Yu Watanabe 40681e5cdc network: add one more log message 2019-12-23 21:34:31 +01:00
Daan De Meyer b390f17892 nspawn-network: Split off udev checking from parse_interface. 2019-12-23 18:47:36 +01:00
Zbigniew Jędrzejewski-Szmek 1234d0f63e
Merge pull request #14409 from poettering/shutdown-modernization
some smaller modernizations to the shutdown loop
2019-12-21 19:21:10 +01:00
Yu Watanabe 3c4ddf5db5
Merge pull request #14407 from ssahani/dhcp-decline
network: DHCP4 introduce send decline
2019-12-21 08:40:22 +09:00
Lennart Poettering 4ca8072fd6 umount: when we fail to detach a loopback device, set the auto-clear flag
We might get lucky and this cleans up things later on automatically for
us.
2019-12-20 18:37:24 +01:00
Lennart Poettering b877c3b06f umount: check LO_FLAGS_AUTOCLEAR after LOOP_CLR_FD claimed success
Fixes: #14410
Replaces: #14386
2019-12-20 18:16:05 +01:00
Lennart Poettering 63135a2d8d umount: detect root loopback device the same way as we detect root DM devices
get_block_device() is just the nicer way to do it (since it also odes
btrfs). Also, let's already collect the dev_t of the loopback device
when we enumerate things, that allows us to do the checks simpler
without constantly stat()ing things over and over again.
2019-12-20 18:16:02 +01:00
Lennart Poettering 88287615e6 umount: show correct error message
We fucked up errno vs. r two times, let's correct that.

While we are at it, let's handle the error first, like we usually do,
and the clean case without indentation.
2019-12-20 18:15:59 +01:00
Lennart Poettering 610f9a42c4 umount: remove unneeded variable 2019-12-20 18:15:56 +01:00
Lennart Poettering 49f80dcec8 umount: line break comments again
break them like we usually do, taking our intended line width into
account.
2019-12-20 18:15:47 +01:00
Lennart Poettering b895fa08e6 Revert "Drop dbus activation stub service"
This reverts commit 07125d24ee.

In contrast to what is claimed in #13396 dbus-broker apparently does
care for the service file to be around, and otherwise will claim
"Service Not Activatable" in the time between systemd starting up the
broker and connecting to it, which the stub service file is supposed to
make go away.

Reverting this makes the integration test suite pass again on host with
dbus-broker (i.e. current Fedora desktop).

Tested with dbus-broker-21-6.fc31.x86_64.
2019-12-20 17:28:12 +01:00