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

[BUG] P2P links wrongly marked as 'multi-provider' LAN links #1658

Closed
jbemmel opened this issue Dec 16, 2024 · 6 comments
Closed

[BUG] P2P links wrongly marked as 'multi-provider' LAN links #1658

jbemmel opened this issue Dec 16, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@jbemmel
Copy link
Collaborator

jbemmel commented Dec 16, 2024

Lab topology

---
defaults.device: frr
groups:
 _auto_create: True
 core:
  members: [ c1, c2 ]
  provider: clab
 edge:
  members: [ e1, e2 ]
  provider: libvirt

links:
- c1-c2
- e1-c1
- e2-c2

Output

For host_vars/c1/topology.yml

af:
  ipv4: true
box: quay.io/frrouting/frr:10.0.1
clab:
  binds:
  - clab_files/c1/daemons:/etc/frr/daemons
  - clab_files/c1/hosts:/etc/hosts
  config_templates:
  - daemons:/etc/frr/daemons
  - hosts:/etc/hosts
  kind: linux
hostname: clab-Automation-c1
interfaces:
- bridge: Automation_1   <-- bridge added
  ifindex: 1
  ifname: eth1
  ipv4: 172.16.0.1/24
  linkindex: 1
  mtu: 1500
  name: c1 -> c2
  neighbors:
  - ifname: eth1
    ipv4: 172.16.0.2/24
    node: c2
  type: lan                      <-- p2p changed to 'lan'

Version: netlab dev branch

@jbemmel jbemmel added the bug Something isn't working label Dec 16, 2024
@jbemmel
Copy link
Collaborator Author

jbemmel commented Dec 16, 2024

Potential fix in providers/__init__.py:

  """
  Generic provider pre-transform processing: Mark multi-provider links
  """
  def pre_transform(self,topology : Box) -> None:
    if not 'links' in topology:
      return

    for l in topology.links:
      providers = {}
      for intf in l.interfaces:
        node = topology.nodes[intf.node]
        provider = node.get('provider',topology.provider)
        providers[provider] = True                        # Take note of providers being used

      if len(providers)<=1:
        continue                                          # Not a multi-provider link - continue
      
      p_name = topology.provider                          # Get primary and secondary provider
      for s_name in providers.keys():                     # ... to make the rest of the code more readable
        if s_name!=p_name:
          l[p_name].provider[s_name] = True               # Collect secondary link provider(s)
          if 'uplink' in l[p_name]:                       # ... and copy primary uplink to secondary uplink
            l[s_name].uplink = l[p_name].uplink

@ipspace
Copy link
Owner

ipspace commented Dec 29, 2024

This has been discussed previously. The link type does not matter for containerlab, and the default prefix pool is selected based on the number of attached nodes not the link type since #1673.

While this issue is technically correct, it's also irrelevant at the moment.

@ipspace ipspace closed this as completed Dec 29, 2024
@jbemmel
Copy link
Collaborator Author

jbemmel commented Dec 29, 2024

This has been discussed previously. The link type does not matter for containerlab, and the default prefix pool is selected based on the number of attached nodes not the link type since #1673.

While this issue is technically correct, it's also irrelevant at the moment.

I disagree. The bridge needlessly breaks LACP between MLAG peers when using containers for devices like Dell OS10 or Arista EOS

@jbemmel jbemmel reopened this Dec 29, 2024
@ipspace
Copy link
Owner

ipspace commented Dec 29, 2024

I disagree. The bridge needlessly breaks LACP between MLAG peers when using containers for devices like Dell OS10 or Arista EOS

You can disagree all you want, but the fact remains that a linux bridge is not used by containerlab configuration template when there are only two containers connected to a link.

@ipspace
Copy link
Owner

ipspace commented Jan 5, 2025

Now that the LAG link type is no longer used, the last vestiges of disagreements should be gone 🤪

@ipspace ipspace closed this as completed Jan 5, 2025
@jbemmel
Copy link
Collaborator Author

jbemmel commented Jan 5, 2025

We’ll find something else, don’t worry :)

We disagree, therefore we are

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

No branches or pull requests

2 participants