Currently in my installation i have got multiple storages with gitaly[1-n] names that have similar configurations and they are located on VMs named same way. But suddenly I need forced to create gitaly named default cause it's currently required.
Actually I don't understand why default storage is required.
Intended users
Selfhosted gitlab admins
Further details
Proposal
Permissions and Security
Documentation
Testing
What does success look like, and how can we measure that?
There's an application setting requirement for 'default' currently, which currently does not allow us to remove the requirement set in the 1_settings initializer. Meaning that the application settings should enable all storages by default after which the "default" requirement can be dropped.
Storages can be enabled and disabled in the admin panel, if you look at db/schema.rb: https://gitlab.com/gitlab-org/gitlab/blob/a2101989de9a049cbeadf6aa8594f2afe5c97d26/db/schema.rb#L202 there's a dependency on "default" as a string. So I think what we should do is have that default value removed, and make sure that any storage that's available and not excluded from getting new projects is available for new repositories to be stored.
So if I right understood first of all we should automatically adds new storages to application_settings field that controls which storages are accepting new repos.
But suddenly right now I got stuck on finding code that adding new storages to storages table in DB.
Also identified by Grant in the GitLab QA team - I've closed that ticket as a duplicate of this one.
With the introduction of Gitaly Cluster this requirement's inflexibility has become more pronounced. As it stands today every GitLab environment must always have a repository storage path named 'default' else it will fail when trying to configure the rails nodes.
Copying over a ticket reference as well. GitLab team members can find out more in Zendesk and SF.
With !68096 (merged) merged gitlab should be able to boot now without default but there are still two column defaults that select default:
As already mentioned, application_settings.repository_storages by default sets default to 100. This isn't necessarily a big issue since it's easy to reconfigure the storages as long as no projects are being created in the meantime except that database seeds do create a project. So it is an issue when setting up gitlab for the first time. Based on that I think we should continue to suggest using default for new installations.
projects.repository_storage defaults to default. This column should be deprecated as it already has a replacement in project_repositories, but this refactor was never completed. I had a go at removing the default from this column, but it breaks too many specs to fix by hand. The alternative is to actually mark the column as ignored and eventually delete it. This requires updating any queries that still use this column, again a lot of work, but it should be possible to pick these off one-by-one.