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

Deadlock on get next prefix API #2350

Closed
whitej6 opened this issue Aug 31, 2022 · 0 comments · Fixed by #2356
Closed

Deadlock on get next prefix API #2350

whitej6 opened this issue Aug 31, 2022 · 0 comments · Fixed by #2356
Labels
type: bug Something isn't working as expected

Comments

@whitej6
Copy link
Contributor

whitej6 commented Aug 31, 2022

Environment

  • Nautobot version (Docker tag too if applicable):
  • Python version: 3.8
  • Database platform, version: 1.3.8 & 1.4.1
  • Middleware(s):

Steps to Reproduce

  1. Perform API call for get next prefix
  2. abruptly stop Nautobot service before call can complete
  3. Restart server

Expected Behavior

Lock ages out

Observed Behavior

Places Nautobot in a deadlock state for get-next-prefix

Proposed Fix

https://github.com/nautobot/nautobot/blob/v1.4.1/nautobot/ipam/api/views.py#L143
Set a configurable timeout that defaults to 300 seconds. A user should never be able to hit 5 minutes in an API call which would safely add the safe measure. And after 5 minutes if the lock is not gracefully released it will be aged out.

whitej6 added a commit to whitej6/nautobot that referenced this issue Sep 1, 2022
glennmatthews added a commit that referenced this issue Sep 2, 2022
* Resolved #2350 - Add ability to age out a redis lock

* Update nautobot/docs/configuration/optional-settings.md

Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>

* addressing feedback

* updates from feedback

* resolving black

Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
@bryanculver bryanculver added the type: bug Something isn't working as expected label Sep 5, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working as expected
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants