Virtualization: Modifying a cluster field also modifies member virtual machine sites #10725

Closed
opened 2025-12-29 21:35:13 +01:00 by adam · 2 comments
Owner

Originally created by @cruse1977 on GitHub (Jan 31, 2025).

Originally assigned to: @jeremystretch on GitHub.

Deployment Type

NetBox Cloud

NetBox Version

v4.2.2

Python Version

3.12

Steps to Reproduce

  1. Create a cluster with a blank scope
  2. Create some VM's, assign them to the cluster and assign them to a site
  3. Edit a field on the cluster (eg description) and save

Expected Behavior

Virtual Machines are not modified.

Observed Behavior

Virtual Machine site fields are cleared to match the cluster scope.

Note - there is some validation in netbox whereas a cluster is scoped to a site, you cannot add vms within a different site. This is expected given the cluster as been explicitly scoped.

However, modifying a field in the cluster should not impact virtual machines.

One big use case for this functionality is if the cluster is not scoped to a specific site - for example in an overlay cluster spanning multiple sites in which case virtual machines within a single cluster may be in multiple sites.

Originally created by @cruse1977 on GitHub (Jan 31, 2025). Originally assigned to: @jeremystretch on GitHub. ### Deployment Type NetBox Cloud ### NetBox Version v4.2.2 ### Python Version 3.12 ### Steps to Reproduce 1. Create a cluster with a blank scope 2. Create some VM's, assign them to the cluster and assign them to a site 3. Edit a field on the cluster (eg description) and save ### Expected Behavior Virtual Machines are not modified. ### Observed Behavior Virtual Machine site fields are cleared to match the cluster scope. Note - there is some validation in netbox whereas a cluster is scoped to a site, you cannot add vms within a different site. This is expected given the cluster as been explicitly scoped. However, modifying a field in the cluster should not impact virtual machines. One big use case for this functionality is if the cluster is not scoped to a specific site - for example in an overlay cluster spanning multiple sites in which case virtual machines within a single cluster may be in multiple sites.
adam added the type: bugstatus: acceptedseverity: medium labels 2025-12-29 21:35:13 +01:00
adam closed this issue 2025-12-29 21:35:13 +01:00
Author
Owner

@jnovinger commented on GitHub (Mar 3, 2025):

Putting this one back down for the moment. This particular behavior change would conflict with a bug we closed recently, VM site not updated when changing cluster site. We need to talk this through a bit more and figure out exactly what we want our expected behavior to be. Putting this on the agenda for the next maintainers meeting this coming Thursday.

@jnovinger commented on GitHub (Mar 3, 2025): Putting this one back down for the moment. This particular behavior change would conflict with a bug we closed recently, [VM site not updated when changing cluster site](https://github.com/netbox-community/netbox/issues/15020). We need to talk this through a bit more and figure out exactly what we want our expected behavior to be. Putting this on the agenda for the next maintainers meeting this coming Thursday.
Author
Owner

@jeremystretch commented on GitHub (Apr 4, 2025):

Unfortunately I think we need to ditch the denormalization approach implemented under #15020 as it doesn't support conditional updates.

@jeremystretch commented on GitHub (Apr 4, 2025): Unfortunately I think we need to ditch the denormalization approach implemented under #15020 as it doesn't support conditional updates.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10725