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

Device filtering in jobs wrongly matches excluded devices when GC dynamic group uses child groups #706

Open
johanek opened this issue Jan 25, 2024 · 2 comments

Comments

@johanek
Copy link

johanek commented Jan 25, 2024

Environment

  • Python version: 3.8.10
  • Nautobot version: 1.6.2
  • nautobot-golden-config version: 1.6.4

Expected Behavior

Devices which are not part of the golden config dynamic group are not matched when running golden config jobs (generate intended config, run config compliance)

Observed Behavior

They are included

Steps to Reproduce

I have a golden config dynamic group which has two child groups - a dynamic group of included hosts, and a dynamic group of devices tagged with "disable-compliance-checks" which are excluded. The list of members in the UI is correct according to this logic. The idea behind this is to disable config compliance on the "specials".

The dynamic group logic looks something like this:

(
  device_role__slug='customer-router' AND platform__slug='juniper_junos' AND (
    NOT (tags__slug='disable-compliance-checks')
  )
)

When running an intended config generation or config compliance job, the excluded devices are matched (and generate errors in my case).

In fact when trying to run intended config generation for any device - even one not matching the include dynamic group - nautobot will try and generate the config for the device.

@johanek johanek changed the title Device filtering in jobs wrong matches excluded devices when GC dynamic group uses child groups Device filtering in jobs wrongly matches excluded devices when GC dynamic group uses child groups Jan 25, 2024
@itdependsnetworks
Copy link
Contributor

Does it show correctly in the dynamic group definition itself?

@johanek
Copy link
Author

johanek commented Jan 26, 2024

Does it show correctly in the dynamic group definition itself?

Yes, the list of members in the UI is correct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants