aristanetworks / avd

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

Choosing a modular platform should update the default management port #1056

Closed dgonzalez85 closed 2 years ago

dgonzalez85 commented 3 years ago

Issue Type

Summary

When a platform such as 7500R is chosen, the default management port is still "Management1" which does not exists in modular switches. It would be nice that is automatically set to "Management0" (active supervisor).

Steps to reproduce

  1. Chose platform 7500
  2. Management port for all platforms are still using default port "Management1".

Expected results

Modular platforms to use Management0 instead.

ClausHolbechArista commented 3 years ago

Today we read the variable mgmt_interface which is set as an ansible group_var. You could override that on host_var level or for sub-groups, but that would be cumbersome to maintain.

A better solution would be with a new key under platform_settings.

platform_settings:
  - platforms: [<...>]
    <...>
    management_interface: < management interface name | default -> Management1 >

Example:


platform_settings:
  - platforms: [default]
    reload_delay:
      mlag: 300
      non_mlag: 330
    feature_support:
      queue_monitor_length_notify: false
  - platforms: [7280R3, 7280R2, 7280R]
    tcam_profile: vxlan-routing
    lag_hardware_only: true
    reload_delay:
      mlag: 780
      non_mlag: 1020
  - platforms: [7800R3, 7500R3, 7500R]
    tcam_profile: vxlan-routing
    lag_hardware_only: true
    management_interface: Management0
    reload_delay:
      mlag: 780
      non_mlag: 1020
dgonzalez85 commented 3 years ago

Thanks, i was just wondering if we wanted to avoid that modular platforms had "Management1" set as the default port, since it's not a valid interface in that case, but yes this works fine too.

In my case i used the spines.yml file which are modular devices to override the management interface:

type: spine
mgmt_interface: Management0

logging:
  source_interface: Management0
  vrfs:
    MGMT:
      source_interface: Management0
      hosts:
        - 1.2.3.4

snmp_server:
  local_interfaces:
    Management0:
      vrf: MGMT

I noticed that for some services like ntp, the source interface it's automatically changed to Management0 when the override the management interface. But we still need to set it up for the logging or the snmp-server too.

thanks

dgonzalez85 commented 3 years ago

Just to be clear, i agree the best option is to set this up at the platform level like in your example. But we might need some additional config like this to set the right interface as source for some services then.

ClausHolbechArista commented 2 years ago

Remove default mgmt_interface. first mgmt_interface then platform setting, using "Management1" as last resort.