|
|
146a1d |
From a1198f4f6d95682bc4126fe4f13d8c549394d8b6 Mon Sep 17 00:00:00 2001
|
|
|
146a1d |
From: Beniamino Galvani <bgalvani@redhat.com>
|
|
|
146a1d |
Date: Tue, 14 Jul 2020 22:52:56 +0200
|
|
|
146a1d |
Subject: [PATCH] team: perform cleanup immediately when connecting to teamd
|
|
|
146a1d |
fails
|
|
|
146a1d |
|
|
|
146a1d |
When NM fails to connect to teamd during an activation, it sets the
|
|
|
146a1d |
device state to FAILED. Eventually the device will become DISCONNECTED
|
|
|
146a1d |
and will call the ->deactivate() method that will perform the cleanup
|
|
|
146a1d |
of timers, teamd process and teamdctl instance.
|
|
|
146a1d |
|
|
|
146a1d |
However, in this way, when the device is DISCONNECTED timers are still
|
|
|
146a1d |
armed and can be triggered in the wrong state. Instead, perform the
|
|
|
146a1d |
cleanup immediately on failure.
|
|
|
146a1d |
|
|
|
146a1d |
https://bugzilla.redhat.com/show_bug.cgi?id=1856723
|
|
|
146a1d |
(cherry picked from commit 26e97fcd0d4a70e32a484d3bfc57c1802da10554)
|
|
|
146a1d |
(cherry picked from commit 680c0b88122077101cbfd878a70d54fb7a4afcea)
|
|
|
146a1d |
---
|
|
|
146a1d |
src/devices/team/nm-device-team.c | 1 +
|
|
|
146a1d |
1 file changed, 1 insertion(+)
|
|
|
146a1d |
|
|
|
146a1d |
diff --git a/src/devices/team/nm-device-team.c b/src/devices/team/nm-device-team.c
|
|
|
146a1d |
index 217c4bdd7c..7ba3034212 100644
|
|
|
146a1d |
--- a/src/devices/team/nm-device-team.c
|
|
|
146a1d |
+++ b/src/devices/team/nm-device-team.c
|
|
|
146a1d |
@@ -371,6 +371,7 @@ teamd_ready (NMDeviceTeam *self)
|
|
|
146a1d |
success = teamd_read_config (self);
|
|
|
146a1d |
|
|
|
146a1d |
if (!success) {
|
|
|
146a1d |
+ teamd_cleanup (self, TRUE);
|
|
|
146a1d |
nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_TEAMD_CONTROL_FAILED);
|
|
|
146a1d |
return;
|
|
|
146a1d |
}
|
|
|
146a1d |
--
|
|
|
146a1d |
2.26.2
|
|
|
146a1d |
|