Rack SVG rending oddity when 0U device assigned to an RU #3639

Closed
opened 2025-12-29 18:30:18 +01:00 by adam · 6 comments
Owner

Originally created by @2bithacker on GitHub (May 5, 2020).

Originally assigned to: @jeremystretch on GitHub.

Environment

  • Python version: 3.6
  • NetBox version: 2.7.12

Steps to Reproduce

  1. Have a DeviceType with a 0U size
  2. Assign a device of that type to a rack unit
  3. View the Rack

Expected Behavior

Not really sure what the correct representation of a 0U device in an RU should be, but at least it shouldn't alter the rendering of other devices in the rack.

Observed Behavior

The 0U device is rendered oddly, with it's name halfway through a U boundary. 1U devices get duplicated in incorrect RUs. Larger devices get 1U dups.

Originally created by @2bithacker on GitHub (May 5, 2020). Originally assigned to: @jeremystretch on GitHub. <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for reproducible bugs. If you need assistance with NetBox installation, or if you have a general question, DO NOT open an issue. Instead, post to our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report, and that any plugins have been disabled. --> ### Environment * Python version: 3.6 * NetBox version: 2.7.12 <!-- Describe in detail the exact steps that someone else can take to reproduce this bug using the current stable release of NetBox. Begin with the creation of any necessary database objects and call out every operation being performed explicitly. If reporting a bug in the REST API, be sure to reconstruct the raw HTTP request(s) being made: Don't rely on a client library such as pynetbox. --> ### Steps to Reproduce 1. Have a DeviceType with a 0U size 2. Assign a device of that type to a rack unit 3. View the Rack <!-- What did you expect to happen? --> ### Expected Behavior Not really sure what the correct representation of a 0U device in an RU should be, but at least it shouldn't alter the rendering of other devices in the rack. <!-- What happened instead? --> ### Observed Behavior The 0U device is rendered oddly, with it's name halfway through a U boundary. 1U devices get duplicated in incorrect RUs. Larger devices get 1U dups.
adam added the type: bugstatus: accepted labels 2025-12-29 18:30:18 +01:00
adam closed this issue 2025-12-29 18:30:18 +01:00
Author
Owner

@jeremystretch commented on GitHub (May 5, 2020):

I'm not able to reproduce this with the steps outlined above. It seems you need to:

  1. Create a 1U device type
  2. Install a device of that type in a rack
  3. Modify the device type to be 0U
  4. Render the rack SVG
@jeremystretch commented on GitHub (May 5, 2020): I'm not able to reproduce this with the steps outlined above. It seems you need to: 1. Create a 1U device type 2. Install a device of that type in a rack 3. Modify the device type to be 0U 4. Render the rack SVG
Author
Owner

@fsedano commented on GitHub (May 6, 2020):

Hello folks @jeremystretch - If the fix is to NOT allow a 0U size on a rack, that will break me.

My use case: I have 10s of Access Points in a particular shelf on a rack. They're really piled up, so they're in a rack but they're 0U.
Any suggestion here?

@fsedano commented on GitHub (May 6, 2020): Hello folks @jeremystretch - If the fix is to NOT allow a 0U size on a rack, that will break me. My use case: I have 10s of Access Points in a particular shelf on a rack. They're really piled up, so they're in a rack but they're 0U. Any suggestion here?
Author
Owner

@jeremystretch commented on GitHub (May 6, 2020):

@fsedano 0U devices may be assigned to a rack, just not to a specific position. This has always been the case; this fix merely addresses a condition in which the validation could be bypassed by modifying a device type that was previously 1U+.

@jeremystretch commented on GitHub (May 6, 2020): @fsedano 0U devices may be assigned to a rack, just not to a specific position. This has always been the case; this fix merely addresses a condition in which the validation could be bypassed by modifying a device type that was previously 1U+.
Author
Owner

@fsedano commented on GitHub (May 6, 2020):

Thanks Jeremy - If it's not in a specific position, what do you suggest to use for this use case (i.e. a lot of small devices in a shelf in a position in the rack). I.e. raspberry PIs, access points, etc. We have multiple shelves per Rack, each of them at a given position, so we have like 30 RPis on each shelf.

@fsedano commented on GitHub (May 6, 2020): Thanks Jeremy - If it's not in a specific position, what do you suggest to use for this use case (i.e. a lot of small devices in a shelf in a position in the rack). I.e. raspberry PIs, access points, etc. We have multiple shelves per Rack, each of them at a given position, so we have like 30 RPis on each shelf.
Author
Owner

@2bithacker commented on GitHub (May 6, 2020):

You could have a Device Type for a generic rack shelf with a number of device bays for the things on the shelf.

@2bithacker commented on GitHub (May 6, 2020): You could have a Device Type for a generic rack shelf with a number of device bays for the things on the shelf.
Author
Owner

@fsedano commented on GitHub (May 6, 2020):

You could have a Device Type for a generic rack shelf with a number of device bays for the things on the shelf.

Thanks for the hint!

@fsedano commented on GitHub (May 6, 2020): > You could have a Device Type for a generic rack shelf with a number of device bays for the things on the shelf. Thanks for the hint!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3639