Commit Graph

36421 Commits

Author SHA1 Message Date
Marco Trevisan (Treviño) 6260d28b8a login: Don't mark framebuffer devices as master-of-seat devices
Currently we consider any framebuffer device as enough to have a
valid graphical session, but this might lead to many false postives
like in the case of framebuffer devices that have a linked drm card
which is still in the process of being added, or for vesa fb, and
so it doesn't ensure us that we can have a proper graphical session.

Since these days we normally don't consider anything without a DRM
card able to provide a full graphical session, let's not set this
at this level.
Drivers which can provide a graphical session with the sole fb are
still free to mark any device as `master-of-seat`

Fixes #10435
2018-11-06 20:02:26 +03:00
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
Frantisek Sumsal 0d589dfcee travis: drop the unnecessary /etc/machine-id magic 2018-11-06 17:16:45 +01:00
Frantisek Sumsal 059f31920e travis: run Coverity on a more stable Fedora release 2018-11-06 16:27:34 +01: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
Frantisek Sumsal a9145fc488 travis: move Docker setup to a separate script
This should make debugging somewhat easier
2018-11-06 15:56:52 +01: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 92025e8f52 random-util: initialize srand() from RDRAND
It's cheap to get RDRAND and given that srand() is anyway not really
useful for trusted randomness let's use RDRAND for it, after all we have
all the hard work for that already in place.
2018-11-06 12:12:18 +01:00
Lennart Poettering 54bf23151f random-util: we don't intend to write to auxv, hence make it const 2018-11-06 12:12:18 +01: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
Frantisek Sumsal 3bbdc2f9d5 travis: rewrite .travis.yml and re-enable Travis CI for Fedora 2018-11-06 00:17:08 +01: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