-
Notifications
You must be signed in to change notification settings - Fork 202
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
CI: cv_deploy molecule test to use new infra #4441
base: devel
Are you sure you want to change the base?
CI: cv_deploy molecule test to use new infra #4441
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-4441
# Activate the virtual environment
source test-avd-pr-4441/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/sugetha24/ansible-avd.git@cv_deploy-molecule-update#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/sugetha24/ansible-avd.git#/ansible_collections/arista/avd/,cv_deploy-molecule-update --force
# Optional: Install AVD examples
cd test-avd-pr-4441
ansible-playbook arista.avd.install_examples |
...ble_collections/arista/avd/molecule/cv_deploy/intended/configs/base_configs/avd-ci-leaf1.cfg
Outdated
Show resolved
Hide resolved
...ions/arista/avd/molecule/cv_deploy/intended/structured_configs/base_configs/avd-ci-leaf2.yml
Show resolved
Hide resolved
2994e4b
to
7c58a6f
Compare
aa4bc59
to
3be537b
Compare
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.
Have not tested that it runs but the PR LGTM
Please test the PR when you get a chance |
run_once: true | ||
delegate_to: localhost | ||
ansible.builtin.import_role: | ||
name: arista.avd.cv_deploy | ||
vars: | ||
cv_devices: [ci-s1-leaf1, ci-s1-leaf2, ci-s1-leaf3, ci-s1-leaf4, ci-s1-spine1, ci-s1-spine2, ci-s1-core1 ] | ||
cv_devices: [ avd-ci-leaf2, avd-ci-core1 ] |
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.
When trying to follow the guide to run the test I am not successful on the tenant getting issues (twice in a row) for task "Check CPV returns" line 176 below
Can you please investigate? I have the workspaces on the tenant if you want to verify more
Also it is very hard to troubleshoot what step is failing as the names of the task when using import_role
are hidden and so I am not sure where we are.
Suggestion would be to separate each "test" in a play in the same playbook or a whole different playbook.
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 guess running cv_deploy with cv_submit_workspace_force = false
and expecting workspace submission to fail with Failed to submit workspace
may be achieved by stopping streaming on one of the devices first. Otherwise workspace submission just succeeds without any errors
@@ -158,18 +157,18 @@ | |||
cv_submit_workspace_force: true | |||
cv_run_change_control: true | |||
|
|||
- name: Test = Provision with cv_submit_workspace_force = false | |||
- name: Provision with cv_submit_workspace_force = false |
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.
Stop streaming on core1 and wait to 130s seconds for streaming status turbine to notice (may need up to 2 minutes)
- name: Provision with cv_submit_workspace_force = false | |
- name: Force device avd-ci-core1 to stop streaming | |
arista.eos.eos_command: | |
commands: | |
- enable | |
- configure | |
- daemon TerminAttr | |
- shutdown | |
when: inventory_hostname == "avd-ci-core1" | |
- name: Pause for 130 seconds for streaming to stop | |
run_once: true | |
ansible.builtin.pause: | |
seconds: 130 | |
- name: Provision with cv_submit_workspace_force = false |
Once display and check tasks complete - we can then run the following task (before running next Cleanup) to re-enable streaming for core1:
- name: Force device avd-c1i-core1 to start streaming
arista.eos.eos_command:
commands:
- enable
- configure
- daemon TerminAttr
- no shutdown
when: inventory_hostname == "avd-ci-core1"
- name: Pause for 10 seconds for streaming to start
run_once: true
ansible.builtin.pause:
seconds: 10
s1-spine2: | ||
avd-ci-spine1: | ||
avd-ci-spine2: | ||
avd-ci-core1: |
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.
Add additional vars for core1 to allow eAPI-based enabling/disabling of TA streaming (foror testing workspace submission when some of the devices are not actively streaming)
avd-ci-core1: | |
avd-ci-core1: | |
ansible_host: "{{ lookup('env', 'AVD_CI_CORE1_FQDN') }}" | |
ansible_user: "{{ lookup('env', 'EOS_EAPI_USERNAME') }}" | |
ansible_password: "{{ lookup('env', 'EOS_EAPI_PASSWORD') }}" | |
ansible_connection: httpapi | |
ansible_httpapi_use_ssl: True | |
ansible_httpapi_validate_certs: False | |
ansible_network_os: eos | |
ansible_httpapi_port: 443 |
f8aa3a7
to
e19bc32
Compare
Quality Gate passedIssues Measures |
Change Summary
Updated molecule tests to use the new EVE-NG lab