Handle missing repository storage
What does this MR do?
In this MR we make sure a different error is raised when a storage directory would be missing.
Currently GitLab won't start when we try to start it when one of the configured storages isn't available, Pathname#realpath
raises an error in 6_validations. I think that is behavior we want to keep.
However, when GitLab was already running, we would mask a storage disappearing with a NoRepository
-exception, which would be handled in several places. The new InvalidStorage
exception is not handled.
Why was this MR needed?
Currently when a storage directory goes missing (fe an NFS store goes offline), we would raise a Gitlab::Git::Repository::NoRepository
which would get rescued in the ProjectsController
and remove the exists
cache for the repository. Now the exists
cache is invalid when the NFS comes back online.
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #31237 (closed)