Lennart Poettering
39adc47495
Merge pull request #10658 from yuwata/udevd-worker-performance
...
udev: improve performance
2018-11-06 20:01:37 +03:00
Lennart Poettering
9edcbc4f44
Merge pull request #10602 from yuwata/sd-device-logs
...
update log messages
2018-11-06 19:33:51 +03:00
Lennart Poettering
b992109b3e
Merge pull request #10633 from yuwata/sd-resolve-destroy
...
Another solution to fix wireguard issues
2018-11-06 19:30:59 +03:00
Yu Watanabe
ed2e7967be
time-util: make parse_sec() not accept "12.34.56"
...
This also changes the rational number treatment.
So, the limitations introduced by 8079c90333
and f6a178e91d are relaxed.
Fixes #10619 .
2018-11-06 19:24:47 +03:00
Yu Watanabe
faae64fa3d
udevd: increase default number of workers
...
The uevent handling in udevd is not cpu hungry.
So, let's increase the default number of workers per cpu.
This decrease the number of queued uevents.
Without this commit (children_max is 16 on my laptop)
```
$ journalctl -b -u systemd-udevd.service | grep reached | wc -l
1544
```
With this commit (children_max is 30 on my laptop)
```
$ journalctl -b -u systemd-udevd.service | grep reached | wc -l
7
```
2018-11-07 00:25:20 +09:00
Yu Watanabe
eca195ec23
udevd: wait 3 seconds before killing worker processes
...
During boot process, many worker processes are forked and killed.
To decrease cycles of forking and killing worker, let's wait
3 seconds before killing workers. If new uevent or inotify event
comes within the delay, the killing porcess will be cancelled.
2018-11-07 00:25:13 +09:00
Yu Watanabe
da14313418
udevd: drop redundant logic of receiving uevent
...
If there exists pending uevents, then sd-event invokes uevent handler.
So, it is not necessary to receive the next uevent in inotify event.
2018-11-06 23:53:55 +09:00
Yu Watanabe
b6107f010a
udevd: decrease indentation
2018-11-06 23:53:50 +09:00
Lennart Poettering
a0ca258adf
Merge pull request #10597 from toanju/fix-networkd-l3-loss
...
networkd: don't remove ip address or route
2018-11-06 17:44:24 +03:00
Yu Watanabe
05e6d9c64b
udevd: merge conditions to decrease indentation
2018-11-06 23:21:25 +09:00
Lennart Poettering
ed63705975
Merge pull request #10650 from yuwata/udevadm-trigger-use-write-string-file
...
udevadm: use write_string_file() helper function
2018-11-06 16:46:25 +03:00
Tobias Jungel
db688b7e55
networkd: cleanup for #10542
...
fixes: 53b1f7d
2018-11-06 16:42:12 +03:00
Lennart Poettering
ce9d553d2e
Merge pull request #10652 from yuwata/lldp-ndisc-string-table
...
lldp,ndisc: update debug logs
2018-11-06 16:41:48 +03:00
Giuseppe Scrivano
875622c39e
core, sysctl: skip ENOENT for /proc/sys/net/unix/max_dgram_qlen
...
sysctl is disabled for /proc mounted from an user namespace thus entries like
/proc/sys/net/unix/max_dgram_qlen do not exist. In this case, skip the error
and do not try to change the default for the AF_UNIX datagram queue length.
2018-11-06 16:41:34 +03:00
Lennart Poettering
0e28c86f54
ask-password: fix minor memory leak on error path
...
CID 1396557
2018-11-06 16:41:01 +03:00
Tobias Jungel
7ecf0c3e17
networkd: don't remove route
...
In case networkd is restarted this prevents a removal of an already existing
route that would be configured using networkd. With the proposed changes the
route will be kept on the interface without removing. This happens only on
physical hosts or VMs since networkd handles interface configuration slightly
different in containers.
2018-11-06 13:28:12 +01:00
Tobias Jungel
30226d2718
networkd: don't remove ip address
...
In case networkd is restarted this prevents a removal of an already existing IP
address that would be configured using networkd. With the proposed changes the
IP address will be kept on the interface without removing. This happens only on
physical hosts or VMs since networkd handles interface configuration slightly
different in containers.
2018-11-06 13:26:37 +01:00
Yu Watanabe
7cadbe09e9
sd-device: use write_string_file() helper to write sysattr
2018-11-06 21:24:03 +09:00
Yu Watanabe
835d18ba20
fileio: introduce WRITE_STRING_FILE_NOFOLLOW flag for write_string_file() and friends
2018-11-06 21:24:03 +09:00
Yu Watanabe
57512c893e
tree-wide: set WRITE_STRING_FILE_DISABLE_BUFFER flag when we write files under /proc or /sys
2018-11-06 21:24:03 +09:00
Yu Watanabe
76cdddfb9d
udevd: use set_oom_score_adjust() to set OOM score
2018-11-06 21:24:03 +09:00
Yu Watanabe
92c40e1dc8
udevadm: use write_string_file() helper function
2018-11-06 21:24:03 +09:00
Yu Watanabe
90208b8217
test: add tests for string tables for lldp and ndisc events
2018-11-06 20:15:09 +09:00
Yu Watanabe
a2dcda328a
ndisc: improve debug log message
2018-11-06 20:15:09 +09:00
Yu Watanabe
4f0e4d29b0
lldp: improve debug log message
2018-11-06 20:15:09 +09:00
Lennart Poettering
559696f763
Merge pull request #10611 from yuwata/udev-watch-log
...
udev-watch: update log levels and messages
2018-11-06 12:28:00 +03:00
Yu Watanabe
6bee206591
udev-node: add one more debug log when failed to create symlink
2018-11-06 15:45:22 +09:00
Yu Watanabe
a126a38a9f
udev-node: drop redundant log message
...
As node_symlink() logs almost same message.
2018-11-06 15:45:22 +09:00
Yu Watanabe
6174a243f9
udev: setting the same log level to SYSTEMD realm
...
Otherwise, many debug logs from libsystemd are dropped.
2018-11-06 15:45:22 +09:00
Yu Watanabe
a5db6debcd
test: check returned value of sd_device_get_usec_since_initialized()
2018-11-06 15:45:22 +09:00
Yu Watanabe
754d6c26b4
test: show is_initialized flag in log message of test-sd-device
...
And drop devpath, as it is redundant for most cases.
2018-11-06 15:45:22 +09:00
Yu Watanabe
ecbe9873a9
test: show name of testing functions in test-sd-device
2018-11-06 15:45:22 +09:00
Yu Watanabe
c7d54daef9
sd-device: normalize debug messages
2018-11-06 15:45:22 +09:00
Yu Watanabe
38d1555d7c
sd-device: drop subsystem from log_device_*()
...
The sd_device object always has syspath and sysname, but subsytem may not.
Also, it may take some costs to get subsystem.
So, let's drop subsystem from logs.
2018-11-06 15:45:22 +09:00
Yu Watanabe
cc0bf5e148
udev-watch: adjust level of log messages
2018-11-06 11:15:39 +09:00
Yu Watanabe
7fe3324c5e
udev-watch: make udev_watch_lookup() return 1 when device found
2018-11-06 11:15:39 +09:00
Yu Watanabe
b7759e0403
udev: drop redundant log message and fix returned error code
2018-11-06 11:15:39 +09:00
Lennart Poettering
8912a99cea
Merge pull request #10606 from yuwata/udev-tests
...
test: mask hwdb-update.services in most tests
2018-11-05 23:14:42 +03:00
Lennart Poettering
a54e373163
Merge pull request #10618 from yuwata/fix-10615
...
network: fix several issues in config parser
2018-11-05 17:37:25 +03:00
Lennart Poettering
780ccb7d9d
Merge pull request #10641 from yuwata/fix-10639
...
network: check the value of prefix length
2018-11-05 16:11:50 +03:00
Yu Watanabe
3d8d1f13d5
test: add tests for config_parse_address()
2018-11-05 16:46:26 +09:00
Yu Watanabe
b7cb445235
network: use in_addr_default_prefix_from_string_auto() in config_parse_address()
2018-11-05 16:46:26 +09:00
Yu Watanabe
c1d58204b2
test: add tests for in_addr_default_prefix_from_string() or friend
2018-11-05 16:46:26 +09:00
Yu Watanabe
a4798d4e6d
util: introduce in_addr_default_prefix_from_string() and friends
...
It is similar to in_addr_prefix_from_string() but it determines
the prefix length from address if it is not specified.
2018-11-05 16:46:26 +09:00
Yu Watanabe
67944f5c26
util: use strndup() instead of strndupa()
...
As the input string may be comes from command line or config files.
2018-11-05 16:46:00 +09:00
Yu Watanabe
a7cc45caad
network: sort headers in wireguard.h
2018-11-05 13:19:02 +09:00
Yu Watanabe
fc72155321
network: use structured initializers in wireguard.c
2018-11-05 13:19:02 +09:00
Yu Watanabe
c195364da5
network: fix crash in wireguard_done()
...
Fixes another issue in #10629 .
2018-11-05 13:19:02 +09:00
Yu Watanabe
56ba90c2df
network: use destroy callback to unref netdev attached to event source
2018-11-05 13:19:02 +09:00
Yu Watanabe
8173d1d0ec
network: use destroy callback to clear resolved wireguard endpoints
2018-11-05 13:19:02 +09:00