You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems like if device_filter is set in the playbook, even when using cvp v3 modules it is not ignored so if the filter doesn't match any devices the playbook will fail with something like below:
TypeError: 'NoneType' object is not iterable\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
we should either completely ignore this with v3 and/or improve the error handling and print that the filter didn't match on any devices
Which component(s) of AVD impacted
cvp_configlet_upload, eos_config_deploy_cvp
How do you run AVD ?
Ansible CLI (with virtual-env or native python)
Steps to reproduce
to repro simply add a `device_filter` that wouldn't match on any device, like in this playbook: https://github.com/arista-netdevops-community/ipspace-webinar-september15-2020/blob/master/playbooks/dc1-fabric-deploy-cvp.yml- name: Configuration deployment with CVP hosts: AVD-CVP-1 connection: local gather_facts: no tasks: - name: run CVP provisioning import_role: name: arista.avd.eos_config_deploy_cvp vars: container_root: 'TP_FABRIC' configlets_prefix: 'tp-avd' cv_collection: v3 device_filter: 'tP-avd' state: present
### Relevant log output
```shell
TASK [arista.avd.eos_config_deploy_cvp : Configure devices on AVD-CVP-1] ******************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: TypeError: 'NoneType' object is not iterable
fatal: [AVD-CVP-1]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/home/avd/.ansible/tmp/ansible-local-6068c2fjihx0/ansible-tmp-1635425729.7986908-7573-252610785688833/AnsiballZ_cv_device_v3.py\", line 100, in <module>\n _ansiballz_main()\n File \"/home/avd/.ansible/tmp/ansible-local-6068c2fjihx0/ansible-tmp-1635425729.7986908-7573-252610785688833/AnsiballZ_cv_device_v3.py\", line 92, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/home/avd/.ansible/tmp/ansible-local-6068c2fjihx0/ansible-tmp-1635425729.7986908-7573-252610785688833/AnsiballZ_cv_device_v3.py\", line 40, in invoke_module\n runpy.run_module(mod_name='ansible_collections.arista.cvp.plugins.modules.cv_device_v3', init_globals=dict(_module_fqn='ansible_collections.arista.cvp.plugins.modules.cv_device_v3', _modlib_path=modlib_path),\n File \"/usr/local/lib/python3.9/runpy.py\", line 210, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/local/lib/python3.9/runpy.py\", line 97, in _run_module_code\n _run_code(code, mod_globals, init_globals,\n File \"/usr/local/lib/python3.9/runpy.py\", line 87, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_arista.cvp.cv_device_v3_payload_2txlj912/ansible_arista.cvp.cv_device_v3_payload.zip/ansible_collections/arista/cvp/plugins/modules/cv_device_v3.py\", line 219, in <module>\n File \"/tmp/ansible_arista.cvp.cv_device_v3_payload_2txlj912/ansible_arista.cvp.cv_device_v3_payload.zip/ansible_collections/arista/cvp/plugins/modules/cv_device_v3.py\", line 194, in main\n File \"/tmp/ansible_arista.cvp.cv_device_v3_payload_2txlj912/ansible_arista.cvp.cv_device_v3_payload.zip/ansible_collections/arista/cvp/plugins/module_utils/device_tools.py\", line 265, in __init__\nTypeError: 'NoneType' object is not iterable\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
Contributing Guide
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Issue Summary
Seems like if
device_filter
is set in the playbook, even when using cvp v3 modules it is not ignored so if the filter doesn't match any devices the playbook will fail with something like below:found some refs here: https://github.com/aristanetworks/ansible-avd/blob/devel/ansible_collections/arista/avd/roles/eos_config_deploy_cvp/templates/cvp-devices-v3.j2
https://github.com/aristanetworks/ansible-avd/blob/devel/ansible_collections/arista/avd/plugins/modules/inventory_to_container.py
we should either completely ignore this with v3 and/or improve the error handling and print that the filter didn't match on any devices
Which component(s) of AVD impacted
cvp_configlet_upload, eos_config_deploy_cvp
How do you run AVD ?
Ansible CLI (with virtual-env or native python)
Steps to reproduce
Contributing Guide
The text was updated successfully, but these errors were encountered: