Skip to content

Group/project path updates break the Container Registry

Summary

When a project under a team namespace has images in its registry, moving the team namespace is possible but moving it back under the initial namespace generates an error.

Deleting all container images and tags in the Gitlab projects container registry does not help.

This is a problem for reusing names and namespaces. If the namespace ever held images, it cannot be reused (e.g. by renaming an existing namespace to that namespace).

Steps to reproduce

  1. Create a team team1
  2. Create a project under team1 called fakeproject
  3. Push an image to team1/project. This succeeds.
  4. Move (not rename, move) the team1 team to team2. This succeeds. The image is still there and has been moved to team2/project/image
  5. Attempt to move team2 back to team1. This does not succeed.
  6. Delete the team2/project/image image in the Gitlab container registry page. This seems to succeed, the image does not appear on the page anymore.
  7. Attempt to move team2 back to team1 again. This still does not succeed, same error message.

The error message:

“Namespace team1 (1268) cannot be moved because at least one project (e.g. project (2522)) has tags in container registry"

Example Project

(If possible, please create an example project here on GitLab.com that exhibits the problematic behaviour, and link to it here in the bug report)

(If you are using an older version of GitLab, this will also determine whether the bug has been fixed in a more recent version)

What is the current bug behavior?

The error message:

“Namespace team1 (1268) cannot be moved because at least one project (e.g. project (2522)) has tags in container registry"

What is the expected correct behavior?

Assuming that the namespaces are free, moving team1 to team2 and later team2 to team1 should succeed.

Relevant logs and/or screenshots

Screen_Shot_2019-02-15_at_11.48.54

This happens on Github Community Edition v11.7.4.

Possible workaround

  1. unsigned images: #18383 (comment 215002790)
  2. user provided bash script: #18383 (comment 333696073)
  3. 3rd-party tool: https://github.com/containers/skopeo/blob/main/docs/skopeo-sync.1.md to download images to the local machine, after retrieving the tag list for each container repository (and each project) using the GitLab API in a custom script:

This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.

Edited by Katrin Leinweber