Skip to content

Enable warm start for vlans with routing enabled - #4850

Merged
gizmoguy merged 5 commits into
faucetsdn:mainfrom
gizmoguy:warm-vips
Sep 30, 2026
Merged

gizmoguy merged 5 commits into
faucetsdn:mainfrom
gizmoguy:warm-vips

Conversation

@gizmoguy

@gizmoguy gizmoguy commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

Currently, if a VLAN has routing enabled (i.e has at least one faucet_vip configured) then any changes to this VLAN will result in a cold start when faucet is given a SIGHUP signal. This PR changes this behaviour by adding the necessary flowdels in ValveRouteManager.del_vlan() to undo all the routing flowmods added by ValveRouteManager.add_vlan().

Some of the routing flowmods are shared between VLANs, this PR handles those by passing the DP VLAN configuration (dp_vlans) to del_vlan() and using this information to decide if a flowmod can be safely removed if its no longer used by any VLAN on the datapath.

To handle warm start for VLANs with inter-vlan routing configured, we update the FIB and VLAN nexthop cache for VLANs in the same inter-vlan router as a VLAN that changed configuration.

This PR also updates the Valve._apply_config_changes() logic to handle new/changed VLANs separately so that the warm reload behaviour isn't applied to new VLANs.

This PR requires the fix from #4833 to correctly handle updating static routes when warm starting, and fix from #4815 to fix incorrectly suppressed overlapping flowdels

@codecov

codecov Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.66667% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.74%. Comparing base (7ea0392) to head (67e888b).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
faucet/valve_route.py 95.90% 5 Missing ⚠️
faucet/valve_switch_standalone.py 90.91% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4850      +/-   ##
==========================================
+ Coverage   91.51%   91.74%   +0.23%     
==========================================
  Files          46       46              
  Lines        8940     9082     +142     
==========================================
+ Hits         8181     8332     +151     
+ Misses        759      750       -9     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@gizmoguy
gizmoguy force-pushed the warm-vips branch 2 times, most recently from 5478b89 to d90937e Compare September 23, 2026 04:23
@gizmoguy
gizmoguy merged commit c321221 into faucetsdn:main Sep 30, 2026
21 checks passed
@gizmoguy
gizmoguy deleted the warm-vips branch September 30, 2026 02:51
anarkiwi pushed a commit to c65sdn/faucet that referenced this pull request Oct 4, 2026
Cherry-pick key upstream commits enabling warm start for routed VLANs:

- PR faucetsdn#4815: Fix deleting final ACL from a port / del_vlan flowdel suppression
- PR faucetsdn#4819: ACL-only VLAN warm start without cold restart
- PR faucetsdn#4833: Remove static route entries from FIB for dead nexthops
- PR faucetsdn#4850: Enable warm start for VLANs with routing enabled

Adapted for c65of import namespace (fork divergence from os_ken).

Key changes:
- dp.py: separate tracking of added/changed/deleted/acl-only VLANs
- valve.py: proper warm start flow with nexthop expiry for sibling routed VLANs
- valve_route.py: expire nexthops, del_faucet_mac/vip flow cleanup, IPv4/IPv6
- valve_acl.py, valve_manager_base.py, valve_switch_standalone.py: signature updates
- valve_of.py: make _flowmodkey tuple comparable
- test infrastructure: l2_learn_host, l3_learn_host helpers, cold_start fixes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants