Parent module position not propagated to nested module name #10757

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

Originally created by @JakubDokladal on GitHub (Feb 10, 2025).

Deployment Type

Self-hosted

NetBox Version

v4.2.3

Python Version

3.12

Steps to Reproduce

  1. Create a device type "storage array" with for example 2 module bays for "storage controllers" with positions like "A" and "B"
  2. Create module type of "storage controller" with module bays for 4 SFP modules for which the name contains {module}
  3. Instantiate the "storage array" device
  4. Populate the "storage array" module bay with a "storage controller" module

Expected Behavior

The nested "SFP" module name would gets populated by "storage controller" module position e.g. A

Observed Behavior

The nested "SFP" module name gets populated by uninterpreted {module} string.

Image

Originally created by @JakubDokladal on GitHub (Feb 10, 2025). ### Deployment Type Self-hosted ### NetBox Version v4.2.3 ### Python Version 3.12 ### Steps to Reproduce 1. Create a device type "storage array" with for example 2 module bays for "storage controllers" with positions like "A" and "B" 2. Create module type of "storage controller" with module bays for 4 SFP modules for which the name contains `{module}` 3. Instantiate the "storage array" device 4. Populate the "storage array" module bay with a "storage controller" module ### Expected Behavior The nested "SFP" module name would gets populated by "storage controller" module position e.g. A ### Observed Behavior The nested "SFP" module name gets populated by uninterpreted `{module}` string. ![Image](https://github.com/user-attachments/assets/7899d869-74c2-45ac-a658-087b9a1214d8)
adam added the type: bugstatus: duplicate labels 2025-12-29 21:35:36 +01:00
adam closed this issue 2025-12-29 21:35:36 +01:00
Author
Owner

@renatoalmeidaoliveira commented on GitHub (Feb 14, 2025):

This issue seens to be related with #17436

@renatoalmeidaoliveira commented on GitHub (Feb 14, 2025): This issue seens to be related with #17436
Author
Owner

@renatoalmeidaoliveira commented on GitHub (Feb 15, 2025):

Hello @JakubDokladal could you add more details about how to repreduce the issue ?
And what table is that one you added the image?

@renatoalmeidaoliveira commented on GitHub (Feb 15, 2025): Hello @JakubDokladal could you add more details about how to repreduce the issue ? And what table is that one you added the image?
Author
Owner

@JakubDokladal commented on GitHub (Feb 17, 2025):

Hello @renatoalmeidaoliveira
Updating with more details as you requested.

  1. Create a Device type (Storage Array) with 2 module bays for Storage Array Controllers
Name Label Position
Controller A Label Controller A Position Controller A
Controller B Label Controller B Position Controller B

Image

  1. Create a Module type (Storage Array Controller) with 4 module bays for SFPs
Name Label Position
Controller {module} - Slot 1 Label Slot 1 Position Slot 1
Controller {module} - Slot 2 Label Slot 2 Position Slot 2
Controller {module} - Slot 3 Label Slot 3 Position Slot 3
Controller {module} - Slot 4 Label Slot 4 Position Slot 4

Image

  1. Create a Module type (Storage Array Controller SFP) with 1 interface
Name Type
Parent [{module}] Child [{module}] - Port 1 SFP+ (10GE)

Image

  1. Create a Device instance of Device type created in point 1. (Storage Array)

Image

  1. Add a Storage Array Controller Module to the newly created Device Instance Module bay

Image

I would expect that the {module} in the name of the child module bay (or actually ideally even in the child label and child position) would get populated from the parent position like it does for example for interfaces.
From the screenshot, that the Controller {module} - Slot 1 would actually be Controller Position Controller A - Slot 1

  1. Add a Storage Array Controller SFP Module to the Storage Array Controller Module bay

Image

For the interface name the positions get correctly populated even for the nested multi-module hierarchy

Image

@JakubDokladal commented on GitHub (Feb 17, 2025): Hello @renatoalmeidaoliveira Updating with more details as you requested. 1. Create a Device type (Storage Array) with 2 module bays for Storage Array Controllers | Name | Label | Position | |--------|--------|--------| | Controller A | Label Controller A | Position Controller A | | Controller B | Label Controller B | Position Controller B | ![Image](https://github.com/user-attachments/assets/2419602d-3674-4117-8ca5-a13898dd3190) 2. Create a Module type (Storage Array Controller) with 4 module bays for SFPs | Name | Label | Position | |--------|--------|--------| | Controller {module} - Slot 1 | Label Slot 1 | Position Slot 1 | | Controller {module} - Slot 2 | Label Slot 2 | Position Slot 2 | | Controller {module} - Slot 3 | Label Slot 3 | Position Slot 3 | | Controller {module} - Slot 4 | Label Slot 4 | Position Slot 4 | ![Image](https://github.com/user-attachments/assets/34370b60-67ef-49c2-90e2-7c31e9fc7eea) 3. Create a Module type (Storage Array Controller SFP) with 1 interface | Name | Type | |--------|--------| | Parent [{module}] Child [{module}] - Port 1 | SFP+ (10GE) | ![Image](https://github.com/user-attachments/assets/7665061c-c9e6-4df4-b7e7-7621521ae768) 4. Create a Device instance of Device type created in point 1. (Storage Array) ![Image](https://github.com/user-attachments/assets/c9e06aba-2dda-476f-8d88-fe52aad26a2c) 5. Add a Storage Array Controller Module to the newly created Device Instance Module bay ![Image](https://github.com/user-attachments/assets/dc7d5650-3426-4f8d-9f52-682562e4b704) I would expect that the `{module}` in the name of the child module bay (or actually ideally even in the child label and child position) would get populated from the parent position like it does for example for interfaces. From the screenshot, that the `Controller {module} - Slot 1` would actually be ` Controller Position Controller A - Slot 1` 6. Add a Storage Array Controller SFP Module to the Storage Array Controller Module bay ![Image](https://github.com/user-attachments/assets/0e7e71e0-554d-4a79-91bf-ce7dd464e08a) For the interface name the positions get correctly populated even for the nested multi-module hierarchy ![Image](https://github.com/user-attachments/assets/9374346b-dc1b-47ec-a3a1-baf700330db8)
Author
Owner

@arthanson commented on GitHub (Feb 18, 2025):

@renatoalmeidaoliveira can you please see if you can reproduce this issue as you are already working on the other one. I'll assign it to you.

@arthanson commented on GitHub (Feb 18, 2025): @renatoalmeidaoliveira can you please see if you can reproduce this issue as you are already working on the other one. I'll assign it to you.
Author
Owner

@renatoalmeidaoliveira commented on GitHub (Feb 19, 2025):

@arthanson tested and confirmed the issue in current release and post ##18643.
I think it can be closed as fixed by #18643

@renatoalmeidaoliveira commented on GitHub (Feb 19, 2025): @arthanson tested and confirmed the issue in current release and post ##18643. I think it can be closed as fixed by #18643
Author
Owner

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

Thanks @renatoalmeidaoliveira. I'm going to close this out as a duplicate of #17436, which was fixed in NetBox v4.2.4.

@jeremystretch commented on GitHub (Mar 3, 2025): Thanks @renatoalmeidaoliveira. I'm going to close this out as a duplicate of #17436, which was fixed in NetBox v4.2.4.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10757