Broken remove dot git migration in staging
Copied from https://gitlab.com/gitlab-org/gitlab-ce/issues/26392#note_21323412
RC1 migrations failed in staging because of:
Exception: namespace directory cannot be moved
/opt/gitlab/embedded/service/gitlab-rails/db/migrate/20161226122833_remove_dot_git_from_usernames.rb:81:in `block in move_namespace'
This happened because the path existed already:
gitlab_shell.exists?('/var/opt/gitlab/git-data/repositories', 'offending_path')
=> true
See actual offending path in https://gitlab.slack.com/files/jameslopez/F3QP09KEW/-.rb
Not sure if the path was supposed to be in routes
but route_exists?
didn't find it... So it blows up as gitlab_shell.mv_namespace(repository_storage_path, path_was, path)
is false
One solution would be to gitlab_shell.exists?('/var/opt/gitlab/git-data/repositories', 'offending_path')