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): Add support to use router general for router id #4687

Draft
wants to merge 5 commits into
base: devel
Choose a base branch
from

Conversation

laxmikantchintakindi
Copy link
Contributor

@laxmikantchintakindi laxmikantchintakindi commented Nov 6, 2024

Change Summary

Add support to use router general for router id.

Related Issue(s)

Fixes #1245

Component(s) name

arista.avd.eos_designs

Proposed changes

Starting EOS 4.22.1F (https://eos.arista.com/eos-4-22-1f/general-router-id/) we support to set global router-id which can inherited to all BGP VRFs. Currently, AVD add router-id knob per VRF, which is suboptimal comparing to single global router-id config.

How to test

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)

Copy link

github-actions bot commented Nov 6, 2024

Review docs on Read the Docs

To test this pull request:

# Create virtual environment for this testing below the current directory
python -m venv test-avd-pr-4687
# Activate the virtual environment
source test-avd-pr-4687/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/laxmikantchintakindi/avd.git@feat/eos_designs/router-general-router-id#subdirectory=python-avd" --force
# Point Ansible collections path to the Python virtual environment
export ANSIBLE_COLLECTIONS_PATH=$VIRTUAL_ENV/ansible_collections
# Install Ansible collection
ansible-galaxy collection install git+https://github.com/laxmikantchintakindi/avd.git#/ansible_collections/arista/avd/,feat/eos_designs/router-general-router-id --force
# Optional: Install AVD examples
cd test-avd-pr-4687
ansible-playbook arista.avd.install_examples

@github-actions github-actions bot added state: CI Updated CI scenario have been updated in the PR state: Documentation role Updated role: eos_designs issue related to eos_designs role labels Nov 6, 2024
@laxmikantchintakindi laxmikantchintakindi force-pushed the feat/eos_designs/router-general-router-id branch 3 times, most recently from a60d675 to a2da7e8 Compare November 6, 2024 05:54
# Use Ctrl + Space to get suggestions for every field. Autocomplete will pop up after typing 2 letters.
type: dict
keys:
router_general_settings:
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see why we need this. You should just pick up the router id IPs as we normally do. The boolean is just changing how we output the config.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

keys:
use_router_general_for_router_id:
type: bool
description: This setting allows to use `router_id` set under `router_general_settings` as BGP router-id.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
description: This setting allows to use `router_id` set under `router_general_settings` as BGP router-id.
description: Use `router general` to set router ID for all routing protocols and VRFs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

if self.shared_utils.use_router_general_for_router_id is True and self.shared_utils.router_general is not None:
return get(self.shared_utils.router_general, "router_id.ipv4")

Copy link
Contributor

Choose a reason for hiding this comment

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

This is doing the opposite of what we want. The purpose is to not configure a router_id under router bgp or router ospf at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

overlay peering is using loopback0 ip which is generated from router-id. How to tackle this overlay peering issue when we are not generating router-id?

Copy link
Contributor

Choose a reason for hiding this comment

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

you should still be generating router-id. You should just not output it under each routing protocol, but instead only under the router general. So the shared_utils.router_id should not change at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@laxmikantchintakindi laxmikantchintakindi force-pushed the feat/eos_designs/router-general-router-id branch from 3a86485 to 27f0a0f Compare November 7, 2024 12:08
@laxmikantchintakindi laxmikantchintakindi force-pushed the feat/eos_designs/router-general-router-id branch from 7ea6f24 to 772b7db Compare November 7, 2024 12:35
@laxmikantchintakindi laxmikantchintakindi force-pushed the feat/eos_designs/router-general-router-id branch from 8044f5e to acd2783 Compare November 7, 2024 16:11
Copy link

sonarcloud bot commented Nov 7, 2024

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: Documentation role Updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feat(eos_designs): Add router general router-id ipv4 knob
2 participants