Internal workings of GitLab Maintenance Mode
Where is Maintenance Mode enforced?
GitLab Maintenance Mode only blocks writes from HTTP and SSH requests at the application level in a few key places within the rails application.
Search the codebase for maintenance_mode?
.
- the read-only database method, which toggles special behavior when we are not allowed to write to the database. We use this method for possible places where writes could occur in GET requests. Search the codebase for
Gitlab::Database.read_only?
. - the read-only middleware, where HTTP requests that cause database writes are blocked, unless explicitly allowed (for example, GET requests).
- Git push access via SSH is denied by returning 401 when
gitlab-shell
POSTs to/internal/allowed
to check if access is allowed. - Container registry authentication service, where updates to the container registry are blocked.
The database itself is not in read-only mode (except in a Geo secondary site) and can be written by sources other than the ones blocked.
Docs
Edit this page to fix an error or add an improvement in a merge request.
Create an issue to suggest an improvement to this page.
Product
Create an issue if there's something you don't like about this feature.
Propose functionality by submitting a feature request.
Feature availability and product trials
View pricing to see all GitLab tiers and features, or to upgrade.
Try GitLab for free with access to all features for 30 days.
Get help
If you didn't find what you were looking for, search the docs.
If you want help with something specific and could use community support, post on the GitLab forum.
For problems setting up or using this feature (depending on your GitLab subscription).
Request support