Skip to content

Fix VPC manage vtep assumption #771

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

Fredi-raspall
Copy link
Contributor

I'm not very fond of this fix, but it should work.
Please refer to the commit for the explanation of the issues.

@Fredi-raspall Fredi-raspall requested a review from a team as a code owner August 8, 2025 18:10
Copy link
Member

@qmonnet qmonnet left a comment

Choose a reason for hiding this comment

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

Avoid hitting unreachable!

Sounds like a good idea, approved 🙂

The order of the returned vectors was inverted according to the
condition. Either we invert the condtion or we swap the outputs.
Went for the latter and convert the output vector to iterator.

Signed-off-by: Fredi Raspall <[email protected]>
The dataplane may receive configurations that do not include any
VPC. In that case (i.e. underlay-only configs) we can't assume
that the vtep configuration is there as it is not needed.
So, the vpc manager should only assume that a vtep config is
present if there are VPCs (vrfs aside from the default).

The original code worked fine because the default vrf was
excepted by the vpc manager: if there were no vrfs other than
the default, we were not checking for the existence of a vtep,
and if there were, the validation of the configuration ensured
that a vtep was present.

A guard for this was removed in
3301da3
when the vpc manager started to create interfaces for the default
vrf, which broke the original assumption. Restoring the guard that
excepted the default vrf is no longer suffices to fix the problem
since we need to configure interfaces for the default vrf.
So, split the method to iterate over non-default vrfs and then deal
with the interfaces for the default vrf.

Signed-off-by: Fredi Raspall <[email protected]>
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