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): Only enable PTP on certain uplinks #4819

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

Conversation

laxmikantchintakindi
Copy link
Contributor

@laxmikantchintakindi laxmikantchintakindi commented Dec 17, 2024

Change Summary

Only enable PTP on certain uplinks.

  node_groups:
    - group: leaf1
      nodes:
        - name: leaf1a
          ptp:
            enabled: true
	    uplinks: [...] # restrict ptp config on these uplinks only

Related Issue(s)

Fixes #4009

Component(s) name

arista.avd.eos_designs

Proposed changes

Provide a mechanism to control which uplinks are enabled for PTP.
Could be either a list of uplink interfaces or maybe an algorithm like modulus on the node ID.

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

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-4819
# Activate the virtual environment
source test-avd-pr-4819/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/laxmikantchintakindi/avd.git@feat/eos_designs/restrict-ptp-on-certain-uplinks#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/restrict-ptp-on-certain-uplinks --force
# Optional: Install AVD examples
cd test-avd-pr-4819
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 Dec 17, 2024
@laxmikantchintakindi laxmikantchintakindi force-pushed the feat/eos_designs/restrict-ptp-on-certain-uplinks branch from 76735f7 to 0d4d76d Compare December 17, 2024 07:46
@laxmikantchintakindi laxmikantchintakindi changed the title Feat(eos designs): Only enable PTP on certain uplinks Feat(eos_designs): Only enable PTP on certain uplinks Dec 17, 2024
@laxmikantchintakindi laxmikantchintakindi force-pushed the feat/eos_designs/restrict-ptp-on-certain-uplinks branch 4 times, most recently from e05a8b9 to 1eea385 Compare December 18, 2024 08:37
@laxmikantchintakindi laxmikantchintakindi force-pushed the feat/eos_designs/restrict-ptp-on-certain-uplinks branch from 7c16b15 to 40d27e5 Compare December 18, 2024 17:12
@github-actions github-actions bot added the state: conflict PR with conflict label Dec 20, 2024
Copy link

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

@laxmikantchintakindi laxmikantchintakindi force-pushed the feat/eos_designs/restrict-ptp-on-certain-uplinks branch from 8710e69 to 4827d07 Compare December 23, 2024 04:57
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 23, 2024
@laxmikantchintakindi laxmikantchintakindi force-pushed the feat/eos_designs/restrict-ptp-on-certain-uplinks branch from 8edf396 to 8d69da1 Compare January 3, 2025 11:13
@Vibhu-gslab Vibhu-gslab force-pushed the feat/eos_designs/restrict-ptp-on-certain-uplinks branch from 8d69da1 to 2051b31 Compare January 7, 2025 10:16
Comment on lines +28 to +29
ptp:
enabled: true
Copy link
Contributor

@Vibhu-gslab Vibhu-gslab Jan 7, 2025

Choose a reason for hiding this comment

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

Can we add a testcase where "ptp: enabled" is not defined but uplinksis defined.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ptp_settings in PTP_TESTS.yml group vars is set to true. So even ptp:enabled is not set, there will be no change in configs.

Copy link
Contributor

@Vibhu-gslab Vibhu-gslab Jan 9, 2025

Choose a reason for hiding this comment

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

I understand, but having a testcase for it would make it more clear.
You can mention in comment above testcase what it is for.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add more tests like uplinks under defaults and node group

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed both comments.

Copy link
Contributor

@Vibhu-gslab Vibhu-gslab left a comment

Choose a reason for hiding this comment

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

request changes

@laxmikantchintakindi laxmikantchintakindi force-pushed the feat/eos_designs/restrict-ptp-on-certain-uplinks branch from d7ea276 to 3633c52 Compare January 8, 2025 06:42
@Vibhu-gslab Vibhu-gslab marked this pull request as ready for review January 9, 2025 10:39
@Vibhu-gslab Vibhu-gslab requested review from a team as code owners January 9, 2025 10:39
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): Only enable PTP on certain uplinks
3 participants