Upgrade fails caused by three orphaned legacy projects

Hi GitLab community,

I currently encounter the problem that the upgrade to GitLab 14.x fails. I’m using the GitLab Omnibus/Docker Installation on a virtual server. I noticed the failure because after upgrading to the 14.x version the docker container went into an infinite restart loop.

The startup output of gitlab-ctl reconfigure states that legacy storage is not possible any more and I must upgrade to hashed storage. Unfortunately using gitlab-rake gitlab:storage:migrate_to_hashed does not solve the problem.

Investigating the problem I found three (obviously orphaned) legacy projects.

root@gitlab:/# gitlab-rake gitlab:storage:legacy_projects
* Found 3 projects using Legacy Storage
root@gitlab:/# gitlab-rake gitlab:storage:hashed_projects
* Found 160 projects using Hashed Storage

These three projects are not visible within the web interface (show archived projects in admin aread is checked) and therefore I’m not able to delete them (they are not neede any more).

Any ideas?

Best regards,
Marco

I was able to solve the problem using the gitlab-rails console to delete the projects:

root@gitlab:/# gitlab-rails console
[...]
irb(main):005:0> p = Project.find_by_id(132)
=> #<Project id:132 marco/arch-qt-docker>>
irb(main):006:0> p.delete
=> #<Project id:132 marco/arch-qt-docker>>
irb(main):007:0> p = Project.find_by_id(133)
=> #<Project id:133 christianb/docker_multi_html>>
irb(main):008:0> p.delete
=> #<Project id:133 christianb/docker_multi_html>>
irb(main):009:0> p = Project.find_by_id(134)
=> #<Project id:134 christianb/sites-for-multi-httpd-frontend>>
irb(main):010:0> p.delete
=> #<Project id:134 christianb/sites-for-multi-httpd-frontend>>

root@gitlab:/# gitlab-rake gitlab:storage:legacy_projects
* Found 0 projects using Legacy Storage

In case someone else has similar issues.

Regards
Marco

2 Likes