Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[13.4-stable] Allow to use network port with VLAN-subinterfaces for untagged traffic #4569

Merged
merged 2 commits into from
Feb 1, 2025

Conversation

uncleDecart
Copy link
Member

@uncleDecart uncleDecart commented Jan 31, 2025

Backport of #4444

Backporting this patch for 13.4.1-rc2 to handle case when VLAN is created and the underlying interface is also used

With this enhancement, user will be able to use VLAN parent interface as an L3 endpoint and access the untagged network either for EVE management or from an application via Local network instance.

Some changes were required to allow having SystemAdapter assigned to a network port (physical or bond) which is at the same time referenced by a VLAN sub-interface. Previously, this was not allowed and resulted in parsing errors published to the controller.

In terms of the Linux network configuration, not many changes were required. We simply allow assigning static IP or running DHCP client even for VLAN parent interface.
The only scenario which is not allowed, is to bridge network port and at the same time use it with VLAN sub-interfaces. This means that accessing untagged network from a Switch NI is not allowed when the port is already used with VLAN subinterfaces.

Signed-off-by: Milan Lenco [email protected]
(cherry picked from commit 1f23508)

@OhmSpectator OhmSpectator changed the title Allow to use network port with VLAN-subinterfaces for untagged traffic [13.4-stable] Allow to use network port with VLAN-subinterfaces for untagged traffic Jan 31, 2025
@OhmSpectator OhmSpectator added the stable Should be backported to stable release(s) label Jan 31, 2025
@OhmSpectator
Copy link
Member

@uncleDecart, why do we ignore the second commit from the same PR?
2a295e8

@uncleDecart
Copy link
Member Author

Good catch @OhmSpectator forgot to look through the PR, found fix through source code, thank you!

@OhmSpectator
Copy link
Member

So, are the commits cherry-picked 1-top-1 with no merge conflicts?

@uncleDecart
Copy link
Member Author

So, are the commits cherry-picked 1-top-1 with no merge conflicts?

Yep, commits order is the same and there're no conflicts, commits are cherry-picked with -x option linking to the original commits

@OhmSpectator
Copy link
Member

Do we consider it a fix? Or why do we backport it into stable now? And why was it not done earlier, if we do?

Copy link
Member

@OhmSpectator OhmSpectator left a comment

Choose a reason for hiding this comment

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

Ok, we can consider it as a fix. Then we also expect a backport into 12.0-stable.

@OhmSpectator
Copy link
Member

@uncleDecart could you please rebase the PR so the tests work again?

With this enhancement, user will be able to use VLAN parent interface
as an L3 endpoint and access the untagged network either for EVE
management or from an application via Local network instance.

Some changes were required to allow having SystemAdapter assigned
to a network port (physical or bond) which is at the same time
referenced by a VLAN sub-interface. Previously, this was not allowed
and resulted in parsing errors published to the controller.

In terms of the Linux network configuration, not many changes were
required. We simply allow assigning static IP or running DHCP client
even for VLAN parent interface.
The only scenario which is not allowed, is to bridge network port and
at the same time use it with VLAN sub-interfaces. This means that
accessing untagged network from a Switch NI is not allowed when the port
is already used with VLAN subinterfaces.

Signed-off-by: Milan Lenco <[email protected]>
(cherry picked from commit 1f23508)
reflect.DeepEqual is quite expensive so let's compare Bond
fields manually and using more efficient methods from the generics
package.

Signed-off-by: Milan Lenco <[email protected]>
(cherry picked from commit a783bfc)
Copy link
Contributor

@eriknordmark eriknordmark left a comment

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 3b901cb into lf-edge:13.4-stable Feb 1, 2025
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stable Should be backported to stable release(s)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants