Skip to content

Virtual Machine wrongfully inheriting config context from site's location #18392

@WilliamFitzjohn

Description

@WilliamFitzjohn

Deployment Type

NetBox Cloud

Triage priority

N/A

NetBox Version

v4.2.0

Python Version

3.10

Steps to Reproduce

Diagram for reference when reproducing:
Screenshot 2025-01-14 at 10 36 24 AM

STEPS:

  1. New Site "A1"
  2. New Location "L1 - prod" (linked to site "A1")
  3. New Location "L2 - lab" (linked to site "A1")
  4. New Config Context "A1-config"
    Location: "L1 - prod"
    Data:
    {
        "site_name": "A1 - prod"
    }
  5. New Config Context "A1-lab-config"
    Location: "L2 - lab"
    Data:
    {
        "site_name": "A1 - lab"
    }
  6. New VM "A1-prod-vm" (linked to site "A1", no location because VMs cant have locations)
  7. Check rendered config context of VM "A1-prod-vm"
    Screenshot 2025-01-14 at 10 33 54 AM

First question: How does the VM have a rendered config context but no source config contexts?
Second question: How is the VM getting a location based config context when the VM doesn't have a location?
Third question (optional): Why is the VM getting specifically the LAB config context in this senario?

For background, i first tried this in a v3.7.3 deployment then tried it in the v4.2.0 community demo and found the same issue. Found when we saw all our prod vms using a lab config context.

Expected Behavior

The VM shouldn't have any data in its config context

Observed Behavior

  1. The VM has data in the config context
  2. The VM's config context doesn't show where it got the source config from

Metadata

Metadata

Assignees

Labels

severity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions