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

Bug(cv_container_v3): in 3.4.0 cannot use cv_facts_v3 generated output to create container topology due to new imageBundle key #508

Closed
1 task done
noredistribution opened this issue Aug 22, 2022 · 2 comments · Fixed by #513
Assignees
Labels
type: bug Something isn't working

Comments

@noredistribution
Copy link
Contributor

Issue Summary

In ansible-cvp 3.4.0 we've added some additional features around imageBundles and also started outputting if containers have image bundles assigned to them, e.g. when running cv_facts_3 the output will be like this:

---
Undefined:
    configlets: []
    image_bundle: EOS-4.25.4M
    parentContainerName: Tenant
containerA:
    configlets:
    - configletA1
    - configletA2
    image_bundle: ''
    parentContainerName: Tenant
containerB:
    configlets:
    - configletB1
    - configletB2
    image_bundle: ''
    parentContainerName: containerA

the issue is that additional properties are not allowed in our schema

setting that to True will fix the issue and any possible future enhancements where this might happen:
https://github.com/aristanetworks/ansible-cvp/blob/devel/ansible_collections/arista/cvp/plugins/module_utils/resources/schemas/v3.py#L241

Which component(s) of AVD impacted

cv_container_v3

How do you run AVD ?

Ansible CLI (with virtual-env or native python)

Input variables

- name: container topology creation
  hosts: CloudVision
  connection: local
  gather_facts: no
  vars:
    # Container definition
    containers_provision:
        Undefined:
            configlets: []
            image_bundle: EOS-4.25.4M
            parentContainerName: Tenant
        containerA:
            configlets:
            - configletA1
            - configletA2
            image_bundle: ''
            parentContainerName: Tenant
        containerB:
            configlets:
            - configletB1
            - configletB2
            image_bundle: ''
            parentContainerName: containerA

  tasks:
    - name: "Build Container topology on {{inventory_hostname}}"
      arista.cvp.cv_container_v3:
        topology: '{{containers_provision}}'

Steps to reproduce

ansible-playbook topo_create2.yaml

Relevant log output

PLAY [container topology creation] *********************************************************************************************

TASK [Build Container topology on CloudVision] ******************************************************************************************
fatal: [CloudVision]: FAILED! => {"changed": false, "msg": "Error, your input is not valid against current schema:\n Undefined"}

PLAY RECAP ******************************************************************************************************************************
CloudVision                : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

Code of Conduct

  • I agree to follow this project's Code of Conduct
@noredistribution noredistribution added the type: bug Something isn't working label Aug 22, 2022
@sugetha24
Copy link
Contributor

I would suggest to add a new keyword image_bundle to the cv_container schema and make sure it's not a required keyword so we don't introduce any breaking change.

@colinmacgiolla
Copy link
Contributor

Other option is to do a semi-breaking change, and have get_facts_v3 updated to change the image_bundle key to match the imageBundle in the schema.

That was the discussion on PR #505 - keep the schema as sacred...

We could still have get_facts_v3 output an image_bundle key, for anyone that is already using it, but mark it as deprecated. whether or not it should be an optional keyword in the schema... ??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants