Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[16.0] Fix VLAN sub-interface dependencies#5498

Merged
eriknordmark merged 2 commits into
lf-edge:16.0from
milan-zededa:16.0-fix-vlan-deps
Dec 18, 2025
Merged

[16.0] Fix VLAN sub-interface dependencies#5498
eriknordmark merged 2 commits into
lf-edge:16.0from
milan-zededa:16.0-fix-vlan-deps

Conversation

@milan-zededa

@milan-zededa milan-zededa commented Dec 17, 2025

Copy link
Copy Markdown
Contributor

Description

Backport of #5493

How to test and validate this PR

Test creating a deleting VLAN subinterfaces couple times.
Check that subinterfaces are created/deleted without any errors reported.

Changelog notes

Fix VLAN subinterface dependencies.

Checklist

  • I've provided a proper description
  • I've added the proper documentation
  • I've tested my PR on amd64 device
  • I've tested my PR on arm64 device
  • I've written the test verification instructions
  • I've set the proper labels to this PR
  • I've added a reference link to the original PR
  • PR's title follows the template
  • I've checked the boxes above, or I've provided a good reason why I didn't check them.

…AN creation

Fix missing dependency between a VLAN subinterface and its parent adapter
being configured for VLAN use.

Previously, the VLAN item only depended on the adapter’s existence and MTU.
In some cases, this allowed reconciliation to attempt VLAN creation before
the parent interface (bridge) was fully created and configured for VLANs,
causing the operation to fail.

This change strengthens the dependency by requiring the adapter to be marked
as a VLAN parent (UsedAsVlanParent) in addition to having a sufficient MTU.
This guarantees correct ordering and prevents premature VLAN subinterface
creation.

Signed-off-by: Milan Lenco <[email protected]>
(cherry picked from commit e4bac49)
Optimize adapter reconciliation by avoiding unnecessary re-creation when
VLANs are added or removed.

Previously, changes to UsedAsVlanParent would always trigger adapter
(i.e. bridge) re-creation. However, VLAN membership changes do not require
re-creating the adapter as long as the bridge continues to be managed
by the same microservice (NIM or zedrouter).

This change refines the comparison logic to ignore direct changes to
UsedAsVlanParent and instead only trigger re-creation when the adapter’s
bridge ownership changes. This reduces churn during reconciliation while
preserving correct behavior.

Signed-off-by: Milan Lenco <[email protected]>
(cherry picked from commit 618c417)
@milan-zededa milan-zededa added the bug Something isn't working label Dec 17, 2025

@eriknordmark eriknordmark left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eriknordmark eriknordmark merged commit c7c1a8b into lf-edge:16.0 Dec 18, 2025
41 of 47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants