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

Fix(eos_validate_state): Fix the DHCP not recognized error for STUN and Connectivity tests #4764

Merged
merged 4 commits into from
Dec 2, 2024

Conversation

MaheshGSLAB
Copy link
Contributor

Change Summary

Fix the DHCP not recognized error for STUN and Connectivity tests. If the interface is dhcp then AvdTestStun and AvdTestP2PIPReachability tests try to collect the ip address from interface cause below error.

TASK [arista.avd.eos_validate_state : Run eos_validate_state_runner] *********************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ValueError: 'dhcp' does not appear to be an IPv4 or IPv6 interface
fatal: [Edge20]: FAILED! => {"changed": false, "msg": "Error during plugin execution: 'dhcp' does not appear to be an IPv4 or IPv6 interface"}

Related Issue(s)

Fixes #4725

Component(s) name

arista.avd.eos_validate_state

Proposed changes

Fix the DHCP not recognized error for STUN and Connectivity tests. If the interface is dhcp then AvdTestStun and AvdTestP2PIPReachability tests try to collect the ip address from interface cause below error.

Added the logic to check if interface is dhcp interface or not to avoid error.

How to test

Make the interface as DHCP and run the molecule. It should skip the test with below warning:

Host 'host1' interface 'Ethernet2' IP address is unavailable. AvdTestP2PIPReachability is skipped.
Host 'host1' interface 'Ethernet4' IP address is unavailable. AvdTestStun is skipped.

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)

@MaheshGSLAB MaheshGSLAB self-assigned this Nov 27, 2024
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-4764
# Activate the virtual environment
source test-avd-pr-4764/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/MaheshGSLAB/ansible-avd.git@issue-4725#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/MaheshGSLAB/ansible-avd.git#/ansible_collections/arista/avd/,issue-4725 --force
# Optional: Install AVD examples
cd test-avd-pr-4764
ansible-playbook arista.avd.install_examples

@github-actions github-actions bot added role: eos_validate_state state: CI Updated CI scenario have been updated in the PR labels Nov 27, 2024
@MaheshGSLAB MaheshGSLAB changed the title Bug(eos_validate_state): Fix the DHCP not recognized error for STUN and Connectivity tests Fix(eos_validate_state): Fix the DHCP not recognized error for STUN and Connectivity tests Nov 27, 2024
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 Nov 27, 2024
@MaheshGSLAB MaheshGSLAB marked this pull request as ready for review November 28, 2024 09:05
@MaheshGSLAB MaheshGSLAB requested review from a team as code owners November 28, 2024 09:05
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 Nov 28, 2024
@gmuloc gmuloc requested a review from a team November 28, 2024 09:45
@gmuloc gmuloc added the one approval This PR has one approval and is only missing one more. label Nov 28, 2024
@gmuloc
Copy link
Contributor

gmuloc commented Nov 28, 2024

@tonybourkesdnpros if you have time to test the PR it could be great!

Copy link
Contributor

@carl-baillargeon carl-baillargeon left a comment

Choose a reason for hiding this comment

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

LGTM

@gmuloc gmuloc merged commit 7d41e7a into aristanetworks:devel Dec 2, 2024
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
one approval This PR has one approval and is only missing one more. rn: Fix(eos_validate_state) role: eos_validate_state state: CI Updated CI scenario have been updated in the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug(eos_validate_state): DHCP not recognized for Pathfinder interfaces
3 participants