Cluster objects do not properly honor tenancy #10087

Closed
opened 2025-12-29 21:26:44 +01:00 by adam · 3 comments
Owner

Originally created by @christopher-horn on GitHub (Aug 14, 2024).

Deployment Type

Self-hosted

NetBox Version

v4.0.8

Python Version

3.10

Steps to Reproduce

  1. Create a site called "site1" with no associated tenant so can be shared across tenants.
  2. Create a tenant called "tenant1"
  3. Create a tenant called "tenant2"
  4. Create a cluster with the name "cluster" with site set to "site1" and tenant set to "tenant1"
  5. Try to create a cluster with the same name "cluster" with site also set to "site1" but with tenant set to "tenant2"

Expected Behavior

With no tenancy restriction on the site, I expect a new cluster to be created with the same name at the same site for the different tenant.

Observed Behavior

The create fails with the error "Cluster with this Site and Name already exists."

Originally created by @christopher-horn on GitHub (Aug 14, 2024). ### Deployment Type Self-hosted ### NetBox Version v4.0.8 ### Python Version 3.10 ### Steps to Reproduce 1. Create a site called "site1" with no associated tenant so can be shared across tenants. 2. Create a tenant called "tenant1" 3. Create a tenant called "tenant2" 4. Create a cluster with the name "cluster" with site set to "site1" and tenant set to "tenant1" 5. Try to create a cluster with the same name "cluster" with site also set to "site1" but with tenant set to "tenant2" ### Expected Behavior With no tenancy restriction on the site, I expect a new cluster to be created with the same name at the same site for the different tenant. ### Observed Behavior The create fails with the error "Cluster with this Site and Name already exists."
adam closed this issue 2025-12-29 21:26:44 +01:00
Author
Owner

@jeremystretch commented on GitHub (Aug 15, 2024):

This is intended behavior. Each cluster must have a name unique to its site, as indicated by the error message, irrespective of its assignment to a particular tenant.

@jeremystretch commented on GitHub (Aug 15, 2024): This is intended behavior. Each cluster must have a name unique to its site, as indicated by the error message, irrespective of its assignment to a particular tenant.
Author
Owner

@christopher-horn commented on GitHub (Aug 15, 2024):

But why should tenancy for a cluster behave any differently than it does for a device or virtual machine? We have multiple virtual machines with the same name in the same site but in different tenants without an issue. So I am very curious about the reasoning behind the design decision here.

@christopher-horn commented on GitHub (Aug 15, 2024): But why should tenancy for a cluster behave any differently than it does for a device or virtual machine? We have multiple virtual machines with the same name in the same site but in different tenants without an issue. So I am very curious about the reasoning behind the design decision here.
Author
Owner

@jeremystretch commented on GitHub (Aug 15, 2024):

So I am very curious about the reasoning behind the design decision here.

You are welcome to explore past discussion around the feature's implementation.

@jeremystretch commented on GitHub (Aug 15, 2024): > So I am very curious about the reasoning behind the design decision here. You are welcome to explore past discussion around the feature's implementation.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10087