question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for maintenance mode profile configuration

See original GitHub issue

Issue Type

  • Template enhancement
  • Role enhancement
  • Documentation enhancement (avd.sh)

Is your feature request related to a problem? Please describe.

We have to adjust the maintenance mode profile configuration on all L3/MLAG-Leaf switches to make maintenance mode work in our environment.

Describe the solution you’d like

We have to configure a maintenance profile interface with certain values like the following one and make it the default.

maintenance
   profile interface int_maint default
   !
   profile interface int_maint
      rate-monitoring load-interval 100
      rate-monitoring threshold 1000
      shutdown max-delay 100

There is currently no template available within the eos_cli_config_gen role. The data model could perhaps look like this:

maintenance:
  profile:
    interface:
      < profile_interface_1 >:
        rate_monitoring:
          load_interval: < seconds >
          threshold: < kbps >
        shutdown:
          max_delay: < seconds >     
        default: < true | false >

Describe alternatives you’ve considered

The current alternative is, to create a config_let within CVP and bind it to the containers of our leafs manually within CVP or “automated” by adding the config_let via AVD. Our goal is that Ansible code is the single source of configuration.

Additional context

Add any other context or screenshots about the feature request here.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
daanvdsandencommented, May 7, 2021

I would like to suggest a different data model:

  1. move the default out of the profiles (no need to loop all the profiles to get the default, also what behavior do you want when two profiles have set the default to true).
  2. flatten the profiles to have it match the config hierarchy, this also makes the plural form a bit more logical

This makes the model match the cli config hierarchy better and less logic is needed (which can be embedded in the design role).

maintenance:
  default_interface_profile: <interface_profile_1>
  default_bgp_profile: < bgp_profile_1 >
  default_unit_profile: < unit_profile_1 >
  interface_profiles:
    < interface_profile_1 >:
      rate_monitoring:
        load_interval: < seconds >
        threshold: < kbps >
      shutdown:
        max_delay: < seconds >     
  bgp_profiles:
    < bgp_profile_1 >:
      initiator:
        route_map_inout: < route_map >
  unit_profiles:
    < unit_profile_1 >:
      on_boot:
        duration: < 300-3600 >

EDIT: changed unit and bgp profiles to be more consistent with the rest of the template.

0reactions
daanvdsandencommented, Jun 10, 2021

I like the fact that the generated config is an exact match of the running config. So when I started I also used the “lazy” method and I thought I could flatten the array the same way as is done with vlans on a trunk port. That was impossible for me since to do this properly I need to know for what kind of device I’m creating the config for. That was the point I was trying to make with the Ethernet2/2 example. It can be two different things which can impact the result when the array is flattened.

E.G. the following happens on a 7050CX switch with QSFPs:

EOS(config-group-if-TEST)#interface ethernet 1/1-4
EOS(config-group-if-TEST)#interface ethernet 2/1-4
EOS(config-group-if-TEST)#show active
group interface TEST
   interface Et1/1-2/4
   exit

However when the same commands are given on a arista with linecard where SFP(+) modules inserted in slot 1 and 2, I (assume) it will not get flatten the same, I expect this to happen (assumption, I don’t have a 7500 to test this):

EOS(config-group-if-TEST)#interface ethernet 1/1-4
EOS(config-group-if-TEST)#interface ethernet 2/1-4
EOS(config-group-if-TEST)#show active
group interface TEST
   interface Et1/1-4,2/1-4
   exit
Read more comments on GitHub >

github_iconTop Results From Across the Web

Cisco Nexus 9000 Series NX-OS System Management ...
Maintenance -mode profile—Contains all the commands that will be executed during graceful removal, when the switch enters maintenance mode.
Read more >
Cisco NX-OS Graceful Insertion and Removal (GIR)
The maintenance-mode profile: containing all the commands that will be executed during the GIR activation or graceful removal, when the switch ...
Read more >
Maintenance Mode - Nokia Documentation
A maintenance profile is configured that specifies policy changes to apply when the group is in maintenance mode. A maintenance profile is associated...
Read more >
EOS 4.29.0F - Maintenance Mode - Arista
Enter configuration commands unit and no quiesce using the maintenance profile bgp mode command for the switch to exit maintenance mode. The following...
Read more >
Moving a Device to Maintenance Mode - Juniper Networks
Junos Space Virtual Appliance,JA2500. Starting Junos Space Service Now Release 15.1R1, Service Now provides the Maintenance Mode option on the Actions list ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found