-
Notifications
You must be signed in to change notification settings - Fork 212
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
base: devel
Are you sure you want to change the base?
Feat(eos_designs): Add support to use router general for router id #4687
Conversation
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 |
a60d675
to
a2da7e8
Compare
# Use Ctrl + Space to get suggestions for every field. Autocomplete will pop up after typing 2 letters. | ||
type: dict | ||
keys: | ||
router_general_settings: |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
There was a problem hiding this comment.
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") | ||
|
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
3a86485
to
27f0a0f
Compare
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
7ea6f24
to
772b7db
Compare
8044f5e
to
acd2783
Compare
Quality Gate passedIssues Measures |
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
Repository Checklist