All database errors are now being treated as if maintenance mode is enabled #8231

Closed
opened 2025-12-29 20:34:05 +01:00 by adam · 0 comments
Owner

Originally created by @fabi125 on GitHub (Jun 22, 2023).

Originally assigned to: @abhi1693 on GitHub.

NetBox version

v3.5.2

Python version

3.11

Steps to Reproduce

  1. Have a database that is having some sort of issues.
  2. Try to update e.g. a device in netbox

Expected Behavior

Error message that contains the db error.

Observed Behavior

Popup saying "NetBox is currently operating in maintenance mode and is unable to perform write operations. Please try again later".

This was introduced as part of #11233, more specifically #12490, which treats all errors as maintenance mode: 70c2b358ad/netbox/netbox/middleware.py (L202-L214)

I think this should be guarded behind if get_config().MAINTENANCE_MODE:.

Originally created by @fabi125 on GitHub (Jun 22, 2023). Originally assigned to: @abhi1693 on GitHub. ### NetBox version v3.5.2 ### Python version 3.11 ### Steps to Reproduce 1. Have a database that is having some sort of issues. 2. Try to update e.g. a device in netbox ### Expected Behavior Error message that contains the db error. ### Observed Behavior Popup saying "NetBox is currently operating in maintenance mode and is unable to perform write operations. Please try again later". This was introduced as part of #11233, more specifically #12490, which treats all errors as maintenance mode: https://github.com/netbox-community/netbox/blob/70c2b358ad6c778344b2ee0639dab6b76f751fdc/netbox/netbox/middleware.py#L202-L214 I think this should be guarded behind `if get_config().MAINTENANCE_MODE:`.
adam added the type: bugstatus: acceptedseverity: medium labels 2025-12-29 20:34:05 +01:00
adam closed this issue 2025-12-29 20:34:05 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8231