mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 11:19:16 +02:00
ovs: block auto activation of ovs-interfaces until ovsdb is ready
Otherwise the device tries to activate too early and fails.
(cherry picked from commit a3f35ea5cc)
This commit is contained in:
parent
fc611f6047
commit
a39517466b
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);
|
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
|
static gboolean
|
||||||
check_connection_compatible(NMDevice *device, NMConnection *connection, GError **error)
|
check_connection_compatible(NMDevice *device, NMConnection *connection, GError **error)
|
||||||
{
|
{
|
||||||
|
|
@ -427,6 +436,7 @@ nm_device_ovs_interface_class_init(NMDeviceOvsInterfaceClass *klass)
|
||||||
device_class->connection_type_check_compatible = NM_SETTING_OVS_INTERFACE_SETTING_NAME;
|
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->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->can_update_from_platform_link = can_update_from_platform_link;
|
||||||
device_class->deactivate = deactivate;
|
device_class->deactivate = deactivate;
|
||||||
device_class->deactivate_async = deactivate_async;
|
device_class->deactivate_async = deactivate_async;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue