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

VM Rendered Config Context does not consider directly related site #14962

Closed
ChrisPortman opened this issue Jan 28, 2024 · 4 comments · Fixed by #14992
Closed

VM Rendered Config Context does not consider directly related site #14962

ChrisPortman opened this issue Jan 28, 2024 · 4 comments · Fixed by #14992
Assignees
Labels
severity: medium Results in substantial degraded or broken functionality for specfic workflows status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@ChrisPortman
Copy link
Contributor

ChrisPortman commented Jan 28, 2024

Deployment Type

Self-hosted

NetBox Version

v3.7.1

Python Version

3.8

Steps to Reproduce

  1. Create a site
  2. Create a Config Context and apply it to new site (step 1)
  3. Create a VM and set its site to the one created above
  4. DO NOT assign the VM to a cluster
  5. Inspect the rendered context in the UI. Note that the site config shows as a source context but it is not merged into the rendered context.
  6. Create a VM Cluster and assign its site to that created in step 1.
  7. Update the VM to be a member of that cluster
  8. Note that the rendered context for the VM now includes the sites config context

Expected Behavior

The VMs config context should include the sites context when it is directly related via the VM's site attribute with out requiring the cluster.

Observed Behavior

The VM context does not include the site context when it is directly related and not accessible via a cluster

@ChrisPortman ChrisPortman added the type: bug A confirmed report of unexpected behavior in the application label Jan 28, 2024
@ChrisPortman
Copy link
Contributor Author

I have a PR ready to resolve this

ChrisPortman pushed a commit to ChrisPortman/netbox that referenced this issue Jan 28, 2024
ChrisPortman pushed a commit to ChrisPortman/netbox that referenced this issue Jan 29, 2024
ChrisPortman pushed a commit to ChrisPortman/netbox that referenced this issue Jan 29, 2024
@jeremystretch
Copy link
Member

  1. Create a site with some config context

Sites do not have config context. Please elaborate on exactly what actions you're taking and what data you're providing at each step, so that someone else can confidently attempt to reproduce the bug.

@jeremystretch jeremystretch added the status: revisions needed This issue requires additional information to be actionable label Jan 29, 2024
ChrisPortman pushed a commit to ChrisPortman/netbox that referenced this issue Jan 29, 2024
@ChrisPortman
Copy link
Contributor Author

ChrisPortman commented Jan 29, 2024

@jeremystretch Sorry, you have to create the site, and then create the context and apply it to the site:

sites = models.ManyToManyField(

image

@jeremystretch jeremystretch added severity: medium Results in substantial degraded or broken functionality for specfic workflows and removed status: revisions needed This issue requires additional information to be actionable labels Jan 30, 2024
@jeremystretch jeremystretch self-assigned this Jan 30, 2024
@jeremystretch jeremystretch added the status: accepted This issue has been accepted for implementation label Jan 30, 2024
@jeremystretch jeremystretch removed their assignment Jan 30, 2024
@jeremystretch jeremystretch added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation and removed status: accepted This issue has been accepted for implementation labels Jan 30, 2024
@ChrisPortman
Copy link
Contributor Author

@jeremystretch, Im happy to own this one and submit a PR

@abhi1693 abhi1693 added status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Jan 31, 2024
jeremystretch added a commit that referenced this issue Feb 2, 2024
* Issue #14962 VM to merge directly related site context

* Cleanup & rewrite test

---------

Co-authored-by: Chris Carter <chris.carter@spinlocksecurity.com>
Co-authored-by: Jeremy Stretch <jstretch@netboxlabs.com>
jeremystretch added a commit that referenced this issue Feb 2, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
severity: medium Results in substantial degraded or broken functionality for specfic workflows status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants