Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A 0U device can be assigned to a rack unit #2192

Closed
insertjokehere opened this issue Jun 25, 2018 · 1 comment
Closed

A 0U device can be assigned to a rack unit #2192

insertjokehere opened this issue Jun 25, 2018 · 1 comment
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@insertjokehere
Copy link

insertjokehere commented Jun 25, 2018

Issue type

[ ] Feature request
[X] Bug report
[ ] Documentation

Environment

  • Python version: 3.6.5
  • NetBox version: 2.3.4

Description

When reducing the number of 'U' a rack contains, Netbox does not prevent you from leaving 0U tall devices 'outside' the new size of the rack. When you do this, you will be unable to view or edit the rack. Netbox should probably prevent you from editing the racks' height if doing so would put you into this state.

Reproduction

  • Create a 2U tall rack
  • Create a 0U tall device, add it to the rack in position 2
  • Edit the rack to make it 1U high
  • Observe that trying to view or edit the rack results in an error page:
<class 'KeyError'>

2
@insertjokehere insertjokehere changed the title KeyError after resizing rack KeyError after resizing rack, if top-most device is 0 units tall Jun 25, 2018
@jeremystretch
Copy link
Member

It seems the problem is that we don't validate device type height on unit assignment. It shouldn't be possible to assign a 0U device to a rack unit.

@jeremystretch jeremystretch added type: bug A confirmed report of unexpected behavior in the application status: accepted This issue has been accepted for implementation labels Jun 29, 2018
@jeremystretch jeremystretch changed the title KeyError after resizing rack, if top-most device is 0 units tall A 0U device can be assigned to a rack unit Jun 29, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jan 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants