aristanetworks / avd

Arista Validated Designs
https://avd.arista.com
Apache License 2.0
290 stars 209 forks source link

EVPN overlay variables generated although EVPN_role is none #1884

Closed vyelpale closed 2 years ago

vyelpale commented 2 years ago

Issue Summary

tried creating l3 router node type and keys where the router will not be running EVPN.

Defined the node type as :

l3router:
    type: l3router
    connected_endpoints: true
    default_evpn_role: none
    mlag_support: true
    ip_addressing:
      mlag_ip_primary: 'templates/ip_addressing/mlag_ip_primary.j2'
      mlag_ip_secondary: 'templates/ip_addressing/mlag_ip_secondary.j2'
      mlag_l3_ip_primary: 'templates/ip_addressing/mlag_l3_ip_primary.j2'
      mlag_l3_ip_secondary: 'templates/ip_addressing/mlag_l3_ip_secondary.j2'    
    network_services: 
      l2: true
      l3: true
    underlay_router: true
    uplink_type: p2p  

So, the evpn_role is None.

End result which appeared wrong of the device type that is not running EVPN Name of the prefix list containing EVPN OVERLAY that could be deceiving to the user and does not seem like there is a way to override this name

ip prefix-list PL-LOOPBACKS-EVPN-OVERLAY
   seq 10 permit 2.2.2.0/24 eq 32
route-map RM-CONN-2-BGP permit 10
   match ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY

Also noticed the below under debug vars for this node and appeared in accurate as EVPN role is none:

        overlay_address_families:
        - evpn
        overlay_routing_protocol: ebgp
        overlay_routing_protocol_address_family: ipv4

Which component(s) of AVD impacted

eos_designs

How do you run AVD ?

Ansible CLI (with virtual-env or native python)

Steps to reproduce

No response

Relevant log output

No response

Contributing Guide

ClausHolbechArista commented 2 years ago

I agree on the naming. I would prefer to change the general name to be more neutral to the deployment style, but we cannot change it as a non-breaking change, so for now, it would need to be a new configuration knob, to allow you to set the names.

I do not agree on the other variables. Your examples are role defaults (check the defaults/main.yml under eos_designs), which Ansible will always expose as variables as long as you are inside the role. So a lot of variables will be set, without necessarily being used. If you ran a similar debug check outside the role (ex. another task in your playbook) you would see that the variables are no longer there, since they are only set within the role context. I hope this makes sense.