diff options
author | Thomas Haller <thaller@redhat.com> | 2020-08-11 15:34:59 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-08-12 08:32:08 +0200 |
commit | e6418f03d3b2de0c8d9ed37c8594b699183eba7b (patch) | |
tree | b4f0e874351a61bd968cf974455fef7e44319b07 /src/nm-act-request.h | |
parent | 698c4ae35efbfce105c399300c413350682b9aac (diff) | |
download | NetworkManager-th/settings-wait-device-timeout.tar.gz |
settings: rework wait-device-timeout handling and consider device compatibilityth/settings-wait-device-timeout
A profile can configure "connection.wait-device-timeout" to indicate
that startup complete is blocked until a suitable device around.
This is useful for NetworkManager-wait-online and initrd mode.
Previously, we looked at NMPlatform whether a link with matching
interface-name was present. That is wrong because it cannot handle
profiles that rely on "ethernet.mac-address" setting or other "match"
settings. Also, the mere presence of the link does not yet mean
that the NMDevice was created and ready. In fact, there is a race here:
NMPlatform indicates that the device is ready (unblocking NMSettings),
but there is no corresponding NMDevice yet which keeps NetworkManager
busy to block startup complete.
Rework this. Now, only check whether there is a compatible device for
the profile.
Since we wait for compatible devices, it works now not only for the
interface name. Note that we do some optimizations so that we don't have
to re-evaluate all profiles (w.r.t. all devices) whenever something on the
device changes: we only care about this when all devices finally become
ready.
Also, we no longer start the timeout for "connection.wait-device-timeout"
when the profile appears. Instead, there is one system-wide start time
(NMSettingsPrivate.startup_complete_start_timestamp_msec). That simplifies
code and makes sense: we start waiting when NetworkManager is starting, not
when the profile gets added. Also, we wait for all profiles to become
ready together.
Diffstat (limited to 'src/nm-act-request.h')
0 files changed, 0 insertions, 0 deletions