mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 15:40:10 +01:00
ovs: block auto activation of ovs-interfaces until ovsdb is ready
Otherwise the device tries to activate too early and fails.
This commit is contained in:
parent
e694f2cec1
commit
a3f35ea5cc
1 changed files with 10 additions and 0 deletions
|
|
@ -77,6 +77,15 @@ is_available(NMDevice *device, NMDeviceCheckDevAvailableFlags flags)
|
|||
return nm_ovsdb_is_ready(priv->ovsdb);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
can_auto_connect(NMDevice *device, NMSettingsConnection *sett_conn, char **specific_object)
|
||||
{
|
||||
NMDeviceOvsInterface * self = NM_DEVICE_OVS_INTERFACE(device);
|
||||
NMDeviceOvsInterfacePrivate *priv = NM_DEVICE_OVS_INTERFACE_GET_PRIVATE(self);
|
||||
|
||||
return nm_ovsdb_is_ready(priv->ovsdb);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
check_connection_compatible(NMDevice *device, NMConnection *connection, GError **error)
|
||||
{
|
||||
|
|
@ -424,6 +433,7 @@ nm_device_ovs_interface_class_init(NMDeviceOvsInterfaceClass *klass)
|
|||
device_class->connection_type_check_compatible = NM_SETTING_OVS_INTERFACE_SETTING_NAME;
|
||||
device_class->link_types = NM_DEVICE_DEFINE_LINK_TYPES(NM_LINK_TYPE_OPENVSWITCH);
|
||||
|
||||
device_class->can_auto_connect = can_auto_connect;
|
||||
device_class->can_update_from_platform_link = can_update_from_platform_link;
|
||||
device_class->deactivate = deactivate;
|
||||
device_class->deactivate_async = deactivate_async;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue