Anita Zhang
cf3e57884e
man: document systemd-oomd and related items
2020-10-09 02:40:19 -07:00
Benjamin Berg
51ac77d58c
xdg-autostart: Ignore more common XDG Desktop Entry fields
...
It makes sense to ignore all the common fields that are expected and
that we can safely ignore. Note that it is fine to ignore URL as we will
already warn about the type= being wrong in that case.
Closes : #17276
2020-10-09 11:04:19 +02:00
Benjamin Berg
d5273f51a1
xdg-autostart: Add support for Path= in XDG Desktop File
...
This sets the working directory of the application.
2020-10-09 11:04:19 +02:00
Lennart Poettering
2a155c53ab
ratelimit: add ratelimit_configured() helper
...
This helper alone doesn't make too much sense, but it's preparatory work
for #17274 , and I guess it can't hurt to land it early, it does make the
ratelimit code a tiny bit prettier after all.
2020-10-09 08:58:59 +02:00
Lennart Poettering
15c689d77f
sd-event: check return value of syscals directly, avoid redundant variable assignment
...
And while we are at it, fix one incorrect error propagation.
2020-10-09 08:58:23 +02:00
Zbigniew Jędrzejewski-Szmek
081b300976
networkd: add assert to appease coverity
...
The code was OK, but not obviously so. Let's add an assert to help a
human or nonhuman reader figure it out.
Coverity CID#1433224.
2020-10-09 08:14:54 +02:00
Zbigniew Jędrzejewski-Szmek
b4c527f4ec
systemctl: fix reversed arguments in function call
...
This is confusing, but had no effect because the arguments were consistently
switched.
Coverity CID#1433223.
2020-10-09 08:04:25 +02:00
Lennart Poettering
ba28df775d
missing-syscall: fix copypasta
...
As noticed by @mbiebl:
5134e18eed (r43033443)
2020-10-08 13:52:44 +02:00
Michael Biebl
cd20659891
basic/missing_syscall: fix syscall numbers for mips*
...
Thanks Christian Brauner @brauner
Fixes : #17261
2020-10-08 10:25:15 +02:00
Lennart Poettering
e7bcecf0e4
Merge pull request #17279 from poettering/systemctl-split-up
...
systemctl: split huge .c file into smaller bits
2020-10-08 10:17:29 +02:00
Yu Watanabe
45a536980c
Merge pull request #17271 from yuwata/network-route-improve-multipath-route-support
...
network: improve multipath route support
2020-10-08 15:55:35 +09:00
Anita Zhang
a2db02253c
core: add systemd-oomd implicit dependencies
2020-10-07 17:12:24 -07:00
Anita Zhang
87e2bafff9
systemd-oomd: service files
2020-10-07 17:12:24 -07:00
Anita Zhang
5c616ecfcd
systemd-oomd: dbus hook ups and oomctl CLI
2020-10-07 17:12:24 -07:00
Anita Zhang
fe8d22fb09
core: systemd-oomd pid1 integration
2020-10-07 17:12:24 -07:00
Anita Zhang
9de5e32136
systemd-oomd: manager/daemon
2020-10-07 17:12:24 -07:00
Anita Zhang
b41dcc51eb
cgroup-util: add cg_get_attribute_as_bool() helper
2020-10-07 17:12:24 -07:00
Anita Zhang
61ff7397d0
systemd-oomd: unit testable helper functions
...
Helpers used by the systemd-oomd daemon to read/fill in various contexts and
make detection and kill decisions.
i.e. a simplified/less configurable version of
https://github.com/facebookincubator/oomd/tree/master/src/oomd .
2020-10-07 17:12:22 -07:00
Anita Zhang
42b83e8e33
shared: helpers to read pressure stats from cgroups
2020-10-07 16:17:24 -07:00
Anita Zhang
510ca79cf2
parse-util: add parse_loadavg_fixed_point
2020-10-07 16:17:24 -07:00
Anita Zhang
e30bbc90c9
core: add varlink call to get cgroup paths of units using ManagedOOM*=
2020-10-07 16:17:23 -07:00
Anita Zhang
e8e9227f5c
varlink: add server write states to disconnect check
...
While a server is in the VARLINK_PENDING_METHOD or VARLINK_PENDING_METHOD_MORE
states and its write end is disconnected and it gets a POLLHUP, we
should disconnect since it can't write anymore.
In the case of systemd-oomd disconnecting while pid1 was pending-more, this
condition left pid1 in a state where it started throttling from
continually getting POLLHUP.
2020-10-07 16:17:23 -07:00
Anita Zhang
4d824a4e0b
core: add ManagedOOM*= properties to configure systemd-oomd on the unit
...
This adds the hook ups so it can be read with the usual systemd
utilities. Used in later commits by sytemd-oomd.
2020-10-07 16:17:23 -07:00
Lennart Poettering
daf71ef61c
systemctl: split up humungous systemctl.c file
...
This is just some refactoring: shifting around of code, not change in
codeflow.
This splits up the way too huge systemctl.c in multiple more easily
digestable files. It roughly follows the rule that each family of verbs
gets its own .c/.h file pair, and so do all the compat executable names
we support. Plus three extra files for sysv compat (which existed before
already, but I renamed slightly, to get the systemctl- prefix lik
everything else), a -util file with generic stuff everything uses, and a
-logind file with everything that talks directly to logind instead of
PID1.
systemctl is still a bit too complex for my taste, but I think this way
itc omes in a more digestable bits at least.
No change of behaviour, just reshuffling of some code.
2020-10-07 23:12:15 +02:00
Lennart Poettering
4dcc0653b5
systemctl: move compare_unit_info() to bus-unit-util.[ch]
...
It's an auxiliary function to the UnitInfo structures, and very generic.
Let's hence move it over to the other code operating with UnitInfo, even
if it's not used by code outside of systemctl (yet).
2020-10-07 22:19:37 +02:00
Lennart Poettering
e2d839d316
pretty-print: don't abbreviate needlessly in user-facing string
2020-10-07 22:19:33 +02:00
Lennart Poettering
0f2219bb8f
basic: include stddef.h since we use NULL in header
2020-10-07 22:19:10 +02:00
Yu Watanabe
ceea6c1aff
network: introduce IPV4_ADDRESS_FMT_STR macro
...
This also moves ADDRESS_FMT_VAL() macro to networkd-address.h, and
renames it to IPV4_ADDRESS_FMT_VAL().
2020-10-08 02:51:23 +09:00
Yu Watanabe
d442bb3728
network: make Gateway= in [Route] section accept an empty string
2020-10-08 02:51:23 +09:00
Yu Watanabe
d306d1d0ca
network: introduce Gateway=_dhcp4 and _dhcp6, and deprecate "_dhcp"
...
Fixes #17249 .
2020-10-08 02:51:23 +09:00
Yu Watanabe
d9005dec6e
test-network: do not fail when multiple ipv6 default gateways are configured
...
When multiple ipv6 default gateways are set, kernel seems to merge them
into a multipath route.
2020-10-08 02:51:23 +09:00
Yu Watanabe
bff94a84c2
util: make local_gateways() support RT_VIA and RT_MULTIPATH
...
Then, `networkctl status` correctly shows gateways.
2020-10-08 02:51:23 +09:00
Yu Watanabe
f9bb333832
network: manage multipath routes separately
2020-10-08 02:51:23 +09:00
Yu Watanabe
de52a83cb7
sd-netlink: introduce sd_netlink_message_read_data()
2020-10-08 02:51:23 +09:00
Yu Watanabe
2fe1d557e5
sd-netlink: introduce rtattr_read_nexthop()
2020-10-08 02:51:23 +09:00
Yu Watanabe
d6ad41e27d
network: free Route object when route_remove() fails
...
When route_remove() succeeds, the Route object will be freed later by
manager_rtnl_process_route().
2020-10-08 02:51:23 +09:00
Yu Watanabe
423c249c2e
network: constify arguments
2020-10-08 02:51:23 +09:00
Yu Watanabe
297f9d86fe
test-network: add a test case for IPv4 route with IPv6 gateway
2020-10-08 02:51:13 +09:00
Renaud Métrich
5177cb0a9a
unit: don't emit PropertiesChanged signal if adding a dependency to a unit is a no-op
2020-10-07 18:16:08 +02:00
Yu Watanabe
6dd5398137
network: support IPv4 route with IPv6 gateway
2020-10-08 00:06:19 +09:00
Yu Watanabe
2c59a8a624
sd-netlink: fix type of RTA_VIA
2020-10-07 15:22:10 +02:00
Yu Watanabe
ad208fac73
network: also manage routes without RTA_OIF attribute
2020-10-07 15:22:10 +02:00
Yu Watanabe
fd7701bf31
network: ignore Scope= for IPv6 routes as it will not be used
2020-10-07 15:22:10 +02:00
Yu Watanabe
0a2808a208
test-network: drop meaningless Scope= settings in the config
2020-10-07 15:22:10 +02:00
Yu Watanabe
8973df5c42
network: set default priority for IPv6 routes
...
See inet6_rtm_newroute() in kernel's net/ipv6/route.c.
2020-10-07 15:22:09 +02:00
Yu Watanabe
b2f61e0da0
basic: import linux/ipv6_route.h
2020-10-07 15:22:09 +02:00
Yu Watanabe
473a64e569
meson: add missing files
2020-10-07 15:22:09 +02:00
Lennart Poettering
b8aaceb9b5
systemctl: drop unsused variable original_stdout_is_tty
...
Unused since de9a8fe18e0168b65ae50b6dde2865f647fc92a2.
2020-10-07 14:13:19 +02:00
Lennart Poettering
816d460a7c
update TODO
2020-10-07 14:12:19 +02:00
Lennart Poettering
1378ac6989
Merge pull request #17231 from poettering/event-source-exit-on-failure
...
sd-event: add "exit-on-failure" feature for event source
2020-10-07 12:55:56 +02:00