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_config_deploy_cvp): share tags from parent to dependent tasks. #3333
Conversation
@arista-matt, thanks for providing a fix. Can you provide an example in the PR on how to test and the expected results? |
@@ -29,7 +29,7 @@ | |||
register: cvp_container_results | |||
|
|||
- name: "Execute pending tasks on {{ inventory_hostname }}" | |||
tags: [apply] | |||
tags: [apply, containers, provision] |
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.
So the apply
tag is only supposed to be used with --skip-tags
and not alone with --tags
. Your change here might make sense for your specific workflow, but it does not match everything else in the role, so it will be even harder for someone else to figure out what to do.
If we want to implement the tags for the apply steps as well, we should do it everywhere, but I am a bit worried about the side-effects, so doing this in a minor release is not good.
Example, someone runs with --tags provision
today. They get all the changes applied to cloudvision, but no tasks are executed (hitless). If we implement your suggestion, we would suddenly execute those tasks. That is a (dangerous) behavioral change.
Instead we can add some new tags. For this task it could be execute_cv_tasks_for_container_changes
and for the one above execute_cv_tasks_for_configlet_changes
and below execute_cv_tasks_for_device_changes
, giving granular control.
(Better names are welcome, but it needs to be clear - and documented).
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.
@ClausHolbechArista - the information you provided here should likely be included in the documentation, making it more prescriptive.
I've reverted the tag-based change for this specific task and tested the variables throughout.
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.
See comment. Blocking merge.
@carlbuchmann, I've updated the information to include how to test. |
ansible_collections/arista/avd/roles/eos_config_deploy_cvp/tasks/v3/present.yml
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_config_deploy_cvp/tasks/v3/present.yml
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_config_deploy_cvp/tasks/v3/present.yml
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_config_deploy_cvp/tasks/v3/present.yml
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_config_deploy_cvp/tasks/v3/present.yml
Outdated
Show resolved
Hide resolved
ansible_collections/arista/avd/roles/eos_config_deploy_cvp/tasks/v3/present.yml
Outdated
Show resolved
Hide resolved
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.
LGTM
Change Summary
share tags from parent to dependent tasks
Related Issue(s)
Fixes #3260
Component(s) name
arista.avd.eos_config_deploy_cvp
Proposed changes
arista.cvp.cv_task_v3
depends uponarista.cvp.cv_container_v3
'scvp_container_results
, but doesn't share thecontainers
tag. If thecontainers
tag is skipped,arista.cvp.cv_task_v3
will fail due to missingcvp_container_results
.How to test
The following documented/suggested command
ansible-playbook playbook.to.deploy.with.cvp.yml --skip-tags "containers"
should not fail with the error documented in the attached issue: #3260 However, it's also clear that if--skip-tags provision
is used it will similarly fail. So using--skip-tags
with either/bothprovision
andcontainers
successfully would indicate this issue has been fixed.Checklist
User Checklist
Repository Checklist