Skip to content

vlab: generate wiring for externals #529

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 5 commits into
base: master
Choose a base branch
from

Conversation

edipascale
Copy link
Contributor

@edipascale edipascale commented Apr 3, 2025

Generate wirings for externals as part of hhfab vlab gen. Add parameters to determine how many externals and external connections are created, and where the ext. connections are placed (i.e. mclag, eslag or orphan leaves).

All attachments are currently vlan tagged, I didn't want to over complicate things with extra params for untagged.
Also all externals are in the same namespace, and attachments are created for all externals and all connections.

Closes: #521

@edipascale edipascale requested a review from Frostman as a code owner April 3, 2025 10:39
@edipascale edipascale requested review from Copilot and Frostman and removed request for Frostman and Copilot April 3, 2025 10:40
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds functionality to generate wiring for externals as part of the vlab generation process on top of a previous MR. It introduces new parameters to control the number of externals and their associated connection types, adds validation and logging for these parameters, and creates external entities along with their attachments.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
pkg/hhfab/vlabbuilder.go Adds parameters, validations, and logic for generating and attaching externals
cmd/hhfab/main.go Introduces new CLI flags to handle external generation parameters

@edipascale edipascale force-pushed the ema/external-autogen branch from 60b442d to 1727b00 Compare April 3, 2025 13:35
@edipascale
Copy link
Contributor Author

I've added commits to also address #522, but we have a problem here:

In terms of having the ci passing, it would be easy enough to add explicit values to the vlab-gen for either the collapsed-core (if we keep the defaults as described above) or the spine-leaf cases (if we do not touch the current default). The question is what is the "least undesirable" option @Frostman

Copy link
Member

@Frostman Frostman left a comment

Choose a reason for hiding this comment

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

We should probably generated conns to external from the the from both switches of the last redundancy group configured. Let's chat next week and discuss what would be the best approach.

@edipascale edipascale force-pushed the ema/vlab-external-testing branch from 50d6799 to 34d6562 Compare April 7, 2025 07:57
@edipascale edipascale force-pushed the ema/external-autogen branch from 1727b00 to d74be05 Compare April 7, 2025 14:00
@edipascale edipascale force-pushed the ema/vlab-external-testing branch 2 times, most recently from 25246f0 to a8c57f4 Compare April 8, 2025 15:05
Base automatically changed from ema/vlab-external-testing to master April 9, 2025 05:39
@edipascale edipascale force-pushed the ema/external-autogen branch from d74be05 to 698fbab Compare April 9, 2025 07:13
@edipascale edipascale added the release-test Run release tests on vlab/hlab label Apr 9, 2025
@edipascale edipascale force-pushed the ema/external-autogen branch from 698fbab to 76bd390 Compare April 9, 2025 18:02
@edipascale
Copy link
Contributor Author

current status:

  • the changes in release-test to use the first external have to be reverted or at least adapted; we cannot use virtual externals for most scenarios, as multiple external peerings (together with the limitation on virtual switches and ACLs) mean that VPCs will be able to ping each other even when they shouldn't. We can either revert the change, or fetch the annotations for externals and discard non-hardware ones.
  • on top of that, there is https://github.com/githedgehog/internal/issues/145 which makes test-connectivity jobs with the new external peering fail in the ci

@edipascale edipascale force-pushed the ema/external-autogen branch from 76bd390 to 8222ee8 Compare April 15, 2025 13:23
@edipascale
Copy link
Contributor Author

current status:

  • the changes in release-test to use the first external have to be reverted or at least adapted; we cannot use virtual externals for most scenarios, as multiple external peerings (together with the limitation on virtual switches and ACLs) mean that VPCs will be able to ping each other even when they shouldn't. We can either revert the change, or fetch the annotations for externals and discard non-hardware ones.

I went for the second option but it's not perfect. Technically the issue is not with virtual externals, but with virtual switches attached to any type of externals. Because right now we only have hardware externals connected to hardware switches and virtual externals connected to virtual switches, discarding virtual externals is the easy solution... but we probably want to revisit it.

I've already got an answer from BCM on the case I opened requesting more info, which I provided; let's see if we can get unblocked there. In the meanwhile I reduced the autogenerated external connections from 2 to 1, which should work even with this strange issue.

Also I'm seeing several failures in the CI, both here and in other PRs. but they do not appear related to the changes. I'll dig a bit more tomorrow.

@edipascale edipascale force-pushed the ema/external-autogen branch from 8222ee8 to 44d4e94 Compare April 16, 2025 15:26
@Frostman Frostman marked this pull request as draft April 22, 2025 15:13
@edipascale edipascale force-pushed the ema/external-autogen branch 3 times, most recently from a59936d to 358d9e7 Compare May 8, 2025 08:37
@edipascale edipascale force-pushed the ema/external-autogen branch from 358d9e7 to db78dc5 Compare May 8, 2025 12:46
@edipascale
Copy link
Contributor Author

@Frostman this is technically ready to review now. I've removed the default external generation as discussed, and added warnings in case an option with multiple external connections is selected. The only thing missing is a run on a physical environment to check whether we need any additional fix for https://github.com/githedgehog/lab/issues/247, unsure whether we want to wait for that before tagging this as ready

@edipascale edipascale force-pushed the ema/external-autogen branch from db78dc5 to e829871 Compare May 19, 2025 15:02
@edipascale edipascale marked this pull request as ready for review May 20, 2025 08:43
@edipascale edipascale requested review from a team as code owners May 20, 2025 08:43
@edipascale
Copy link
Contributor Author

I could finally check this on physical environments, please see https://github.com/githedgehog/lab/issues/247 for details but this should be ready to be reviewed

to speed up testing with the new external spawn options, auto
generate wirings for externals if desired

Signed-off-by: Emanuele Di Pascale <emanuele@githedgehog.com>
use the first hardware external if we find any. If not, look for
virtual externals that are attached over hardware connections, i.e.
to hardware switches. The problem being that virtual switches do not
support ACLs and so multiple external peerings will also make those
VPCs peer among each other, breaking the tests.

Also warn about conditions that will lead to some tests being skipped.

Signed-off-by: Emanuele Di Pascale <emanuele@githedgehog.com>
if no [mclag/eslag] leaves are present, the corresponding
servers will not be generated, but the log output was
still mentioning the default values, which can be confusing.

Signed-off-by: Emanuele Di Pascale <emanuele@githedgehog.com>
* add 'bestpath as-path multipath relax' to have multiple
  ECMP routes to the vpc subnets in case of multiple
  external connections in the same VRF
* remove the 'maximum-paths 1' constraint for the same
  reason
* enable 'soft-reconfiguration inbound' for troubleshooting

Signed-off-by: Emanuele Di Pascale <emanuele@githedgehog.com>
the previous check was skipping external connections that were
hardware annotated, but that is incorrect. what we really want
is to perfrom the extra config steps (adding a link towards the
externals and the VRF information) only if the connection is
used to connect to virtual externals. the check is slightly
complicated by the fact that we need to iterate over the attachments,
but now things should work properly.

Signed-off-by: Emanuele Di Pascale <emanuele@githedgehog.com>
@edipascale edipascale force-pushed the ema/external-autogen branch from e829871 to a76751e Compare May 27, 2025 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-test Run release tests on vlab/hlab
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generate Externals and their connections + attachments for VLAB
2 participants