Removing 404 project from gitlab-ce

We are using gitlab ce as SCM frontend plus as simple CI solution. Recently we’ve been hit by following problem: after renaming old project that was occupying namespace we’ve created a new one  with exactly the same name. Creation of new project first failed, but after hitting refresh button in a browser it got created successfully. Unfortunately every attempt to view the project from the dashboard failed with 404 error.

gitlab404

This is a race condition issue, that can be also triggered a bit differently:

  1. Created project
  2. Delete it
  3. Create a new project with exactly the same name

Both rename and delete actions are reflected in the same way in gitlab internal cache. When project is being renamed or deleted by user, internal cache is not invalidated quickly enough. If between step 2 and 3 is considerable amount of time, this issues will not happen. Obviously when it happens there must be a way to fix it and there is a very simple solution (not found in gitlab docs) as long as your are running gitlab ce or ee. Simply issue following commands from your shell:

sudo gitlab-rake cache:clear

Look at issue #3586 to see complete discussion and hopefully a resolution soon as well.

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s