Add a device to multiple clusters #6294

Closed
opened 2025-12-29 19:39:03 +01:00 by adam · 4 comments
Owner

Originally created by @remram44 on GitHub (Apr 4, 2022).

NetBox version

8971109c8ad6 (v3.0.9)

Feature type

Change to existing functionality

Proposed functionality

Allow a single device to be in multiple clusters.

Use case

For example, I have joined some machines to a Kubernetes cluster and a subset of those to a Ceph cluster as well. However if I add a machine to my Kubernetes cluster I can't add them to my Ceph cluster.

I could use a "service" for Ceph, but I would need to mention which Ceph cluster in the name of the service, which really seems like this is not the right way.

Another example would be if I wanted to be explicit about etcd or manage it manually. Those machines would probably overlap with the Kubernetes cluster.

Database changes

cluster is currently a field in the Device model, needs to change to a many-to-many relationship.

External dependencies

No response

Originally created by @remram44 on GitHub (Apr 4, 2022). ### NetBox version 8971109c8ad6 (v3.0.9) ### Feature type Change to existing functionality ### Proposed functionality Allow a single device to be in multiple clusters. ### Use case For example, I have joined some machines to a Kubernetes cluster and a subset of those to a Ceph cluster as well. However if I add a machine to my Kubernetes cluster I can't add them to my Ceph cluster. I could use a "service" for Ceph, but I would need to mention *which Ceph cluster* in the name of the service, which really seems like this is not the right way. Another example would be if I wanted to be explicit about etcd or manage it manually. Those machines would probably overlap with the Kubernetes cluster. ### Database changes [`cluster` is currently a field in the `Device` model](https://github.com/netbox-community/netbox/blob/99a01207bcf3202d04986862398d3934bb5e912a/netbox/dcim/models/devices.py#L556-L562), needs to change to a many-to-many relationship. ### External dependencies _No response_
adam added the type: feature label 2025-12-29 19:39:03 +01:00
adam closed this issue 2025-12-29 19:39:03 +01:00
Author
Owner

@jeremystretch commented on GitHub (Apr 5, 2022):

The cluster model in NetBox is intended to model virtual compute instances; clustered storage would likely need an entirely separate model to be feasible. Given this, I don't think it makes sense to allow a physical devices to serve multiple clusters.

@jeremystretch commented on GitHub (Apr 5, 2022): The cluster model in NetBox is intended to model virtual compute instances; clustered storage would likely need an entirely separate model to be feasible. Given this, I don't think it makes sense to allow a physical devices to serve multiple clusters.
Author
Owner

@remram44 commented on GitHub (Apr 5, 2022):

I see. That makes sense to me.

What is the correct way to represent "a group of devices providing a service"? Using "service" for this does not allow to e.g. find all devices that are part of the group, and "device role" has the same single-relationship limitation.

@remram44 commented on GitHub (Apr 5, 2022): I see. That makes sense to me. What is the correct way to represent "a group of devices providing a service"? Using "service" for this does not allow to e.g. find all devices that are part of the group, and "device role" has the same single-relationship limitation.
Author
Owner

@jeremystretch commented on GitHub (Apr 7, 2022):

What is the correct way to represent "a group of devices providing a service"?

This has come up in a few different contexts I think and the idea goes by a few names: business application, service group, etc. I don't think it's every been really well-defined in an FR, but you're certainly welcome to open one. Or maybe start a discussion first to see if we can identify a common set of needs among users given the ambiguous nature of the concept.

I'm going to close out this FR as I don't think it ultimately meets your needs.

@jeremystretch commented on GitHub (Apr 7, 2022): > What is the correct way to represent "a group of devices providing a service"? This has come up in a few different contexts I think and the idea goes by a few names: business application, service group, etc. I don't think it's every been really well-defined in an FR, but you're certainly welcome to open one. Or maybe start a [discussion](https://github.com/netbox-community/netbox/discussions/new) first to see if we can identify a common set of needs among users given the ambiguous nature of the concept. I'm going to close out this FR as I don't think it ultimately meets your needs.
Author
Owner

@remram44 commented on GitHub (Apr 7, 2022):

Alright, no problem. I found #1591 which might help, I will check out the new version.

@remram44 commented on GitHub (Apr 7, 2022): Alright, no problem. I found #1591 which might help, I will check out the new version.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6294