summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2019-04-09 16:15:46 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2019-04-10 08:44:05 +0200
commitc48698d74778f1ac1c06bb8713b18e8d1edc1e24 (patch)
treed792d9c5f103e2b0dae02c6898690e542024e42a /src
parent3a2e002a2ebed799d4caa3b1b2d913d3684c47e5 (diff)
downloadNetworkManager-c48698d74778f1ac1c06bb8713b18e8d1edc1e24.tar.gz
team: clean up state when connection to teamd fails
If NM fails to connect to teamd, it currently just sets the device state to FAILED and waits that deactivate() is called later. However, the 5 seconds timeout on teamd process start can hit in the meantime, which fails with an assertion "nm_device_is_activating (device)". Clean up the device state when the connection to teamd fails. https://bugzilla.redhat.com/show_bug.cgi?id=1697900
Diffstat (limited to 'src')
-rw-r--r--src/devices/team/nm-device-team.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/devices/team/nm-device-team.c b/src/devices/team/nm-device-team.c
index 38a6dd8c6c..402be1ef55 100644
--- a/src/devices/team/nm-device-team.c
+++ b/src/devices/team/nm-device-team.c
@@ -408,8 +408,10 @@ teamd_dbus_appeared (GDBusConnection *connection,
success = teamd_read_config (device);
if (success)
nm_device_activate_schedule_stage2_device_config (device);
- else if (!nm_device_sys_iface_state_is_external_or_assume (device))
+ else if (!nm_device_sys_iface_state_is_external_or_assume (device)) {
+ teamd_cleanup (device, TRUE);
nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_TEAMD_CONTROL_FAILED);
+ }
}
}