aristanetworks / avd

Arista Validated Designs
https://avd.arista.com
Apache License 2.0
270 stars 197 forks source link

Arista AVD Version - v4.2.0-dev2 - Build failure #3066

Closed duddis1 closed 1 year ago

duddis1 commented 1 year ago

Issue Summary

We are unable to generate the intended config with Arista AVD Version "4.2.0-dev2". We have identified the root cause of the issues and some we have resolved with work around, but others we are unable to resolve, and this will require a change in your code base.

Which component(s) of AVD impacted

new components

How do you run AVD ?

Ansible CLI with AVD Runner

Steps to reproduce

We are unable to generate the intended config with Arista AVD Version "4.2.0-dev2". We have identified the root cause of the issues and some we have resolved with work around, but others we are unable to resolve, and this will require a change in your code base. 

Can these issues be resolved as a priority, specifically the second issue, because this is blocking the generation of intended config? if you need any further details don't hesitate to contact me, alternatively we can arrange a call as well.

The details are provided below. 

Mismatch in the Json schema version between avd and cvp as shown below. 
avd (v4.2.0-dev2)
jsonschema>=4.5.1,<4.18
cvp (v3.6.1)
jsonschema>=3.2.0

In arista-eos, the version mismatched between the tag and galaxy.yml, in the repo it is mentioned as 6.0.0, but the avd image is tagged as 6.0.1.

Relevant log output

No response

Contributing Guide

ClausHolbechArista commented 1 year ago

Hi, thank you for reporting these issues.

  1. jsonschema requirements are different between the two collections, but they don't conflict as such. I mean jsonschema>=4.5.1,<4.18 still fulfills the jsonschema>=3.2.0 requirement.
  2. The arista.eos collection is maintained by RedHat, so any discrepancies will have to be solved on their repo. I checked what you mentioned, and it seems like they overwrote their automatic version numbering in this commit. If you just install from galaxy or automation hub, you should not see any issues.

I would like to understand why these things are blocking you. Feel free to contact me directly if we should set up a call: holbech@arista.com.

duddis1 commented 1 year ago

We are getting below error message highlighted while running AVD for the second issue which was reported, due to this we can proceed further.

Do you want us to raise separate ticket in eos space to correct this error in their codebase? https://github.com/ansible-collections/arista.eos

ERROR LOG:- TASK [arista.avd.eos_designs : Verify Requirements] **** task path: /home/avd/.ansible/collections/ansible_collections/arista/avd/roles/eos_designs/tasks/main.yml:2 Not a git repository AVD version 4.2.0-dev2

Found netaddr 0.8.0 installed! Found Jinja2 3.1.2 installed! Found treelib 1.6.4 installed! Found cvprac 1.3.1 installed! Found paramiko 3.2.0 installed! Found jsonschema 4.17.3 installed! Found requests 2.28.1 installed! Found PyYAML 6.0.1 installed! Found md-toc 8.1.9 installed! Found deepmerge 1.1.0 installed! Found cryptography 41.0.2 installed! **### **ERROR! arista.eos version running 6.0.0 - required version is >=6.0.1**** { "ansible": { "collection": { "name": "arista.avd", "path": "/home/avd/.ansible/collections/ansible_collections", "version": "4.2.0-dev2" }, "ansible_version": "2.14.8", "requires_ansible": "!=2.13.0,<2.15.0,>=2.12.6", "collection_requirements": { "not_found": {}, "valid": { "arista.cvp": { "installed": "3.6.1", "required_version": ">=3.6.1" }, "ansible.utils": { "installed": "2.10.3", "required_version": ">=2.10.3" } }, "mismatched": { "arista.eos": { "installed": "6.0.0", "required_version": ">=6.0.1" } }, "parsing_failed": [] } }, "python": { "python_version_info": { "major": 3, "minor": 9, "micro": 16, "releaselevel": "final", "serial": 0 }, "python_path": [ "/home/avd/.local/share/virtualenvs/netbox_extract-zMJz_RXI/bin", "/usr/lib64/python39.zip", "/usr/lib64/python3.9", "/usr/lib64/python3.9/lib-dynload", "/home/avd/.local/share/virtualenvs/netbox_extract-zMJz_RXI/lib64/python3.9/site-packages", "/home/avd/.local/share/virtualenvs/netbox_extract-zMJz_RXI/lib/python3.9/site-packages" ], "python_requirements": { "not_found": {}, "valid": { "netaddr": { "installed": "0.8.0", "required_version": ">=0.7.19" }, "Jinja2": { "installed": "3.1.2", "required_version": ">=2.11.3" }, "treelib": { "installed": "1.6.4", "required_version": ">=1.5.5" }, "cvprac": { "installed": "1.3.1", "required_version": ">=1.3.1" }, "paramiko": { "installed": "3.2.0", "required_version": ">=2.7.1" }, "jsonschema": { "installed": "4.17.3", "required_version": "<4.18,>=4.5.1" }, "requests": { "installed": "2.28.1", "required_version": ">=2.25.1" }, "PyYAML": { "installed": "6.0.1", "required_version": ">=5.4.1" }, "md-toc": { "installed": "8.1.9", "required_version": ">=7.1.0" }, "deepmerge": { "installed": "1.1.0", "required_version": ">=1.1.0" }, "cryptography": { "installed": "41.0.2", "required_version": ">=38.0.4" } }, "mismatched": {}, "parsing_failed": [] } } } fatal: [SVP-CAMP01 -> localhost]: FAILED! => { "changed": false, "msg": "Set 'avd_ignore_requirements=True' to ignore validation error(s)." } ================================================================================== Below are the collection list returned by Galaxy. [avd@90d0b1f8adb1 netbox_extract]$ ansible-galaxy collection list # /home/avd/.ansible/collections/ansible_collections Collection Version --------------------- ---------- ansible.netcommon 5.1.2 ansible.utils 2.10.3 arista.avd 4.2.0-dev2 arista.cvp 3.6.1 arista.eos 6.0.0 community.hashi_vault 3.4.0
ClausHolbechArista commented 1 year ago

To unblock your workflow, add this to your group_vars:

avd_ignore_requirements: true
ClausHolbechArista commented 1 year ago

So our arista.eos collection requirement is >=6.0.1 but you only have 6.0.0 installed as reported by both ansible-galaxy collection list as well as our requirements validation tool. So I think you should try to upgrade arista.eos with ansible-galaxy collection install "arista.eos:==6.0.1".

I just checked the tar ball from Ansible Galaxy and it correctly reports version 6.0.1.

If you clone from Github based on the tag, this might indeed fail like you see, because of the issue you mentioned. Generally we always recommend to install from Galaxy.

Re the arista.eos version issue, it would be good to submit an issue on that repo.

duddis1 commented 1 year ago

we are installing eos 6.0.1 using ansible-galaxy But when it gets installed the MANIFEST.json gets created & it gets the version 6.0.0 from galaxy.yml Your python script verify_requirements.py reads MANIFEST.json to find out the installed version

Raised below issue in arista.eos repo https://github.com/ansible-collections/arista.eos/issues/427

ClausHolbechArista commented 1 year ago

I think there is still some misunderstanding here:

So I am not sure how you are installing it, but I am guessing you are installing it with some git tag instead of using galaxy.ansible.com.

ClausHolbechArista commented 1 year ago

Moving to a discussion since this is not a bug in arista.avd.