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

Index out of range bug for PATCH requests to cables API #11901

Closed
jozefws opened this issue Mar 3, 2023 · 5 comments · Fixed by #13337
Closed

Index out of range bug for PATCH requests to cables API #11901

jozefws opened this issue Mar 3, 2023 · 5 comments · Fixed by #13337
Assignees
Labels
severity: medium Results in substantial degraded or broken functionality for specfic workflows status: accepted This issue has been accepted for implementation topic: cabling type: bug A confirmed report of unexpected behavior in the application

Comments

@jozefws
Copy link

jozefws commented Mar 3, 2023

NetBox version

v3.4.5

Python version

3.8

Steps to Reproduce

Hi Everyone,

Found an issue sending PATCH/PUT API requests to /cables/{id}/

Any request body that requests a change in the cable termination throws an index out of range error.

Steps to reproduce:

  • create three identical devices with identical (manufacturer/type etc) configuration and racked
  • Create two 1GE interfaces, one for each device
  • create a cable connection between between two of the devices
  • request an API PATCH HTTP request to change the b termination of the cable to the third device.
  • this then throws a HTTP500 error with the below html content.

Below shows the full HTTP request:

curl --location --request PATCH 'https://DOMAIN/api/dcim/cables/425/' \
--header 'Authorization: Token MYTOKEN' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data-raw '{
     "b_terminations": [
        {
          "object_type": "dcim.interface",
          "object_id": 15
        }
    ]
}'

See attached file for the backtrace, with some stuff removed for security:
Internal Server Error netboxapidcim.txt

Not sure much else I can provide - let me know :)

TIA

Expected Behavior

HTTP response 200 with an updates connection with termination changes.

Observed Behavior

HTTP response 500 with an index out of range error with no changes to the cable.

Further, shows the following HTML file:

error.txt

@jozefws jozefws added the type: bug A confirmed report of unexpected behavior in the application label Mar 3, 2023
@jeremystretch
Copy link
Member

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. Also be sure that your report does not reference data on the public NetBox demo, as that is subject to change at any time by an outside party and cannot be relied upon for bug reports.

@jeremystretch jeremystretch added the status: revisions needed This issue requires additional information to be actionable label Mar 3, 2023
@jozefws
Copy link
Author

jozefws commented Mar 5, 2023

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. Also be sure that your report does not reference data on the public NetBox demo, as that is subject to change at any time by an outside party and cannot be relied upon for bug reports.

Hiya - updated with more information. Let me know if that's sufficient.

@jeremystretch jeremystretch removed the status: revisions needed This issue requires additional information to be actionable label Mar 7, 2023
@jeremystretch jeremystretch added the status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation label Mar 16, 2023
@arthanson arthanson self-assigned this Mar 20, 2023
@arthanson arthanson removed their assignment Mar 22, 2023
@jeremystretch jeremystretch added the severity: medium Results in substantial degraded or broken functionality for specfic workflows label Jun 23, 2023
@BrGitHub11
Copy link

I'm running into the same issue.
Is there an estimated time when this will be fixed?
Thanks!

@arthanson arthanson self-assigned this Sep 5, 2023
@arthanson arthanson removed the status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation label Sep 5, 2023
@arthanson
Copy link
Collaborator

#13337 looks like it fixes this as well.

@DanSheps DanSheps added the status: accepted This issue has been accepted for implementation label Sep 7, 2023
@jeremystretch
Copy link
Member

Confirmed fixed by #13337

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
severity: medium Results in substantial degraded or broken functionality for specfic workflows status: accepted This issue has been accepted for implementation topic: cabling type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants