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] vrrp.priority defined on node VLAN not taken into account #1349

Closed
jbemmel opened this issue Oct 9, 2024 · 1 comment
Closed

[BUG] vrrp.priority defined on node VLAN not taken into account #1349

jbemmel opened this issue Oct 9, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@jbemmel
Copy link
Collaborator

jbemmel commented Oct 9, 2024

Describe the bug

In a topology that has a gateway on a VLAN using vrrp, the vrrp.priority configured on each node is not copied to the interface.
Consequently, all nodes get the default priority

To Reproduce

netlab create bug-topo

Expected behavior

Expected to see the configured vrrp.priority values on the VLAN interfaces for each node

Lab topology

module: [ vlan, gateway ]

vlans:
 v1:
  gateway:
   protocol: vrrp

nodes:
 r1:
  vlans:
   v1:
    gateway.vrrp.priority: 100
 r2:
  vlans:
   v1:
    gateway.vrrp.priority: 200

links:
- r1:
  r2:
  vlan.trunk: [ v1 ]

Output

In host_vars/r1/topology.yml
...
- bridge_group: 1
  gateway:
    id: -2
    ipv4: 172.16.0.254/24
    protocol: vrrp
    vrrp:
      group: 1
- ...

Version

netlab version 1.9.1

@jbemmel jbemmel added the bug Something isn't working label Oct 9, 2024
@ipspace
Copy link
Owner

ipspace commented Oct 10, 2024

Nasty :( Fixing...

@ipspace ipspace self-assigned this Oct 10, 2024
ipspace added a commit that referenced this issue Oct 10, 2024
The VLAN module did not copy gateway.* items specified in the global
or node VLAN data to prevent 'gateway: true' overwriting the data
computed through the gateway module transformation and subsequent
link transformation.

With a perfect hindsight, that was wrong. This fix:

* Removes the 'do not copy gateway.* items' restriction
* Changes the 'merge interface data with node vlan data' logic to
  say 'if the VLAN data is True and the interface data exists, use
  the interface data'

The first change fixes the 'vlan-vrrp' test case. The second change
keeps 'anycast-gateway' test case working.
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