On 10/1/26 2:58 AM, Jaygue Lee wrote:
> if_status_mgr_release_iface() only moves an interface to OIF_MARK_DOWN,
> and therefore only clears Port_Binding "up", for interfaces this
> ovn-controller instance claimed itself. Ports that were already bound to
> this chassis when ovn-controller started are adopted without being
> tracked, so when the recompute path releases one of them, for example
> after a hypervisor crash where the VM's tap is gone but the Port_Binding
> still points at this chassis, the chassis is cleared but "up" stays true.
>
> That leaves the port unbound but up, a state that cannot happen
> otherwise. Since commit e180d57ee6 ("northd: Mark unbound ports' service
> monitors offline.") northd no longer trusts "up" alone for service
> monitors, but the Southbound record stays wrong until the port is claimed
> again, and anything else reading Port_Binding.up is misled.
>
> When if_status_mgr_release_iface() is asked to release an interface it
> does not track and the Port_Binding is left unbound but up, add it in
> OIF_UPDATE_PORT, the state the tracked path uses for a released port with
> no local binding, so that if_status_mgr_update() sets it down. Ports
> bound to another chassis are left alone. The function now takes the
> Port_Binding instead of its name.
>
> Such an interface has no OVS interface name, so also make
> if_status_mgr_delete_iface() cope with a NULL name.
>
> CC: Dumitru Ceara <[email protected]>
> Fixes: 5c3371922994 ("if-status: Add OVS interface status management module.")
> Assisted-by: Claude Opus 5, Claude Code
> Signed-off-by: Jaygue Lee <[email protected]>
> ---
Hi Jay,
> v3:
> - Only take over ports left unbound; v2 also set down ports bound to
> another chassis, which broke "Deleting vif while controller fight for
> port claim".
> - Handle the NULL interface name in if_status_mgr_delete_iface()
> (sanitizer report from CI).
> v2:
> - Fix it in if_status_mgr_release_iface() instead of release_lport()
> (Dumitru).
> - Use wait_for_ports_up in the test (Dumitru).
> - Such ports no longer log "Trying to release unknown interface", so
> the test no longer ignores that warning.
> - Dropped Mairtin's Acked-by since the fix changed.
>
Thanks for the new revision, looks good to me. Applied to main, 26.09
and 26.03.
Regards,
Dumitru
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev