summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Revert "meson: allow WatchdogSec= in services to be configured"revert-13843-watchdogEvgeny Vereshchagin2019-10-2517-23/+16
| | | | This reverts commit 21d0dd5a89fe0ef259ca51ebea9f39dd79a341c2.
* meson: allow WatchdogSec= in services to be configuredZbigniew Jędrzejewski-Szmek2019-10-2517-16/+23
| | | | | | | | | | | | | | | | As discussed on systemd-devel [1], in Fedora we get lots of abrt reports about the watchdog firing [2], but 100% of them seem to be caused by resource starvation in the machine, and never actual deadlocks in the services being monitored. Killing the services not only does not improve anything, but it makes the resource starvation worse, because the service needs cycles to restart, and coredump processing is also fairly expensive. This adds a configuration option to allow the value to be changed. If the setting is not set, there is no change. My plan is to set it to some ridiculusly high value, maybe 1h, to catch cases where a service is actually hanging. [1] https://lists.freedesktop.org/archives/systemd-devel/2019-October/043618.html [2] https://bugzilla.redhat.com/show_bug.cgi?id=1300212
* fileio: introduce read_full_virtual_file() for reading virtual files in ↵Franck Bui2019-10-253-5/+113
| | | | | | | | | | | | | | | | | | | sysfs, procfs Virtual filesystems such as sysfs or procfs use kernfs, and kernfs can work with two sorts of virtual files. One sort uses "seq_file", and the results of the first read are buffered for the second read. The other sort uses "raw" reads which always go direct to the device. In the later case, the content of the virtual file must be retrieved with a single read otherwise subsequent read might get the new value instead of finding EOF immediately. That's the reason why the usage of fread(3) is prohibited in this case as it always performs a second call to read(2) looking for EOF which is subject to the race described previously. Fixes: #13585.
* Merge pull request #13682 from ↵Zbigniew Jędrzejewski-Szmek2019-10-253-120/+237
|\ | | | | | | | | zachsmith/systemd-sleep-prefer-resume-over-priority systemd-sleep: prefer resume device or file
| * systemd-sleep: improve /proc/swaps open fail messageZach Smith2019-10-241-1/+1
| |
| * systemd-sleep: always prefer resume device or fileZach Smith2019-10-243-119/+236
| | | | | | | | | | | | | | This change checks each swap partition or file reported in /proc/swaps to see if it matches the values configured with resume= and resume_offset= kernel parameters. If a match is found, the matching swap entry is used as the hibernation location regardless of swap priority.
* | Merge pull request #13623 from yuwata/network-wifi-iftypeZbigniew Jędrzejewski-Szmek2019-10-2520-30/+6668
|\ \
| * | network: add default configurations for wireless interfacesYu Watanabe2019-10-253-0/+20
| | |
| * | network: support matching based on wifi interfece typeYu Watanabe2019-10-2517-30/+6648
|/ /
* | various tools: be more explicit when a glob is passed when not supportedZbigniew Jędrzejewski-Szmek2019-10-257-32/+50
| | | | | | | | | | | | | | | | | | | | | | | | See https://bugzilla.redhat.com/show_bug.cgi?id=1763488: when we say that 'foo@*.service' is not a valid unit name, this is not clear enough. Let's include the name of the operation that does not support globbing in the error message: $ build/systemctl enable 'foo@*.service' Glob pattern passed to enable, but globs are not supported for this. Invalid unit name "foo@*.service" escaped as "foo@\x2a.service". ...
* | resolved: set stream type during DnsStream creationDan Streetman2019-10-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DnsStreamType was added to track different types of DNS TCP streams, instead of refcounting all of them together. However, the stream type was not actually set into the stream->type field, so while the reference count was correctly incremented per-stream-type, the reference count was always decremented in the cleanup function for stream type 0, leading to underflow for the type 0 stream (unsigned) refcount, and preventing new type 0 streams from being created. Since type 0 is DNS_STREAM_LOOKUP, which is used to communicate with upstream nameservers, once the refcount underflows the stub resolver no longer is able to successfully fall back to TCP upstream lookups for any truncated UDP packets. This was found because lookups of A records with a large number of addresses, too much to fit into a single 512 byte DNS UDP reply, were causing getaddrinfo() to fall back to TCP and trigger this bug, which then caused the TCP fallback for later large record lookups to fail with 'connection timed out; no servers could be reached'. The stream type was introduced in commit: 652ba568c6624bf40d735645f029d83d21bdeaa6
* | Merge pull request #13836 from systemd/assert-cleanups-and-constificationYu Watanabe2019-10-2515-121/+101
|\ \ | | | | | | Assert cleanups and constification
| * | sd-dhcp-client: do not call assert in public functionsassert-cleanups-and-constificationZbigniew Jędrzejewski-Szmek2019-10-241-5/+5
| | |
| * | sd-dhcp-client: remove unnecessary cleanup functionZbigniew Jędrzejewski-Szmek2019-10-241-5/+2
| | | | | | | | | | | | https://github.com/systemd/systemd/pull/13663#discussion_r335327099
| * | sd-netlink: constify object pointers passed to gettersZbigniew Jędrzejewski-Szmek2019-10-247-83/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | sd-netlink is not public yet, so we can change the interface. I did not touch interfaces of functions like sd_netlink_wait() and sd_rtnl_message_new_link() which do not modify the object that is passed in, because in the future we might want to change the code to e.g. take a reference to the parent object or otherwise require a non-const reference.
| * | sd-device: allow sd_device_get_devtype to be called with NULL arg and do not ↵Zbigniew Jędrzejewski-Szmek2019-10-241-4/+4
| | | | | | | | | | | | | | | | | | | | | assert We shouldn't call assert() on user-specified arguments in public functions. While at it, let's return 1 if the type exists, and 0 otherwise.
| * | Move PLYMOUTH_SOCKET define to def.h and nuke plymouth-util.hZbigniew Jędrzejewski-Szmek2019-10-245-10/+7
| | | | | | | | | | | | Let's not have a file with a single define.
| * | Remove unused plymouth_running() functionZbigniew Jędrzejewski-Szmek2019-10-243-14/+0
| | |
* | | machine-id-setup: avoid unexpected abortingChen Qi2019-10-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Code should not be reached 'Unhandled option' at src/machine-id-setup/machine-id-setup-main.c:97, function parse_argv(). Aborting. Aborted This behaviour is not good and will confuse user. Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
* | | basic/fs-util: change CHASE_OPEN flag into a separate output parameterZbigniew Jędrzejewski-Szmek2019-10-2433-180/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | chase_symlinks() would return negative on error, and either a non-negative status or a non-negative fd when CHASE_OPEN was given. This made the interface quite complicated, because dependning on the flags used, we would get two different "types" of return object. Coverity was always confused by this, and flagged every use of chase_symlinks() without CHASE_OPEN as a resource leak (because it would this that an fd is returned). This patch uses a saparate output parameter, so there is no confusion. (I think it is OK to have functions which return either an error or an fd. It's only returning *either* an fd or a non-fd that is confusing.)
* | | test-socket-util: avoid writing past the defined bufferZbigniew Jędrzejewski-Szmek2019-10-241-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | .sun_path has 108 bytes, and we'd write a string of 108 bytes + NUL. I added this test, but I don't know what it was supposed to test. Let's just remove. Fixes #13713. CID#1405854.
* | | Merge pull request #13452 from yuwata/network-reloadZbigniew Jędrzejewski-Szmek2019-10-2417-65/+360
|\ \ \ | |/ / |/| | network: add networkctl reload and reconfigure
| * | network: add tests for "networkctl reconfigure"Yu Watanabe2019-10-241-0/+27
| | |
| * | networkctl: introduce reconfigure methodYu Watanabe2019-10-242-20/+74
| | |
| * | networkctl: use format_ifname_full()Yu Watanabe2019-10-241-12/+6
| | |
| * | networkctl: fix error messageYu Watanabe2019-10-241-1/+2
| | |
| * | format-util: introduce format_ifname_full()Yu Watanabe2019-10-242-3/+24
| | |
| * | network: introduce Reconfigure() bus methodYu Watanabe2019-10-246-5/+46
| | |
| * | network: include netinet/in.h to fix build errorYu Watanabe2019-10-241-0/+1
| | |
| * | test-network: add tests for "networkctl reload"Yu Watanabe2019-10-241-0/+26
| | |
| * | networkctl: add reload commandYu Watanabe2019-10-242-0/+36
| | |
| * | network: also reload .netdev filesYu Watanabe2019-10-244-7/+13
| | |
| * | network: add Reload() dbus methodYu Watanabe2019-10-246-20/+108
| | |
* | | test: drop duplicated 's'Yu Watanabe2019-10-241-1/+1
|/ / | | | | | | | | | | | | | | This fixes the following log message ``` Container TEST-07-ISSUE-1981 terminated by signal KILL. E: test timed out after 30s s ```
* | Merge pull request #13828 from keszybz/networkctl-print-wlanYu Watanabe2019-10-245-131/+222
|\ \ | | | | | | networkctl support for ssid and bssid
| * | networkctl: print ssid and bssidZbigniew Jędrzejewski-Szmek2019-10-241-0/+61
| | |
| * | networkctl: create the sd_device structure just onceZbigniew Jędrzejewski-Szmek2019-10-241-26/+33
| | | | | | | | | | | | | | | This is mostly in preparation for future changes: a proper freeing function is now called on the LinkInfo items.
| * | network: split out functions to get ssid and bssidZbigniew Jędrzejewski-Szmek2019-10-244-95/+112
| | |
| * | networkctl: split out helper functionZbigniew Jędrzejewski-Szmek2019-10-231-5/+10
| | |
| * | networkctl: show carrier in green for loopback ifaceZbigniew Jędrzejewski-Szmek2019-10-231-5/+6
| | | | | | | | | | | | | | | We don't ever expect anything different, so let's hightlight that carrier in this case is OK.
* | | udev/cdrom_id: Do not open CD-rom in exclusive mode.Michal Suchanek2019-10-241-23/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When you have a CD automunt solution that talks directly to the kernel independently of udev it races with cdrom_id for exclusive access to the device failing unpredictably. The whole is_mounted function in cdrom_id is broken: there is no saying what happens between calling is_mounted and opening the device. Hence assume that the device can be mounted asynchronously at any time, do not use exclusive access, and do away with is_mouted. Signed-off-by: Michal Suchanek <msuchanek@suse.de>
* | | Merge pull request #13807 from 1848/ip6gre_key_fixYu Watanabe2019-10-232-0/+46
|\ \ \ | | | | | | | | networkd: Set key (IFLA_GRE_IKEY,IFLA_GRE_OKEY) on ip6gre interfaces.
| * | | Added ip6gre example to man18482019-10-221-0/+10
| | | |
| * | | Set key (IFLA_GRE_IKEY,IFLA_GRE_OKEY) on ip6gre interfaces.18482019-10-201-0/+36
| | | |
* | | | l10n(zh_TW): update translationspan934122019-10-231-25/+152
| | | |
* | | | run: add -u as a synonym for --unitDavid Tardon2019-10-232-5/+5
| | | | | | | | | | | | | | | | | | | | Other tools that do have --unit= option (journalctl and systemd-cgls) already do this, so let's be consistent.
* | | | Merge pull request #13825 from keszybz/nspawn-console-helpYu Watanabe2019-10-232-42/+55
|\ \ \ \ | | | | | | | | | | nspawn: fix handling of --console=help
| * | | | man: reorder description of nspawn --consoleZbigniew Jędrzejewski-Szmek2019-10-231-23/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default value was described at the end of two long paragraphs. Make the first para self contained, and move the description of --console=pipe into the second para.
| * | | | nspawn: fix handling of --console=helpZbigniew Jędrzejewski-Szmek2019-10-231-19/+30
| | | | | | | | | | | | | | | | | | | | We shouldn't continue to run the container after printing help.
* | | | | Merge pull request #13142 from yuwata/network-wifi-ssid-support-nl80211Zbigniew Jędrzejewski-Szmek2019-10-2326-70/+542
|\ \ \ \ \ | | |_|/ / | |/| | | network: wifi ssid support with nl80211