Skip to content

device: stop checking the IP configuration state when cancelling activation

Lubomir Rintel requested to merge lr/cancel-ip-state-with-activation into main

The @bond_mode_8023ad test has been seen failing, with a log like this:

[...3.0484] device[...] (eth1): Activation: connection 'bond0.0' master deactivated [...3.0484] device[...] (eth1): add_pending_action (2): 'queued-state-change-deactivating' [...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:

[...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 [...3.0942] device[...] (eth1): ip: check-state: (combined) state pending => done [...3.0943] device[...] (eth1): ip: set (combined) state done (was pending, reason: check-ip-state) [...3.0943] device (eth1): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed') [...3.0943] device[...] (eth1): add_pending_action (3): 'in-state-change' [...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

Merge request reports