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

Feat(eos_designs): Automatic assignment of Node IDs using pool manager #3162

Open
wants to merge 3 commits into
base: devel
Choose a base branch
from

Conversation

ClausHolbechArista
Copy link
Contributor

@ClausHolbechArista ClausHolbechArista commented Sep 23, 2023

Change Summary

Auto assignment of Node IDs using pool manager

Component(s) name

arista.avd.eos_designs

Proposed changes

# PREVIEW: This feature is in marked as "preview", which means it is subject to change at any time.
#
# Assignment policies for numbers like Node ID.
fabric_numbering:

  # Assignment policy for Node ID.
  # Node ID is mainly used for IP address assignment but can also affect BGP AS and/or
  # interface assignments depending on other settings.
  node_id:

    # IDs will be automatically assigned according to the configured algorithm.
    # - `static` will use the statically set IDs under node setting.
    # - `pool_manager` will activate the pool manager for ID pools.
    #   Any statically set ID under node settings will be reserved in the pool if possible.
    #   Otherwise an error will be raised.
    algorithm: <str; "static" | "pool_manager"; default="static">

    # Path to file to use for storing ID pool data when using "pool_manager" as algorithm.
    # This can be an absolute path or a path relative to current working directory.
    #
    # By default the path is "<root_dir>/intended/data/<fabric_name>-ids.yml".
    #
    # Note: Since the pool manager will remove stale entries after every run, each fabric should be using it's own file.
    pools_file: <str>

How to test

Added molecule coverage. Also needs manual testing by the reviewer.

Checklist

User Checklist

  • N/A

Repository Checklist

  • My code has been rebased from devel before I start
  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation and documentation have been updated accordingly.
  • I have updated molecule CI testing accordingly. (check the box if not applicable)

@github-actions github-actions bot added state: CI Updated CI scenario have been updated in the PR role: eos_designs issue related to eos_designs role state: Documentation role Updated labels Sep 23, 2023
@ClausHolbechArista ClausHolbechArista changed the title Feat(eos_designs): Auto assignment of Node IDs using pool manager Feat(eos_designs): Automatic assignment of Node IDs using pool manager Sep 23, 2023
@ClausHolbechArista ClausHolbechArista force-pushed the Feat(eos_designs)--Auto-assignment-of-IDs-using-pool-manager branch from 7a72aae to 9dcac91 Compare September 24, 2023 09:19
@github-actions github-actions bot added the type: documentation Improvements or additions to documentation label Sep 27, 2023
Copy link
Contributor

@jrecchia1029 jrecchia1029 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will want to do some more testing but the logic looks good to me.

@github-actions github-actions bot added the state: conflict PR with conflict label Oct 6, 2023
@github-actions
Copy link

github-actions bot commented Oct 6, 2023

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the state: conflict PR with conflict label Oct 20, 2023
@github-actions
Copy link

Conflicts have been resolved. A maintainer will review the pull request shortly.

@ClausHolbechArista ClausHolbechArista marked this pull request as ready for review October 20, 2023 14:35
@ClausHolbechArista ClausHolbechArista requested review from a team as code owners October 20, 2023 14:35
@carlbuchmann carlbuchmann self-requested a review October 23, 2023 19:50
@carlbuchmann carlbuchmann requested a review from gmuloc October 24, 2023 17:08
@carlbuchmann
Copy link
Member

Converting back to draft - after discussions with @ClausHolbechArista we agreed to put a restriction allowing either ID pool manager or statically defined IDs but not both. AVD should raise an error if the ID pool manager is enabled and id is assigned to a node.

@carlbuchmann carlbuchmann marked this pull request as draft October 24, 2023 20:21
@ClausHolbechArista ClausHolbechArista marked this pull request as ready for review October 25, 2023 11:35
carlbuchmann
carlbuchmann previously approved these changes Nov 1, 2023
Copy link
Member

@carlbuchmann carlbuchmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

  • Reviewed documentation.
  • Tested setting id on node and enabling pool manager, and id set on the node is considered and updates pool manager.
  • Update fabric-ids.yml manually to get desired id.
  • Manually set duplicate ids in fabric-ids.yml - resulted in structure config error.
  • Update dc_name after initial generation to update ids.
  • Tested on large multi-planar fabric with 700+ devices and no noticeable impact on performance.
  • Tested custom file path by setting pools_file.

Let me know if you would like more tests to be performed.

@carlbuchmann carlbuchmann requested a review from a team November 1, 2023 00:11
@github-actions github-actions bot added the state: conflict PR with conflict label Nov 18, 2024
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@ClausHolbechArista ClausHolbechArista force-pushed the Feat(eos_designs)--Auto-assignment-of-IDs-using-pool-manager branch from 05cc94f to 188035e Compare November 20, 2024 14:15
@github-actions github-actions bot removed the state: conflict PR with conflict label Nov 20, 2024
Copy link

Conflicts have been resolved. A maintainer will review the pull request shortly.

Copy link

@github-actions github-actions bot added the state: conflict PR with conflict label Nov 27, 2024
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link

Conflicts have been resolved. A maintainer will review the pull request shortly.

@github-actions github-actions bot removed the state: conflict PR with conflict label Dec 16, 2024
@ClausHolbechArista
Copy link
Contributor Author

change keys to dicts

@ClausHolbechArista ClausHolbechArista marked this pull request as ready for review January 14, 2025 09:35
@ClausHolbechArista ClausHolbechArista requested review from alexeygorbunov and a team January 15, 2025 06:27
@carlbuchmann
Copy link
Member

carlbuchmann commented Jan 21, 2025

Results from large multi-planar fabric test (1107 nodes)

---

1. Base - No pool manager enabled

TASKS RECAP **************************************************************************************************************************************
Monday 20 January 2025  16:54:50 -0500 (0:02:18.457)       0:10:45.970 ********
===============================================================================
arista.avd.eos_designs : Generate device configuration in structured format ------------------------------------------------------------- 484.88s
arista.avd.eos_cli_config_gen : Generate eos intended configuration and device documentation -------------------------------------------- 138.46s
arista.avd.eos_designs : Set eos_designs facts ------------------------------------------------------------------------------------------- 12.02s
arista.avd.eos_designs : Generate fabric documentation ------------------------------------------------------------------------------------ 5.61s
arista.avd.eos_designs : Remove avd_switch_facts ------------------------------------------------------------------------------------------ 3.63s
arista.avd.eos_designs : Create required output directories if not present ---------------------------------------------------------------- 0.78s
arista.avd.eos_designs : Verify Requirements ---------------------------------------------------------------------------------------------- 0.42s
arista.avd.eos_cli_config_gen : Verify Requirements --------------------------------------------------------------------------------------- 0.09s

PLAYBOOK RECAP ***********************************************************************************************************************************
Playbook run took 0 days, 0 hours, 10 minutes, 45 seconds

2. Pool manager enabled 1st run (data/Fabric-ids.yml not present)

TASKS RECAP *****************************************************************************************************************************************************************************************************************************************************************************************************************************
Monday 20 January 2025  20:50:37 -0500 (0:01:09.331)       0:10:34.089 ********
===============================================================================
arista.avd.eos_designs : Generate device configuration in structured format ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 540.48s
arista.avd.eos_cli_config_gen : Generate eos intended configuration and device documentation ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 69.33s
arista.avd.eos_designs : Set eos_designs facts ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 12.75s
arista.avd.eos_designs : Generate fabric documentation --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 5.92s
arista.avd.eos_designs : Remove avd_switch_facts --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 4.19s
arista.avd.eos_designs : Create required output directories if not present ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.80s
arista.avd.eos_designs : Verify Requirements ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.43s
arista.avd.eos_cli_config_gen : Verify Requirements ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 0.11s

PLAYBOOK RECAP **************************************************************************************************************************************************************************************************************************************************************************************************************************
Playbook run took 0 days, 0 hours, 10 minutes, 34 seconds


3. Pool manager enabled 2nd run (data/Fabric-ids.yml present)

TASKS RECAP *****************************************************************************************************************************************************************************************************************************************************************************************************************************
Monday 20 January 2025  21:02:50 -0500 (0:01:10.851)       0:10:04.389 ********
===============================================================================
arista.avd.eos_designs : Generate device configuration in structured format ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 508.85s
arista.avd.eos_cli_config_gen : Generate eos intended configuration and device documentation ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 70.85s
arista.avd.eos_designs : Set eos_designs facts ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 12.44s
arista.avd.eos_designs : Generate fabric documentation --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 6.54s
arista.avd.eos_designs : Remove avd_switch_facts --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 4.24s
arista.avd.eos_designs : Create required output directories if not present ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.84s
arista.avd.eos_designs : Verify Requirements ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 0.43s
arista.avd.eos_cli_config_gen : Verify Requirements ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 0.11s

PLAYBOOK RECAP **************************************************************************************************************************************************************************************************************************************************************************************************************************
Playbook run took 0 days, 0 hours, 10 minutes, 4 seconds

@@ -130,6 +130,61 @@ roles/eos_designs/docs/tables/fabric-topology.md
roles/eos_designs/docs/tables/fabric-ip-addressing.md
--8<--

## PREVIEW - Fabric Numbering
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree to include "PREVIEW" in the title, but we are inconsistent, i.e. "Zscaler Internet Exit". I think we should update Zscaler title, which can be done in another PR.

Copy link
Member

@carlbuchmann carlbuchmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ClausHolbechArista ClausHolbechArista force-pushed the Feat(eos_designs)--Auto-assignment-of-IDs-using-pool-manager branch from b5ae988 to e6baa64 Compare January 24, 2025 08:08
@ClausHolbechArista ClausHolbechArista deleted the Feat(eos_designs)--Auto-assignment-of-IDs-using-pool-manager branch January 24, 2025 08:36
@ClausHolbechArista ClausHolbechArista restored the Feat(eos_designs)--Auto-assignment-of-IDs-using-pool-manager branch January 24, 2025 09:14
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added the state: conflict PR with conflict label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
role: eos_designs issue related to eos_designs role state: CI Updated CI scenario have been updated in the PR state: conflict PR with conflict state: Documentation role Updated type: documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants