NetworkManager/clients/common
Thomas Haller 3df662f534
settings: rework wait-device-timeout handling and consider device compatibility
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.
2020-08-12 16:40:56 +02:00
..
tests cli/tests: add unit test for nmc_utils_parse_passwd_file() 2020-05-13 10:28:05 +02:00
meson.build docs: move "nm-settings-docs-{dbus,nmcli}.xml" from "libnm/" to "man/" 2020-06-11 10:53:50 +02:00
nm-client-utils.c all: add trailing semicolon to NM_UTILS_LOOKUP_DEFINE()/NM_GOBJECT_PROPERTIES_DEFINE*() 2020-07-19 12:12:58 +02:00
nm-client-utils.h cli: show differnt text for state of externally connected devices 2020-06-10 19:45:47 +02:00
nm-meta-setting-access.c all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-meta-setting-access.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-meta-setting-desc.c cli: fix alternating miimon/arp_interval settings for bond options in nmcli 2020-07-11 11:18:54 +02:00
nm-meta-setting-desc.h cli: fix alternating miimon/arp_interval settings for bond options in nmcli 2020-07-11 11:18:54 +02:00
nm-polkit-listener.c cli/polkit: add missing variable initialization in retrieve_session_id_cb() 2020-05-07 10:01:52 +02:00
nm-polkit-listener.h cli/polkit: rename NM_POLKIT_LISTENER_SIGNAL_REQUEST signal to "request-sync" 2020-04-10 10:44:52 +02:00
nm-secret-agent-simple.c clients/trivial: rename VpnPasswordName struct to have NM prefix 2020-04-29 16:18:31 +02:00
nm-secret-agent-simple.h all: unify format of our Copyright source code comments 2019-10-02 17:03:52 +02:00
nm-vpn-helpers.c cli: support dns-search for import of WireGuard profiles 2020-05-19 18:05:55 +02:00
nm-vpn-helpers.h clients/trivial: rename VpnPasswordName struct to have NM prefix 2020-04-29 16:18:31 +02:00
qrcodegen.c all: fix typo in man pages 2020-07-03 10:48:04 +02:00
qrcodegen.h cli: add "nmcli d wifi show" 2019-10-18 17:38:57 +02:00
settings-docs.h.in settings: rework wait-device-timeout handling and consider device compatibility 2020-08-12 16:40:56 +02:00
settings-docs.xsl cli: fix marking settings docs for translation 2017-04-23 23:45:02 +02:00