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_redundancy_groups, bad data, and intended config #5713

Closed
auuecker opened this issue May 14, 2024 · 3 comments
Closed

Device_redundancy_groups, bad data, and intended config #5713

auuecker opened this issue May 14, 2024 · 3 comments
Labels
question Further information is requested triage This issue is new and has not been reviewed. type: bug Something isn't working as expected

Comments

@auuecker
Copy link

Environment

  • Nautobot version (Docker tag too if applicable): 2.2.3
  • Python version: 3.10
  • Database platform, version:
  • Middleware(s):

Steps to Reproduce

  1. Build config_context where it filters based on device_redundancy_groups as shown in example above but provide some variables for a template file to build an intended config
  2. have a template that uses the config_context to build intended config
  3. make sure that at least one of the device_redundancy_groups doesn't exist in nautobot, I receive an error like this in nautobot: Error in loading config context data from datacenter-junos_fw-logging_west.yml: No matching DeviceRedundancyGroup found for {'name': example1voice'}; unable to create/update context Datacenter Juniper Firewall West Logging
  4. have nautobot build intended config.

Expected Behavior

Expected behavior would be for there to be no intended config for example1voice devices in the device_redundancy_groups but I should have intended config built for example2video devices in that device_redundancy_groups

Observed Behavior

The observed behavior is that because example1voice device_redundancy_group doesn't exist then not devices in any of the filtered for device_redundancy_groups have their intended config build even if say example2video device_redundancy_groups does exist.

@auuecker auuecker added triage This issue is new and has not been reviewed. type: bug Something isn't working as expected labels May 14, 2024
@glennmatthews
Copy link
Contributor

I'm not certain I fully understand the issue reported here, but the mention of build intended config suggests that this may be a golden-config issue rather than a nautobot core issue?

@glennmatthews glennmatthews changed the title Device_redundancy_groups Device_redundancy_groups, bad data, and intended config May 20, 2024
@glennmatthews glennmatthews added the question Further information is requested label May 28, 2024
@lampwins
Copy link
Member

We don't want to support this type of behaviour because it does not meet the principal of a least surprise. If there are multiple config context records, I could see partially loading them if there are errors in some, but not partially loading an individual record that references non-existent data.

@auuecker
Copy link
Author

Just saw these comments I apologize, I do not use github very often. My issue is that if a device_redundancy_group that i describe as a filter does not have any data for it or it doesn't exist yet then all my other device_redunancy_group devices do not have their intended configs built because then the config_context variables break. I do not think that this should be the case. Just like if i have a role defined for a group of devices and i have multiple roles as the filters for a specific config_context I wouldnt want that config_context section to break for all roles that are being filtered for, just because one role I defined doesn't exist yet. But is there a reason for making the config_context break for all filtered devices rather than just the ones that don't exist?

The observed behavior is that because example1voice device_redundancy_group doesn't exist then not devices in any of the filtered for device_redundancy_groups have their intended config build even if say example2video device_redundancy_groups does exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested triage This issue is new and has not been reviewed. type: bug Something isn't working as expected
Projects
None yet
Development

No branches or pull requests

3 participants