summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2022-05-29 22:40:10 +0200
committerLubomir Rintel <lkundrak@v3.sk>2022-06-09 14:40:31 +0200
commita446edf712a12cfaf13a96dcd0ded6253b7b67de (patch)
tree1aaf6cb6bcb343e74a9ab34f8724f9def8520a71
parent431d139d15c4782fb6f4c69dfd687ea1619a30f1 (diff)
downloadNetworkManager-a446edf712a12cfaf13a96dcd0ded6253b7b67de.tar.gz
device: stop checking the IP configuration state when cancelling activation
The @bond_mode_8023ad test has been seen failing, with a log like this: <debug> [...3.0484] device[...] (eth1): Activation: connection 'bond0.0' master deactivated <debug> [...3.0484] device[...] (eth1): add_pending_action (2): 'queued-state-change-deactivating' <debug> [...3.0484] device[...] (eth1): queue-state[deactivating, reason:new-activation, id:709]: queue state change What happened is that eth1 has been activating. It was already enslaved to a bond and was in an ip-config state when the bond was removed. A change to "deactivating" state has been enqueued. But then this happened: <trace> [...3.0942] device[...] (eth1): ip4: check-state: state done => done, is_failed=0, is_pending=0, is_started=0 temp_na=0, may-fail-4=1, may-fail-6=1; disabled4; manualip4=done; ignore6 manualip6=done <trace> [...3.0942] device[...] (eth1): ip: check-state: (combined) state pending => done <debug> [...3.0943] device[...] (eth1): ip: set (combined) state done (was pending, reason: check-ip-state) <info> [...3.0943] device (eth1): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed') <debug> [...3.0943] device[...] (eth1): add_pending_action (3): 'in-state-change' <debug> [...3.0943] device[...] (eth1): queue-state[deactivating, reason:new-activation, id:709]: clear queued state change The IP config succeeded and the queued "deactivating" change was overriden by the IP4 check result, prompting a change to "ip-check". With the master still missing. Not good. Let's terminate the appempts to check the IP state when we cancel the activation, so that it doesn't override the enqueued state change. Fixes-test: @bond_mode_8023ad https://bugzilla.redhat.com/show_bug.cgi?id=2080928 https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1245
-rw-r--r--src/core/devices/nm-device.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c
index e6c79e994c..f8330a9d49 100644
--- a/src/core/devices/nm-device.c
+++ b/src/core/devices/nm-device.c
@@ -15110,6 +15110,9 @@ _cancel_activation(NMDevice *self)
_dispatcher_cleanup(self);
ip_check_gw_ping_cleanup(self);
+ _dev_ip_state_cleanup(self, AF_INET, FALSE);
+ _dev_ip_state_cleanup(self, AF_INET6, FALSE);
+
/* Break the activation chain */
activation_source_clear(self);
}