-
Notifications
You must be signed in to change notification settings - Fork 5
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
base: master
Are you sure you want to change the base?
Conversation
60b442d
to
1727b00
Compare
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 |
There was a problem hiding this 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.
50d6799
to
34d6562
Compare
1727b00
to
d74be05
Compare
25246f0
to
a8c57f4
Compare
d74be05
to
698fbab
Compare
698fbab
to
76bd390
Compare
current status:
|
76bd390
to
8222ee8
Compare
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. |
8222ee8
to
44d4e94
Compare
a59936d
to
358d9e7
Compare
358d9e7
to
db78dc5
Compare
@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 |
db78dc5
to
e829871
Compare
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 |
a76751e
to
d60b201
Compare
d60b201
to
3837965
Compare
3837965
to
f1b3c2e
Compare
f1b3c2e
to
967ae34
Compare
7d0e6a3
to
9045927
Compare
@Frostman I've also added an iptable rule to mimic the ACL to drop fabric-to-fabric traffic that we recently added on the ds2000-01, it appears to work:
and
|
There was a problem hiding this 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 external connections as part of the VLAB generation process. It introduces parameters to control the number of externals and external connections created, with placement options for MCLAG, ESLAG, or orphan leaves.
- Adds new CLI flags for configuring external generation parameters
- Improves external connection validation and error handling in VLAB config
- Updates BGP configuration template for better multipath support
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
pkg/hhfab/vlabconfig.go | Enhanced external connection validation logic with better error handling for mixed hardware/virtual scenarios |
pkg/hhfab/vlabbuilder.go | Added external generation functionality with new parameters and connection creation methods |
pkg/hhfab/vlab_external_butane.tmpl.yaml | Updated BGP configuration to enable multipath-relax and improved routing policies |
pkg/hhfab/release.go | Refactored external detection logic and removed NamedExternal skip flag |
cmd/hhfab/main.go | Added CLI flags for external configuration parameters |
Comments suppressed due to low confidence (2)
pkg/hhfab/vlabbuilder.go:932
- [nitpick] The comment removal
//nolint:unparam
suggests this function now returns different error types, but the function signature and implementation appear unchanged. Consider adding back the nolint comment if the function still always returns the same error pattern, or document why it was removed.
func (b *VLABBuilder) createConnection(ctx context.Context, spec wiringapi.ConnectionSpec) (*wiringapi.Connection, error) {
pkg/hhfab/vlabbuilder.go:782
- [nitpick] The use of double hyphens '--' in the attachment name could be confusing and may cause parsing issues. Consider using a single hyphen or underscore for better readability and consistency.
extAttachName := fmt.Sprintf("%s--%s", conn.Spec.External.Link.Switch.DeviceName(), ext.Name)
c9be7a7
to
822128a
Compare
822128a
to
79c60af
Compare
79c60af
to
59e6912
Compare
to speed up testing with the new external spawn options, auto generate wirings for externals if desired Signed-off-by: Emanuele Di Pascale <[email protected]>
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 <[email protected]>
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 <[email protected]>
* 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 <[email protected]>
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 <[email protected]>
similar to what we do in the hardware external right now, to avoid peering VPCs at the external Signed-off-by: Emanuele Di Pascale <[email protected]>
59e6912
to
2a5ecf3
Compare
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