-
Notifications
You must be signed in to change notification settings - Fork 264
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
Allow login in maintenance mode #506
Labels
type: bug
Something isn't working as expected
Comments
This is an unfortunate side effect of database-backed sessions and for this and many other reasons we have discussed just moving to Redis-backed sessions as the default, which would be even simpler than having to change the sessions to file-based (which would not work w/ multi-front-end deployment). Thanks for this suggestion! |
glennmatthews
added a commit
that referenced
this issue
Aug 3, 2021
hellerve
added a commit
to hellerve/nautobot
that referenced
this issue
Aug 5, 2021
* develop: (110 commits) Add release-note for nautobot#506 Adding docs and checks for MAINTENANCE_MODE (nautobot#743) Add release-note for nautobot#744 Add Celery DjangoFixup explicitly. Fixes nautobot#744 (nautobot#763) Added release-notes for nautobot#759 Correct Power Feed and Power Panel Navigation (nautobot#760) Added release-notes for nautobot#738 .Fix issue nautobot#738 protect *.env files (nautobot#741) Added release-notes for nautobot#681 Adding AWS S3 Example (nautobot#681) Nautobot Application Stack (nautobot#713) Add release-note for nautobot#727 Bump version to 1.1.1-beta.1 Fix GraphQLQuery run API endpoint. Fixes nautobot#727 (nautobot#730) Implement `FileProxy` and `FileAttachment` objects (nautobot#712) Update computed field GraphQL schema generator to use correct arg name (nautobot#721) Added changelog for nautobot#372 Add support for custom fields in tables (nautobot#469) Bump version for v1.1.0 and prep release notes. Added changelog for nautobot#717 ...
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Environment
Note: I'm in middle of migration from Netbox v2.9.9 so I cannot test this on Nautobot yet, but I have not found any change that would fix this already, so I believe this bug is in Nautobot too. If it's already fixed, please disregard.
Steps to Reproduce
Expected Behavior
Being able to login as MAINTENANCE_MODE=True should allow for login without updating DB (https://nautobot.readthedocs.io/en/latest/configuration/optional-settings/#maintenance_mode)
Observed Behavior
Unable to login, app tries UPDATE on read-only DB. Following traceback appears in logs:
Click to expand traceback
Note: If I set
AUTH_LDAP_ALWAYS_UPDATE_USER = False
, I get this:Click to expand traceback
Workaround
I found a way to be able to log in without updating the DB (e.g. the DB stayed read-only with the expired user). I used
django-no-last-login
, so the following steps were made during the deployment of app to maintenance mode (source: https://stackoverflow.com/a/49172299):django-no-last-login==0.1.0
torequirements.txt
settings.py
afterINSTALLED_APPS
:So having this applied if
settings.MAINTENANCE_MODE == True
should allow for logins against read-only DB.@itdependsnetworks has more information regarding my environment
The text was updated successfully, but these errors were encountered: