Zbigniew Jędrzejewski-Szmek
22ba4525d3
udev: tweak debug logs for udev rules
...
We shouldn't say "ignoring" when running a program because the result is used for
the match/nomatch result of the rule.
2020-07-16 18:38:03 +02:00
Zbigniew Jędrzejewski-Szmek
12254ccab0
man: add more details for IMPORT, PROGRAM and RUN keys
...
967de8face
added a note that I found very hard
to understand. Reword it, and also describe how IMPORT and PROGRAM are different
from RUN.
Minor markup adjustements too.
2020-07-16 18:38:03 +02:00
Zbigniew Jędrzejewski-Szmek
ba60127df7
udev: accept OPTIONS+= without any fuss
...
There is no reason to consider this wrong. In fact one could argue that +=
is more appropriate, because we always add to options, and not replace previous
assignments. If we output a debug message, we implicitly ask people to "fix" this,
and we shouldn't.
Also, all our rules use += right now.
2020-07-16 18:38:03 +02:00
Zbigniew Jędrzejewski-Szmek
b6a80b83bc
udev: accept IMPORT{}= without any fuss
...
Udev logs are full of messages about wrong operator type:
...
Reading rules file: /usr/lib/udev/rules.d/60-persistent-storage.rules
/usr/lib/udev/rules.d/60-persistent-storage.rules:30 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:30 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:30 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:30 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:30 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:30 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:54 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:57 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:60 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:63 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:66 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:67 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:93 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:107 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:110 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-storage.rules:113 IMPORT key takes '==' or '!=' operator, assuming '=='.
Reading rules file: /usr/lib/udev/rules.d/60-persistent-v4l.rules
/usr/lib/udev/rules.d/60-persistent-v4l.rules:7 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-v4l.rules:9 IMPORT key takes '==' or '!=' operator, assuming '=='.
/usr/lib/udev/rules.d/60-persistent-v4l.rules:16 IMPORT key takes '==' or '!=' operator, assuming '=='.
...
The warning was downgraded in f0beb6f816
, but I
think it should be removed altogether. IMPORT{program}="asdf" seems like an
obvious way to write this, and people don't expect to have to write "==".
So let's just allow any operator.
2020-07-16 18:38:03 +02:00
Yu Watanabe
13e8a49a58
network: ndisc: any failures in processing event make the link in failed state
...
Also adjust log levels.
2020-07-17 01:18:44 +09:00
Yu Watanabe
c97785168b
network: radv: clean up conf parsers
2020-07-17 01:16:38 +09:00
Zbigniew Jędrzejewski-Szmek
19b4864346
hwdb/autosuspend: add missing parenthesis
2020-07-16 18:06:35 +02:00
Yu Watanabe
d96edb2c6e
network: downgrade log level in conf parsers
2020-07-17 00:40:09 +09:00
Lennart Poettering
4d939d2c84
Merge pull request #16485 from bluca/nspawn_os_release_mounts
...
Follow-up for comments on #15891
2020-07-16 15:09:35 +02:00
Yu Watanabe
9e54462cd5
Merge pull request #16482 from poettering/coverity-246
...
two coverity fixes
2020-07-16 20:23:23 +09:00
Luca Boccassi
14f1c47a0c
nspawn: mount os-release in two steps to make it read-only
...
The kernel interface requires setting up read-only bind-mounts in
two steps, the bind first and then a read-only remount.
Fix nspawn-mount, and cover this case in the integration test.
Fixes #16484
2020-07-16 09:59:59 +01:00
Luca Boccassi
eafc7d6056
nspawn: use access/F_OK instead of stat to check for file existence
2020-07-16 09:59:59 +01:00
Luca Boccassi
2094cd49c4
shared/os-util: fix comment style to follow guidelines
2020-07-16 09:59:59 +01:00
Luca Boccassi
cc76bf01e3
basic/mkdir: use uid_is_valid instead of manual check
2020-07-16 09:59:59 +01:00
Zbigniew Jędrzejewski-Szmek
40282752a2
Merge pull request #16483 from poettering/man-env-d-no-session
...
man: three minor fixes to environment.d/ man page
2020-07-16 10:06:35 +02:00
Zbigniew Jędrzejewski-Szmek
27806670ef
Merge pull request #16480 from yuwata/network-fix-dhcp4-races
...
network: fix two minor races in DHCP4 handling
2020-07-16 10:04:05 +02:00
Lennart Poettering
3f13f9159f
man: configuration files contain assignments, no directories
2020-07-16 09:26:55 +02:00
Lennart Poettering
d320bfa558
man: GNOME is usually capitalized
2020-07-16 09:26:38 +02:00
Lennart Poettering
a449b7198c
man: don't claim environment.d/ was about sessions
...
This only sets the environment for user *services*, it has no effect on
sessions, as those get an env block set up by whatever program sets them
up and not systemd.
2020-07-16 09:25:24 +02:00
Lennart Poettering
3cd4459003
Revert "selinux: cache enforced status and treat retrieve failure as enforced mode"
...
This reverts commit 257188f80c
.
2020-07-16 08:49:35 +02:00
Lennart Poettering
8e32ad9557
machine: fix if check
...
Fixes: coverity 1430462
2020-07-16 08:35:26 +02:00
Lennart Poettering
f63ef93703
execute: fix if check
...
Fixes: coverity 1430459
2020-07-16 08:35:18 +02:00
Yu Watanabe
0ded0e40ab
dhcp4: only renewing lease when the client already has a lease
...
Follow-up for ceaec54a3c
.
Hopefully fixes #16299 .
2020-07-16 14:58:54 +09:00
Lennart Poettering
330f899079
load-fragment: downgrade log messages we ignore to LOG_WARNING
...
We typically don't log above LOG_WARNING about issues we then go on to
ignore. Do so here, too
2020-07-16 14:58:05 +09:00
Lennart Poettering
89a5385fb7
mountpoint-util: fix error handling
2020-07-16 14:56:40 +09:00
Yu Watanabe
f766d9af38
network: dhcp4: add two warnings
2020-07-16 10:54:16 +09:00
Yu Watanabe
153cf04139
network: dhcp4: fix another race with SendDecline=yes
...
If the SD_IPV4ACD_EVENT_BIND event happens before all routes are
assigned, then the link stuck in configuring state.
2020-07-16 10:54:08 +09:00
Yu Watanabe
75be72d139
network: dhcp4: also release old lease in dhcp_lease_lost()
...
The lease lost may happen during renewing address. If it happens,
assertion hits in dhcp4_release_old_lease().
2020-07-16 10:51:46 +09:00
Lennart Poettering
8d5bb13d78
core: fix invalid assertion
...
We miscounted here, and would hit an assert once too early.
2020-07-16 09:13:04 +09:00
Christian Göttsche
aeba8dd523
network: fix typo
2020-07-16 08:45:42 +09:00
Luca Boccassi
2bc148add0
test: exercise RootImage, RootHash and RootVerity in TEST-50-DISSECT
...
Run with both the single-filesystem image and the GPT image
2020-07-15 19:40:42 +01:00
Luca Boccassi
0f5d24a8b9
test: pre-assemble minimal image for TEST-50-DISSECT at build time
...
Easier than in the limited VM environment
2020-07-15 19:40:42 +01:00
Luca Boccassi
a5f1d665d7
test: exercise systemd-dissect with GPT and verity in TEST-50-DISSECT
2020-07-15 19:35:40 +01:00
Luca Boccassi
6939873412
test: exercise systemd-dissect --mount in TEST-50-DISSECT
2020-07-15 19:35:40 +01:00
Lennart Poettering
42165319b1
update TODO
2020-07-15 17:45:22 +02:00
Zbigniew Jędrzejewski-Szmek
95b29f3267
Merge pull request #16396 from yuwata/network-configured-flag
...
network: about xxx_configured flags
2020-07-15 15:45:38 +02:00
Zbigniew Jędrzejewski-Szmek
b8ff0663e8
Merge pull request #16468 from keszybz/two-unrelated-patches
...
Two unrelated patches
2020-07-15 13:40:22 +02:00
Yu Watanabe
43bf28741f
network: drop doubled white space
2020-07-15 17:15:25 +09:00
Yu Watanabe
93b0b88c3a
network: free address when it is removed
2020-07-15 17:15:25 +09:00
Yu Watanabe
6906794dd1
network: dhcp4: do not assign new address before old one is not removed
...
If DHCP4 client lost a lease, and then soon acquire new lease, then
the removal of the old address may not be completed. If that happens,
and the new and old addresses are the same, then the new address will be
considered as a foreign address. Such a situation can occur when the
DHCP4 server is restarted.
This makes networkd wait for the removal of the old address when a new
lease is acquired.
This also makes the link in configuring state when renewing address.
2020-07-15 17:15:25 +09:00
Yu Watanabe
5d976f5f64
network: do not call link_check_ready() in link_request_set_routing_policy_rule()
...
It will be called in link_request_set_nexthop() or serveral handlers().
2020-07-15 17:15:25 +09:00
Yu Watanabe
0c816fcc7b
network: make link_request_set_nexthop() called from link_request_set_routes() or route_handler()
...
Then we can drop static_routes_ready() flag.
2020-07-15 17:15:25 +09:00
Yu Watanabe
659ad3a0af
network: do not make link in configured state when no address is assigned
...
When DHCP6 and RA are enabled, and RA does not provide any addresses,
then link may become configured state even if no address is assigned,
due to the time-lag between RA completion and DHCP reply.
This makes if DHCP is explicitly enabled, then link must have at least
one valid address to be in the configured state.
2020-07-15 17:15:25 +09:00
Yu Watanabe
d98c546dac
network: ndisc: split ndisc_configured flag into for addresses and routes
2020-07-15 17:15:25 +09:00
Yu Watanabe
01c344bdd4
network: ndisc: do not ignore remaining addresses
...
Follow-up for c24c83dc67
.
2020-07-15 17:15:25 +09:00
Yu Watanabe
571f953934
test-network: wait for addresses are not in tentative state
2020-07-15 17:15:25 +09:00
Yu Watanabe
39373cb984
network: add debugging log why link is not in configured state yet
2020-07-15 17:15:16 +09:00
Yu Watanabe
c5fcd8a70a
test-network: check assigned address is not tentative state
2020-07-15 17:14:30 +09:00
Yu Watanabe
491b79aeac
test-network: set IPv6AcceptRA=no if no dynamic addresses are not required
2020-07-15 17:14:30 +09:00
Yu Watanabe
eb01a2dfb1
network: make link_request_set_nexthop() static
2020-07-15 17:14:30 +09:00