Commit graph

25910 commits

Author SHA1 Message Date
Tejun Heo 9be572497d core: introduce CGroupIOLimitType enums
Currently, there are two cgroup IO limits, bandwidth max for read and write,
and they are hard-coded in various places.  This is fine for two limits but IO
is expected to grow more limits - low, high and max limits for bandwidth and
IOPS - and hard-coding each limit won't make sense.

This patch replaces hard-coded limits with an array indexed by
CGroupIOLimitType and accompanying string and default value tables so that new
limits can be added trivially.
2016-05-18 13:50:56 -07:00
Zbigniew Jędrzejewski-Szmek 4e080f502a hwdb: run "make hwdb-udate" (#3280) 2016-05-17 23:26:15 -04:00
Susant Sahani 7209086d8a networkd: do not update state or IPv6LL address if link is failed or lingering
This is partial fix for #2228 and #2977, #3204.

bridge-test: netdev ready
docker0: Gained IPv6LL
wlan0: Gained IPv6LL
eth0: Gained IPv6LL
Enumeration completed
bridge-test: netdev exists, using existing without changing its
parameters
vboxnet0: IPv6 enabled for interface: Success
lo: Configured
docker0: Could not drop address: No such process
vboxnet0: Gained carrier
wlan0: Could not drop address: No such process
eth0: Could not drop address: No such process
eth0: Could not drop address: No such process
eth0: Could not drop address: No such process
vboxnet0: Gained IPv6LL
vboxnet0: Could not set NDisc route or address: Invalid argument
vboxnet0: Failed
[New Thread 0x7ffff6505700 (LWP 1111)]
[Thread 0x7ffff6505700 (LWP 1111) exited]
Assertion 'link->state == LINK_STATE_SETTING_ROUTES' failed at
src/network/networkd-link.c:672, function link_enter_configured().
Aborting.

Program received signal SIGABRT, Aborted.
0x00007ffff6dc6a98 in raise () from /lib64/libc.so.6
Missing separate debuginfos, use: dnf debuginfo-install
iptables-1.4.21-15.fc23.x86_64 libattr-2.4.47-14.fc23.x86_64
libidn-1.32-1.fc23.x86_64 pcre-8.38-7.fc23.x86_64

Debugging

(gdb) bt
"link->state == LINK_STATE_SETTING_ROUTES", file=0x5555556a34c8
"src/network/networkd-link.c", line=672,
    func=0x5555556a56d0 <__PRETTY_FUNCTION__.14850>
"link_enter_configured") at src/basic/log.c:788
src/network/networkd-link.c:672
src/network/networkd-link.c:720
flags=0 '\000', scope=0 '\000', cinfo=0x7fffffffe020) at
src/network/networkd-address.c:344
(rtnl=0x5555556eded0, message=0x55555570ff20, userdata=0x5555556ec590)
at src/network/networkd-manager.c:604
m=0x55555570ff20) at src/libsystemd/sd-netlink/sd-netlink.c:365
at src/libsystemd/sd-netlink/sd-netlink.c:395
ret=0x0) at src/libsystemd/sd-netlink/sd-netlink.c:429
revents=1, userdata=0x5555556eded0) at
src/libsystemd/sd-netlink/sd-netlink.c:723
src/libsystemd/sd-event/sd-event.c:2268
src/libsystemd/sd-event/sd-event.c:2629
timeout=18446744073709551615) at src/libsystemd/sd-event/sd-event.c:2688
bus=0x5555556eeba0, name=0x55555568a2f5 "org.freedesktop.network1",
timeout=30000000,
    check_idle=0x55555556adb6 <manager_check_idle>,
userdata=0x5555556ec590) at src/shared/bus-util.c:134
src/network/networkd-manager.c:1130
src/network/networkd.c:127

(gdb) f 3
src/network/networkd-link.c:672
672         assert(link->state == LINK_STATE_SETTING_ROUTES);
(gdb) p link->state
$1 = LINK_STATE_FAILED

We should not be in this state .

even if vboxnet0 failed we went into this state.

vboxnet0: Could not set NDisc route or address: Invalid argument
vboxnet0: Failed
2016-05-17 22:59:56 -04:00
Susant Sahani fe7ca21acf networkd: add route expiration handler (#3242)
Fix for #3232.
2016-05-17 21:36:43 -04:00
Peter Mattern 246ba4aaa9 coredump: Improve man pages 2016-05-17 20:43:27 -04:00
Clemens Gruber 77ff6022fa networkd: Add EmitRouter= option for DHCP Server (#3251)
Add an option to disable appending DHCP option 3 (Router) to the DHCP
OFFER and ACK packets.
This commit adds the boolean option EmitRouter= for the [DHCPServer]
section in .network files.

Rationale: On embedded devices, it is very useful to have a DHCP server
running on an USB OTG ethernet gadget interface to avoid manual setup on
the client PCs, but it should only serve IP addresses, no route(r)s.
Otherwise, Windows clients experience network connectivity issues, due
to them using the address set in DHCP option 3 as default gateway.

Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>
2016-05-17 19:34:25 -04:00
Jonathan Boulle a363a2e45f core/dbus: use free_and_strdup to simplify code (#3279)
Makes it consistent with the other branches here.
2016-05-17 19:30:37 -04:00
Marcel Holtmann d6f5a432b0 hwdb: Update database of Bluetooth company identifiers 2016-05-17 18:52:37 +02:00
Lennart Poettering e2c9192a45 vconsole: add log_oom() where appropriate 2016-05-17 10:29:28 +02:00
Lennart Poettering a45bf10d29 Merge pull request #3258 from keszybz/small-networkd-cleanup
Small networkd cleanup
2016-05-17 10:12:30 +02:00
Lennart Poettering 999a43f80a update NEWS 2016-05-16 23:07:08 +02:00
Lennart Poettering 0069a0dd14 man: clarify that IOXyz= only applies to the unified hierarchy, and BlockIOXyz= to the legacy hierarchy
With this change for each setting we say which hierarachy it applies to briefly
in the first sentence of the description, plus in longer form in an extra
pargraph at the end, with a recommendation for the counterpart of the option in
the other hierarchy.

Also adds markup and the "=" suffix to all mentioned settings.
2016-05-16 22:48:45 +02:00
Lennart Poettering 25b0e6cb99 update TODO 2016-05-16 22:18:39 +02:00
Lennart Poettering 3103459e90 Merge pull request #3193 from htejun/cgroup-io-controller
core: add io controller support on the unified hierarchy
2016-05-16 22:05:27 +02:00
Zbigniew Jędrzejewski-Szmek a87c45a84b CONTRIBUTING: recommend force-push (#3273) 2016-05-16 21:44:35 +02:00
John Paul Adrian Glaubitz cd042078df basic: Fix incorrect architecture mapping on sparc64. (#3274) 2016-05-16 21:25:36 +02:00
Michal Sekletar 833f92ad39 core: don't log job status message in case job was effectively NOP (#3199)
We currently generate log message about unit being started even when
unit was started already and job didn't do anything. This is because job
was requested explicitly and hence became anchor job of the transaction
thus we could not eliminate it. That is fine but, let's not pollute
journal with useless log messages.

$ systemctl start systemd-resolved
$ systemctl start systemd-resolved
$ systemctl start systemd-resolved

Current state:
$ journalctl -u systemd-resolved | grep Started

May 05 15:31:42 rawhide systemd[1]: Started Network Name Resolution.
May 05 15:31:59 rawhide systemd[1]: Started Network Name Resolution.
May 05 15:32:01 rawhide systemd[1]: Started Network Name Resolution.

After patch applied:
$ journalctl -u systemd-resolved | grep Started

May 05 16:42:12 rawhide systemd[1]: Started Network Name Resolution.

Fixes #1723
2016-05-16 11:24:51 -04:00
Stefan Saraev 306578e518 missing.h: add BTRFS_IOC_QUOTA_RESCAN_WAIT (#3266) 2016-05-16 10:58:46 -04:00
Kyle Russell 6a08e1b0cd vconsole-setup: Store fonts on heap (#3268)
More friendly to the stack.
2016-05-16 10:41:30 -04:00
Peter Hutterer 7656702318 hwdb: add touchpad resolution for Lenovo E530 (#3265)
https://bugs.freedesktop.org/show_bug.cgi?id=95231
2016-05-15 22:35:47 -04:00
topimiettinen 737ba3c82c namespace: Make private /dev noexec and readonly (#3263)
Private /dev will not be managed by udev or others, so we can make it
noexec and readonly after we have made all device nodes. As /dev/shm
needs to be writable, we can't use bind_remount_recursive().
2016-05-15 22:34:05 -04:00
gdamjan 80f524a4c9 /var/tmp instead of /tmp/var in systemd.unit man page (#3262) 2016-05-15 21:43:00 -04:00
Andre Klärner 2374374499 man: fix typo (#3261) 2016-05-15 21:40:52 -04:00
Zbigniew Jędrzejewski-Szmek bd9a722196 sd-dhcp6-client: add log_errno macro and improve debug messages a bit 2016-05-15 19:57:00 -04:00
Zbigniew Jędrzejewski-Szmek 483d099e16 tree-wide: drop spurious "&"s when passing functions around
Also adjust indentation in various places.
2016-05-15 19:56:59 -04:00
Susant Sahani bc48c51f72 networkd: do not generate a mac address for vlan interfaces (#3221)
While creating a VLAN the mac address should be copied from the parent interface, so that
the VLANs inherit the MAC address of the physical interface.

Before:
```
3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:26:c6:85:a3:c2 brd ff:ff:ff:ff:ff:ff
    ...
6: vlan1@wlp3s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 22:07:73:9d:43:59 brd ff:ff:ff:ff:ff:ff
7: vlan2@wlp3s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 46:30:76:33:35:d4 brd ff:ff:ff:ff:ff:ff
```

After:
```
3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:26:c6:85:a3:c2 brd ff:ff:ff:ff:ff:ff
    ...
11: vlan1@wlp3s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:26:c6:85:a3:c2 brd ff:ff:ff:ff:ff:ff
12: vlan2@wlp3s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:26:c6:85:a3:c2 brd ff:ff:ff:ff:ff:ff
```

v2 of #1573, with fixed commit message.
2016-05-15 09:45:30 -04:00
Susant Sahani 6df6d89879 networkd: bridge add support to configure multicast snooping (#3223)
This patch implements support for the IFLA_BR_MCAST_SNOOPING attribute
it can change the multicast snooping value.

IGMP snooping monitors the Internet Group Management Protocol (IGMP)
traffic between hosts and multicast routers.
2016-05-15 09:15:20 -04:00
Zbigniew Jędrzejewski-Szmek d9d9439347 networkd: fix copy-pasto in error message 2016-05-14 16:47:59 -04:00
Zbigniew Jędrzejewski-Szmek b9642f4199 networkd: drop route_drop
It is just an alias for route_free which requires that route is not null,
but it was only used in one place where it was checked that route is not
null anyway. Let's just call route_free instead.
2016-05-14 16:46:01 -04:00
Lars Uebernickel 17fd746098 busctl: use Monitoring interface (#3245)
This is now the recommended way to do monitoring by upstream D-Bus.
It's also allowed in the default policy, whereas eavesdrop is not
anymore, which effectively broke busctl on many systems.
2016-05-14 16:10:22 -04:00
Tejun Heo 99e66921c8 core: allow slice to be overriden if cgroups aren't realized (#3246)
unit_set_slice() fails with -EBUSY if the unit already has a slice associated
with it.  This makes it impossible to override slice through dropin config or
over dbus.  There's no reason to disallow slice changes as long as cgroups
aren't realized.  Fix it.

Fixes #3240.

Signed-off-by: Tejun Heo <htejun@fb.com>
Reported-by: Davide Cavalca <dcavalca@fb.com>
2016-05-14 15:56:53 -04:00
Zbigniew Jędrzejewski-Szmek 4b653dd2b3 Merge pull request #3253 from alshopov/master
Bulgarian translation of systemd
2016-05-14 12:52:59 -04:00
topimiettinen 9e5f825280 namespace: unmount old /dev under our new private /dev (#3254)
Drop all dangling old /dev mounts before mounting a new private /dev tree.
2016-05-14 12:46:23 -04:00
Alexander Shopov efe57fc827 Sort LINGUAS similar to Makefile.am:dist_catalog_DATA 2016-05-14 14:00:02 +03:00
Alexander Shopov c66c2c7c4f po, catalog - add Bulgarian translation 2016-05-14 13:57:34 +03:00
Lennart Poettering 2099b3e993 nspawn: drop spurious newline 2016-05-12 20:14:58 +02:00
Lennart Poettering 42d61dedcf update TODO 2016-05-12 20:14:46 +02:00
kayrus 6900c740e1 core: added ListUnitsByNames dbus method (#3182)
This new method returns information by unit names. Instead of ListUnitsByPatterns
this method returns information of inactive and even unexisting units.
Moved dbus unit reply logic into a separate shared function.
Resolves https://github.com/coreos/fleet/pull/1418
2016-05-12 18:58:59 +02:00
Daniel Drake 7163e1ca11 Create initrd-root-device.target synchronization point (#3239)
Add a synchronization point so that custom initramfs units can run
after the root device becomes available, before it is fsck'd and
mounted.

This is useful for custom initramfs units that may modify the
root disk partition table, where the root device is not known in
advance (it's dynamically selected by the generators).
2016-05-12 18:42:39 +02:00
Victor Toso 42d35e1301 logind: introduce LockedHint and SetLockedHint (#3238)
Desktop environments can keep this property up to date to allow
applications to easily track session's Lock status.
2016-05-11 19:34:13 +02:00
Evgeny Vereshchagin fe1ef0f86e coredump: use next_datagram_size_fd instead of ioctl(FIONREAD) (#3237)
We need to be sure that the size returned here actually matches what we will read with recvmsg() next

Fixes #2984
2016-05-11 14:29:24 +02:00
Lennart Poettering 4b273d46bb Merge pull request #3220 from keszybz/install-fixes
Fix "preset-all" with dangling symlinks and install-section hint emitted too eagerly
2016-05-10 16:44:29 +02:00
tblume 773ebc0c32 man: document the nfs mount option bg as unsupported (#3231)
The nfs mount option bg will not be supported with systemd.

Reasons are discussed here:
https://github.com/systemd/systemd/pull/3169
2016-05-10 16:20:03 +02:00
tblume 2a44df950f units: make sure that fsck is executed before quotacheck
fsck determines wheter an automatic quotacheck should be executed.
Hence fsck service needs to run before quotacheck service.
2016-05-10 14:10:17 +02:00
Sylvain Plantefève 2da9330521 catalog: update French translation (#3228) 2016-05-09 21:34:16 -04:00
Zbigniew Jędrzejewski-Szmek dff4bf93d4 locale-util: mark special_glyph() as _const_
_const_ means that the caller can assume that the function will return the same
result every time (and will not modify global memory). special_glyph() meets
this: even though it depends on global memory, that part of global memory is
not expected to change. This allows the calls to special_glyph() to be
optimized, even if -flto is not used.
2016-05-09 15:17:57 -04:00
Zbigniew Jędrzejewski-Szmek 323b7dc903 tree-wide: rename draw_special_char to special_glyph
That function doesn't draw anything on it's own, just returns a string, which
sometimes is more than one character. Also remove "DRAW_" prefix from character
names, TREE_* and ARROW and BLACK_CIRCLE are unambigous on their own, don't
draw anything, and are always used as an argument to special_glyph().

Rename "DASH" to "MDASH", as there's more than one type of dash.
2016-05-09 15:17:57 -04:00
Zbigniew Jędrzejewski-Szmek a760db24bb shared/install: use "→" instead of "pointing to" for a symlink
It's quite a bit shorter and just as readable.

(The full sentence with "pointing to" was added to replace a text that used
"ln -s %s %s". Using the "ln" syntax is indeed unclear, because it's not
obvious which is the source and which is the target, and because symlink(2)
uses the opposite order to ln(1). But with the unicode arrow there should
be no ambiguity.)
2016-05-09 15:17:57 -04:00
Zbigniew Jędrzejewski-Szmek 8515830341 shared/install: do not print warning when a unit is already enabled
Executing 'systemctl enable' on the same unit twice would cause
a warning about a missing [Install] section to be printed. To avoid
this, count all symlinks that "would" be created, and return 1
no matter if we actually created a symlink or skipped creation because
it already exists.
2016-05-09 15:17:57 -04:00
Zbigniew Jędrzejewski-Szmek 893275df36 shared/install: handle dangling aliases as an explicit case, report nicely
This fixes 'preset-all' with a unit that is a dangling symlink.

$ systemctl --root=/ preset-all
Unit syslog.service is an alias to a unit that is not present, ignoring.
Unit auditd.service is masked, ignoring.
Unit NetworkManager.service is masked, ignoring.
2016-05-09 15:17:56 -04:00