Unable to delete a repository

Hi there!

I’m recently upgraded to gitlab 14.2 and now I’m running into some strange issues.

While upgrading, I tried to migrate a single project from legacy storage to hashed storage. This failed consistently, so I just skipped the check and moved on.

Now I’m trying to delete the same project, but it always fails with a 500 server error. I investigated a bit and found the gitlab-rails/exceptions_json.log file. In it I found this:

{"severity":"ERROR","time":"2021-08-31T13:54:27.011Z","correlation_id":"01FEE7TQAQ5HDJAED1WXPQDVMD","exception.class":"Gitlab::Git::Repository::NoRepository","exception.message":"5:GetRepoPath: not a git repository: \"/var/opt/gitlab/git-data/repositories/mdctec-developers/first-project-ever.design.git\".","exception.backtrace":["lib/gitlab/git/wraps_gitaly_errors.rb:9:in `rescue in wrapped_gitaly_errors'","lib/gitlab/git/wraps_gitaly_errors.rb:6:in `wrapped_gitaly_errors'","lib/gitlab/git/repository.rb:144:in `rename'","lib/gitlab/shell.rb:92:in `mv_repository'","app/services/projects/transfer_service.rb:179:in `move_repo_folder'","app/services/projects/transfer_service.rb:175:in `rollback_folder_move'","app/services/projects/transfer_service.rb:164:in `rollback_side_effects'","app/services/projects/transfer_service.rb:103:in `rescue in proceed_to_transfer'","app/services/projects/transfer_service.rb:102:in `proceed_to_transfer'","app/services/projects/transfer_service.rb:62:in `transfer'","app/services/projects/transfer_service.rb:27:in `execute'","app/controllers/projects_controller.rb:103:in `transfer'","app/controllers/application_controller.rb:483:in `set_current_admin'","lib/gitlab/session.rb:11:in `with_session'","app/controllers/application_controller.rb:474:in `set_session_storage'","lib/gitlab/i18n.rb:99:in `with_locale'","lib/gitlab/i18n.rb:105:in `with_user_locale'","app/controllers/application_controller.rb:468:in `set_locale'","app/controllers/application_controller.rb:462:in `set_current_context'","lib/gitlab/middleware/speedscope.rb:13:in `call'","lib/gitlab/request_profiler/middleware.rb:17:in `call'","lib/gitlab/jira/middleware.rb:19:in `call'","lib/gitlab/middleware/go.rb:20:in `call'","lib/gitlab/etag_caching/middleware.rb:21:in `call'","lib/gitlab/middleware/multipart.rb:172:in `call'","lib/gitlab/middleware/read_only/controller.rb:50:in `call'","lib/gitlab/middleware/read_only.rb:18:in `call'","lib/gitlab/middleware/same_site_cookies.rb:27:in `call'","lib/gitlab/middleware/handle_malformed_strings.rb:21:in `call'","lib/gitlab/middleware/basic_health_check.rb:25:in `call'","lib/gitlab/middleware/handle_ip_spoof_attack_error.rb:25:in `call'","lib/gitlab/middleware/request_context.rb:21:in `call'","config/initializers/fix_local_cache_middleware.rb:11:in `call'","lib/gitlab/middleware/rack_multipart_tempfile_factory.rb:19:in `call'","lib/gitlab/metrics/requests_rack_middleware.rb:74:in `call'","lib/gitlab/middleware/release_env.rb:12:in `call'"],"user.username":"root","tags.program":"web","tags.locale":"en","tags.feature_category":"projects","tags.correlation_id":"01FEE7TQAQ5HDJAED1WXPQDVMD","extra.path":"mdctec-developers/first-project-ever.design","extra.new_path":"qbuechner/first-project-ever.design","extra.storage":"default"}

It seems like Gitlab is not able to find the repository. I tried to delete the stored files manually, but Gitlab then prompted me to either create a new git project or delete the repo entirely (which failed again).

I would greatly appreciate if someone could tell me how to get rid of that project.