Skip to content

VLAN ACL change detection to be able to warm reload#4733

Open
hieunt79 wants to merge 6 commits intofaucetsdn:mainfrom
hieunt79:add_vlan_acl_warm_reload
Open

VLAN ACL change detection to be able to warm reload#4733
hieunt79 wants to merge 6 commits intofaucetsdn:mainfrom
hieunt79:add_vlan_acl_warm_reload

Conversation

@hieunt79
Copy link
Copy Markdown
Contributor

I want to perform a warm reload when the VLAN ACL changes, so I made the following updates:

  • For port changes:
    • Handle ports in changed_vlans and added_vlans separately.
    • When a port ACL changes (changed_acl_ports), handle it later through Valve._apply_config_changes().
  • For VLAN changes: add: added_vlans, changed_acl_vlans
  • Lastly: optimize return OpenFlow messages in Valve _apply_config_change()

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 12, 2025

Codecov Report

❌ Patch coverage is 96.49123% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.45%. Comparing base (429d3b8) to head (d4f9fc4).
⚠️ Report is 102 commits behind head on main.

Files with missing lines Patch % Lines
faucet/dp.py 94.59% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4733      +/-   ##
==========================================
+ Coverage   91.36%   91.45%   +0.09%     
==========================================
  Files          46       46              
  Lines        8922     8968      +46     
==========================================
+ Hits         8151     8201      +50     
+ Misses        771      767       -4     

☔ View full report in Codecov by Sentry.
📢 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
Copy link
Copy Markdown
Member

Thanks for the contribution, it appears that this patch has some test failures at the moment that need to be addressed.

If I look at this test failure:

FAIL: test_mclag_warmstart (mininet_multidp_tests.FaucetSingleLAGOnUniqueVLANTest.test_mclag_warmstart)
Test LACP MCLAG after a warm start
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/__w/faucet/faucet/tests/integration/mininet_multidp_tests.py", line 2156, in test_mclag_warmstart
    self.reload_conf(
  File "/faucet-src/clib/mininet_test_base.py", line 2020, in reload_conf
    verify_faucet_reconf_func()
  File "/faucet-src/clib/mininet_test_base.py", line 2784, in verify_faucet_reconf
    self.assertEqual(
AssertionError: 0 != 1 : FAUCET faucet-0-1176 faucet_config_reload_warm_total incremented: 1

It looks like this test was expecting a cold restart, but now with your changes a warm reload happens so the test fails. I think you'll need to update this test (and perhaps others) to account for this behavioural change.

@hieunt79 hieunt79 marked this pull request as draft April 8, 2026 07:09
@hieunt79 hieunt79 marked this pull request as ready for review April 9, 2026 11:15
@hieunt79
Copy link
Copy Markdown
Contributor Author

hieunt79 commented Apr 9, 2026

Hi @gizmoguy, I've revisited this PR and fixed the failing test cases. Could you please review it?

@gizmoguy gizmoguy self-assigned this Apr 9, 2026
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