Rack half-units appear to be counted towards unit count when adding or editing a device #7727

Closed
opened 2025-12-29 20:27:32 +01:00 by adam · 7 comments
Owner

Originally created by @wxnarwhal on GitHub (Mar 7, 2023).

NetBox version

v3.4.5

Python version

3.10

Steps to Reproduce

  1. Create new rack - rack shows available rack units.
  2. Add new device from global menu (NOT by clicking on the rack diagram)
  3. Available rack positions are half the real number, with half positions displayed.

Expected Behavior

Correct number of RU down to 1 should exist.

Observed Behavior

Example: Add 42U Rack. Add device. Select Rack Unit while adding device and options go from 42U, 41.5U, 41U ..... down to 21U. Nothing below 21U exists.

Originally created by @wxnarwhal on GitHub (Mar 7, 2023). ### NetBox version v3.4.5 ### Python version 3.10 ### Steps to Reproduce 1. Create new rack - rack shows available rack units. 2. Add new device from global menu (NOT by clicking on the rack diagram) 3. Available rack positions are half the real number, with half positions displayed. ### Expected Behavior Correct number of RU down to 1 should exist. ### Observed Behavior Example: Add 42U Rack. Add device. Select Rack Unit while adding device and options go from 42U, 41.5U, 41U ..... down to 21U. Nothing below 21U exists.
adam added the type: bugstatus: revisions needed labels 2025-12-29 20:27:32 +01:00
adam closed this issue 2025-12-29 20:27:32 +01:00
Author
Owner

@kkthxbye-code commented on GitHub (Mar 7, 2023):

Please revise your steps as I cannot replicate this on v3.4.5.

@kkthxbye-code commented on GitHub (Mar 7, 2023): Please revise your steps as I cannot replicate this on v3.4.5.
Author
Owner

@wxnarwhal commented on GitHub (Mar 7, 2023):

Thanks for your help. I have some additional info.

First, it's happening to my old racks too, so it's not just the new racks I added.

I verified it happens in Chrome and Firefox, so it's not just a display issue.

I appear to have the count wrong in my first report. Here are some examples I looked at:

  • 45U rack cuts off at U21
  • 44U rack cuts off at U20
  • 42U rack cuts off at U18

So it appears to be limited to 25 units, or 50 half-units, no matter what the total count is.

This only affects me being able to add a new device if I don't select "add device" from the rack position, or if I try to move an existing device. I would have to delete it to add it to the correct position.

If I do select "add device", then that position will appear at the top of the list, and the other 50 half positions below. I've attached a screenshot where I did that with U6.
Screenshot_20230307_103832

@wxnarwhal commented on GitHub (Mar 7, 2023): Thanks for your help. I have some additional info. First, it's happening to my old racks too, so it's not just the new racks I added. I verified it happens in Chrome and Firefox, so it's not just a display issue. I appear to have the count wrong in my first report. Here are some examples I looked at: - 45U rack cuts off at U21 - 44U rack cuts off at U20 - 42U rack cuts off at U18 So it appears to be limited to 25 units, or 50 half-units, no matter what the total count is. This only affects me being able to add a new device if I don't select "add device" from the rack position, or if I try to move an existing device. I would have to delete it to add it to the correct position. If I do select "add device", then that position will appear at the top of the list, and the other 50 half positions below. I've attached a screenshot where I did that with U6. ![Screenshot_20230307_103832](https://user-images.githubusercontent.com/10369715/223521816-578dfd5e-69fb-4afd-9bd3-5dcc8034be23.png)
Author
Owner

@kkthxbye-code commented on GitHub (Mar 7, 2023):

Your browser is not loading the next page as the drop-down gets 50 at a time and loads the next page when scrolled to the bottom.

Test on the demo site, if it works there the issue is your netbox instance, if it doesn't work it's your browser/PC.

If the issue is with your instance you might have upgraded incorrectly and not run collectstatic (which is normally ran with the upgrade script).

@kkthxbye-code commented on GitHub (Mar 7, 2023): Your browser is not loading the next page as the drop-down gets 50 at a time and loads the next page when scrolled to the bottom. Test on the demo site, if it works there the issue is your netbox instance, if it doesn't work it's your browser/PC. If the issue is with your instance you might have upgraded incorrectly and not run collectstatic (which is normally ran with the upgrade script).
Author
Owner

@wxnarwhal commented on GitHub (Mar 7, 2023):

Thanks for your help. It works fine on the demo site.

I ran upgrade.sh again. I still have the same problem. Among the output I see:

`Collecting static files (python3 netbox/manage.py collectstatic --no-input)...

497 static files copied to '/opt/netbox-3.4.5/netbox/static', 34 unmodified.
Removing stale content types (python3 netbox/manage.py remove_stale_contenttypes --no-input)...`

It seems to execute with no errors. Anything else I can try?

@wxnarwhal commented on GitHub (Mar 7, 2023): Thanks for your help. It works fine on the demo site. I ran upgrade.sh again. I still have the same problem. Among the output I see: `Collecting static files (python3 netbox/manage.py collectstatic --no-input)... 497 static files copied to '/opt/netbox-3.4.5/netbox/static', 34 unmodified. Removing stale content types (python3 netbox/manage.py remove_stale_contenttypes --no-input)...` It seems to execute with no errors. Anything else I can try?
Author
Owner

@kkthxbye-code commented on GitHub (Mar 7, 2023):

You can check the console and the network tab in the chrome developer tools for any errors or failed requests.

@kkthxbye-code commented on GitHub (Mar 7, 2023): You can check the console and the network tab in the chrome developer tools for any errors or failed requests.
Author
Owner

@wxnarwhal commented on GitHub (Mar 7, 2023):

Thanks for the tip. I really appreciate it when people take time to help. I think the issue is that I have my server to only allow https, and even though I have redirects in nginx to capture all http requests, it appears NetBox is trying to force some files to only load http. I didn't change anything on my server, I only did the NetBox upgrade, so I am wondering if it's a change in NetBox. I will see if I can fix it server-side though.

@wxnarwhal commented on GitHub (Mar 7, 2023): Thanks for the tip. I really appreciate it when people take time to help. I think the issue is that I have my server to only allow https, and even though I have redirects in nginx to capture all http requests, it appears NetBox is trying to force some files to only load http. I didn't change anything on my server, I only did the NetBox upgrade, so I am wondering if it's a change in NetBox. I will see if I can fix it server-side though.
Author
Owner

@kkthxbye-code commented on GitHub (Mar 7, 2023):

so I am wondering if it's a change in NetBox.

NetBox has a very large userbase, so in all likelyhood we would have had way more reports if that was the case. The issue is very likely with your nginx configuration or something else specific to how you run your instance.

I'll convert this to a discussion as I don't believe there is anything to fix here. If it turns out I'm wrong, we'll just convert it back :)

@kkthxbye-code commented on GitHub (Mar 7, 2023): > so I am wondering if it's a change in NetBox. NetBox has a very large userbase, so in all likelyhood we would have had way more reports if that was the case. The issue is very likely with your nginx configuration or something else specific to how you run your instance. I'll convert this to a discussion as I don't believe there is anything to fix here. If it turns out I'm wrong, we'll just convert it back :)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7727