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

Apply_mode: setting to differentiate between directly applied configlets and ones inherited from containers #462

Closed
1 task done
tonybourkesdnpros opened this issue Mar 4, 2022 · 1 comment
Labels
type: enhancement New feature or request

Comments

@tonybourkesdnpros
Copy link

tonybourkesdnpros commented Mar 4, 2022

Enhancement summary

This was an issue I found in #400

When using apply_mode: strict for cv_device_v3, configlets that aren't mentioned in the list for a device are removed (which is good). But so are any configlets that are inherited from the containers. Sometimes this is good, but sometimes this is bad if you want to use configlets applied to both containers and devices.

I can get around this by invoking devices_v3 first, and containers_v3 after it. But sometimes that means I have to run containers_v3 both before and after (once to setup the container archticture, then to assign configlets, and again to re-add the configlets inherited from containers that were removed from apply_mode: strict).

Which component of AVD is impacted

cv_device_v3

Use case example

For a playbook that acts like a "genesis torpedo" (Star Trek II reference), where by whatever configlets are on the containers and devices are replaced entirely with the variables in a YAML file, I use strict mode for cv_device_v3.

This is especially good in demos and lab environments, where we want to make sure the vestiges of the last configuration are wiped out in favor of the new arrangement (or in production where we want the YAML file used by cv_device_v3, cv_container_v3, cv_configlet_v3 to be the sole source of configuration truth).

Some container/device topologies benefit from using configlets applied to containers versus directly on devices, but that doesn't work when using apply_mode: strict.

Describe the solution you'd like

A setting for apply_mode: (similar to strict) which allows container-added configlets to remain.

Describe alternatives you've considered

There are two workarounds:

  • Just apply configlets only to devices.
  • Run the cv_containter_v3 task twice. Once before cv_device_v3, and once after.

Both work, but neither seem ideal.

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@tonybourkesdnpros tonybourkesdnpros added the type: enhancement New feature or request label Mar 4, 2022
@tonybourkesdnpros tonybourkesdnpros changed the title Strict_mode setting to differentiate between directly applied configlets and ones inherited from containers Apply_mode: setting to differentiate between directly applied configlets and ones inherited from containers Mar 4, 2022
@github-actions
Copy link

github-actions bot commented Jun 3, 2022

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 15 days

@github-actions github-actions bot added the state: stale Staled issues waiting for closure label Jun 3, 2022
@sugetha24 sugetha24 removed the state: stale Staled issues waiting for closure label Jan 9, 2024
@sugetha24 sugetha24 reopened this Jan 9, 2024
@sugetha24 sugetha24 added the help wanted Extra attention is needed label Jan 31, 2024
@sugetha24 sugetha24 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 16, 2024
@sugetha24 sugetha24 removed the help wanted Extra attention is needed label Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants