Skip to content

Add Rake task to update project storage

Will Chandler requested to merge wc/update-storage-task into master

What does this MR do and why?

Add Rake task to update project storage

With Gitaly no longer allowing storages to share the same path, we may have administrators who need to remove a storage and associate its projects to another.

Add a Rake task to perform this action.

Related to gitlab-com/gl-infra/production#17988 (closed)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Choose a project to assign to dummy storage name removed_storage
    project = Project.find_by_full_path('<PROJECT_PATH>')
    project.update_column(:repository_storage, 'removed_storage')
  2. Run the rake task to reassign the project back to the default storage
    bundle exec rake "gitlab:gitaly:update_removed_storage_projects[removed_storage, default]"
Edited by Will Chandler

Merge request reports