Module type with token {module} fails to be inserted in module bays #11131

Closed
opened 2025-12-29 21:40:45 +01:00 by adam · 9 comments
Owner

Originally created by @Kompromatas on GitHub (May 6, 2025).

Deployment Type

Self-hosted

NetBox Version

v4.2.6

Python Version

3.12

Steps to Reproduce

I have created a Module Type "B10000-controller" with 4 module bays:

Image

Then created another Module Type "HBA Card" with 4 interfaces:

Image

Also created a Device Type "B10000" with 2 module bays:

Image

After this I need to create a device. For this device will be used Device Type "B10000". After device creation inserted module "Controller" to module bay "controller0":

Image

And now I need insert module "HBA Card" to Bay S1 and when trying to insert it getting error message:

Image

But if I change on Module Type "HBA Card" interface naming to manual with out token {module}:

Image

I am able to insert this module without issues.
But now it causes another issues with interface naming, can not add another module because interface names already exists.

Hopes this will help reproduce issues.

Expected Behavior

Fix issue with token {module}

Observed Behavior

A TypeError exception was raised

Originally created by @Kompromatas on GitHub (May 6, 2025). ### Deployment Type Self-hosted ### NetBox Version v4.2.6 ### Python Version 3.12 ### Steps to Reproduce I have created a Module Type "B10000-controller" with 4 module bays: ![Image](https://github.com/user-attachments/assets/78e6b8be-c65f-4882-9a10-a88d71565a53) Then created another Module Type "HBA Card" with 4 interfaces: ![Image](https://github.com/user-attachments/assets/4b52d648-dc3e-4e2f-af40-aef08b25751e) Also created a Device Type "B10000" with 2 module bays: ![Image](https://github.com/user-attachments/assets/5ada0555-ac95-44e6-9875-e9c9614634d4) After this I need to create a device. For this device will be used Device Type "B10000". After device creation inserted module "Controller" to module bay "controller0": ![Image](https://github.com/user-attachments/assets/52399a14-fc66-418d-adba-4490e851f8cc) And now I need insert module "HBA Card" to Bay S1 and when trying to insert it getting error message: ![Image](https://github.com/user-attachments/assets/0332b722-4f73-4cd0-a2c7-3a49c914c5f3) But if I change on Module Type "HBA Card" interface naming to manual with out token {module}: ![Image](https://github.com/user-attachments/assets/a8b559b8-aeb8-429f-aa15-d7207b4e33e5) I am able to insert this module without issues. But now it causes another issues with interface naming, can not add another module because interface names already exists. Hopes this will help reproduce issues. ### Expected Behavior Fix issue with token {module} ### Observed Behavior A TypeError exception was raised
adam added the type: bugstatus: under review labels 2025-12-29 21:40:45 +01:00
adam closed this issue 2025-12-29 21:40:45 +01:00
Author
Owner

@arthanson commented on GitHub (May 6, 2025):

@Kompromatas, Thank you for opening a bug report. Unfortunately, the information you have provided is not sufficient for someone else to attempt to reproduce the reported behavior. Remember, each bug report must include detailed steps that someone else can follow on a clean, empty NetBox installation to reproduce the exact problem you're experiencing. These instructions should include the creation of any involved objects, any configuration changes, and complete accounting of the actions being taken.

Can you please provide more clear step-by-step reproduction steps here.

@arthanson commented on GitHub (May 6, 2025): @Kompromatas, Thank you for opening a bug report. Unfortunately, the information you have provided is not sufficient for someone else to attempt to reproduce the reported behavior. Remember, each bug report must include detailed steps that someone else can follow on a clean, empty NetBox installation to reproduce the exact problem you're experiencing. These instructions should include the creation of any involved objects, any configuration changes, and complete accounting of the actions being taken. Can you please provide more clear step-by-step reproduction steps here.
Author
Owner

@Kompromatas commented on GitHub (May 7, 2025):

Sorry, if my initial description is not clear, I will try to explain it little bit more.
So I have created a Module Type "B10000-controller" with 4 module bays:

Image

Then created another Module Type "HBA Card" with 4 interfaces:

Image

Also created a Device Type "B10000" with 2 module bays:

Image

After this I need to create a device. For this device will be used Device Type "B10000". After device creation inserted module "Controller" to module bay "controller0":

Image

And now I need insert module "HBA Card" to Bay S1 and when trying to insert it getting error message:

Image

But if I change on Module Type "HBA Card" interface naming to manual with out token {module}:

Image

I am able to insert this module without issues.
But now it causes another issues with interface naming, can not add another module because interface names already exists.

Hopes this will help reproduce issues.

@Kompromatas commented on GitHub (May 7, 2025): Sorry, if my initial description is not clear, I will try to explain it little bit more. So I have created a Module Type "B10000-controller" with 4 module bays: ![Image](https://github.com/user-attachments/assets/78e6b8be-c65f-4882-9a10-a88d71565a53) Then created another Module Type "HBA Card" with 4 interfaces: ![Image](https://github.com/user-attachments/assets/4b52d648-dc3e-4e2f-af40-aef08b25751e) Also created a Device Type "B10000" with 2 module bays: ![Image](https://github.com/user-attachments/assets/5ada0555-ac95-44e6-9875-e9c9614634d4) After this I need to create a device. For this device will be used Device Type "B10000". After device creation inserted module "Controller" to module bay "controller0": ![Image](https://github.com/user-attachments/assets/52399a14-fc66-418d-adba-4490e851f8cc) And now I need insert module "HBA Card" to Bay S1 and when trying to insert it getting error message: ![Image](https://github.com/user-attachments/assets/0332b722-4f73-4cd0-a2c7-3a49c914c5f3) But if I change on Module Type "HBA Card" interface naming to manual with out token {module}: ![Image](https://github.com/user-attachments/assets/a8b559b8-aeb8-429f-aa15-d7207b4e33e5) I am able to insert this module without issues. But now it causes another issues with interface naming, can not add another module because interface names already exists. Hopes this will help reproduce issues.
Author
Owner

@loubladi commented on GitHub (May 7, 2025):

I have encountered similar problem. On Slack there was possible solution. On Module-type "HBA Card" use {module} {module} SFP1 and so on. For every "level" of hierarchy you have to use another {module} variable.

I would say that this is not best solution but it should work.

@loubladi commented on GitHub (May 7, 2025): I have encountered similar problem. On Slack there was possible solution. On Module-type "HBA Card" use `{module} {module} SFP1` and so on. For every "level" of hierarchy you have to use another `{module}` variable. I would say that this is not best solution but it should work.
Author
Owner

@loubladi commented on GitHub (May 7, 2025):

Worst part about this is that I couldn't find if it's somehow possible to reference specific Module bay.

For example when I know that I don't want to reference the "top" module position, there is not much possibilities right now.

Unfortunately I don't think this is bug (even when I, as a user, would like to have this functionality improved as soon as possible).

@loubladi commented on GitHub (May 7, 2025): Worst part about this is that I couldn't find if it's somehow possible to reference specific Module bay. For example when I know that I don't want to reference the "top" module position, there is not much possibilities right now. Unfortunately I don't think this is bug (even when I, as a user, would like to have this functionality improved as soon as possible).
Author
Owner

@Kompromatas commented on GitHub (May 7, 2025):

Thanks for work around solution, in my case this works. But if I would like to use this module type on upper levels it will not work and this means that for separate levels I will need create different module types and it will make a big mess on module types list.

@Kompromatas commented on GitHub (May 7, 2025): Thanks for work around solution, in my case this works. But if I would like to use this module type on upper levels it will not work and this means that for separate levels I will need create different module types and it will make a big mess on module types list.
Author
Owner

@loubladi commented on GitHub (May 7, 2025):

I agree this is not the best solution, but improving it would probably require a feature request with a well-thought-out proposal that addresses 90% or more of use cases.

A somewhat related discussion can be found in issue #16904, which would have a significant impact on this.

@loubladi commented on GitHub (May 7, 2025): I agree this is not the best solution, but improving it would probably require a feature request with a well-thought-out proposal that addresses 90% or more of use cases. A somewhat related discussion can be found in issue #16904, which would have a significant impact on this.
Author
Owner

@github-actions[bot] commented on GitHub (May 15, 2025):

This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically.

@github-actions[bot] commented on GitHub (May 15, 2025): This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically.
Author
Owner

@Kompromatas commented on GitHub (May 15, 2025):

This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically.

Updated

@Kompromatas commented on GitHub (May 15, 2025): > This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically. Updated
Author
Owner

@arthanson commented on GitHub (May 29, 2025):

@Kompromatas this needs more detail to take action on this, how are you intending for this to work. This is currently working as intended, so this would need to be a feature request. If you can come up with specific proposal for loosening up the constraints, please open up a feature request for this.

@arthanson commented on GitHub (May 29, 2025): @Kompromatas this needs more detail to take action on this, how are you intending for this to work. This is currently working as intended, so this would need to be a feature request. If you can come up with specific proposal for loosening up the constraints, please open up a feature request for this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11131