Skip to content

Transferring projects failes after turning off registry

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

When I try to transfer older projects that used the GitLab built-in registry in the past, GitLab shows me a 500 page with an error ID. The logs coming with this message mention this: Failed to open TCP connection to gitlab-helm-registry.gitlab.svc:5000 (getaddrinfo: Name or service not known).

We removed the GitLab registry recently from our self-hosted GitLab instance, by adding these values to our Helm values (mainly found from this issue comment):

global:
  appConfig:
    defaultProjectsFeatures:
      containerRegistry: false
gitlab:
  webservice:
    registry:
      enabled: false
  sidekiq:
    registry:
      enabled: false
registry:
  enabled: false

I am able to transfer projects that never used the built-in registry. Am I missing some configuration?

Steps to reproduce

Configure the GitLab Helm chart registry part with the configs above. Try to transfer a project that used the GitLab built-in registry before the configuration change. 500 error page will be shown.

What is the current bug behavior?

I can't transfer some projects to new groups.

What is the expected correct behavior?

I should be able to transfer any project to any group I have permissions for.

Relevant logs and/or screenshots

The complete log I found when searching for the Request ID the error page gave me:

{
  "severity": "ERROR",
  "time": "2022-08-30T08:12:54.279Z",
  "correlation_id": "01GBPWYYXWNMPEM9ZR46C3ASEB",
  "exception.class": "Faraday::ConnectionFailed",
  "exception.message": "Failed to open TCP connection to gitlab-helm-registry.gitlab.svc:5000 (getaddrinfo: Name or service not known)",
  "exception.backtrace": [
    "lib/gitlab/faraday/error_callback.rb:30:in `call'",
    "lib/container_registry/client.rb:56:in `repository_tags'",
    "app/models/container_repository.rb:417:in `manifest'",
    "app/models/container_repository.rb:421:in `tags'",
    "app/models/container_repository.rb:441:in `has_tags?'",
    "app/models/project.rb:1097:in `any?'",
    "app/models/project.rb:1097:in `has_container_registry_tags?'",
    "app/services/projects/transfer_service.rb:61:in `transfer'",
    "app/services/projects/transfer_service.rb:35:in `execute'",
    "app/controllers/projects_controller.rb:128:in `transfer'",
    "ee/lib/gitlab/ip_address_state.rb:10:in `with'",
    "ee/app/controllers/ee/application_controller.rb:45:in `set_current_ip_address'",
    "app/controllers/application_controller.rb:527:in `set_current_admin'",
    "lib/gitlab/session.rb:11:in `with_session'",
    "app/controllers/application_controller.rb:518:in `set_session_storage'",
    "lib/gitlab/i18n.rb:105:in `with_locale'",
    "lib/gitlab/i18n.rb:111:in `with_user_locale'",
    "app/controllers/application_controller.rb:512:in `set_locale'",
    "app/controllers/application_controller.rb:506:in `set_current_context'",
    "lib/gitlab/metrics/elasticsearch_rack_middleware.rb:16:in `call'",
    "lib/gitlab/middleware/rails_queue_duration.rb:33:in `call'",
    "lib/gitlab/middleware/memory_report.rb:13:in `call'",
    "lib/gitlab/middleware/speedscope.rb:13:in `call'",
    "lib/gitlab/database/load_balancing/rack_middleware.rb:23:in `call'",
    "lib/gitlab/metrics/rack_middleware.rb:16:in `block in call'",
    "lib/gitlab/metrics/web_transaction.rb:46:in `run'",
    "lib/gitlab/metrics/rack_middleware.rb:16: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/query_analyzer.rb:11:in `block in call'",
    "lib/gitlab/database/query_analyzer.rb:37:in `within'",
    "lib/gitlab/middleware/query_analyzer.rb:11:in `call'",
    "lib/gitlab/middleware/multipart.rb:173: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'",
    "lib/gitlab/middleware/webhook_recursion_detection.rb:15:in `call'",
    "config/initializers/fix_local_cache_middleware.rb:11:in `call'",
    "lib/gitlab/middleware/compressed_json.rb:26:in `call'",
    "lib/gitlab/middleware/rack_multipart_tempfile_factory.rb:19:in `call'",
    "lib/gitlab/middleware/sidekiq_web_static.rb:20:in `call'",
    "lib/gitlab/metrics/requests_rack_middleware.rb:77:in `call'",
    "lib/gitlab/middleware/release_env.rb:13:in `call'"
  ],
  "user.username": "jonas.natzer",
  "tags.program": "web",
  "tags.locale": "en",
  "tags.feature_category": "projects",
  "tags.correlation_id": "01GBPWYYXWNMPEM9ZR46C3ASEB",
  "extra.class": "ContainerRegistry::BaseClient",
  "extra.url": "http://gitlab-helm-registry.gitlab.svc:5000/v2/example-group/example-project/develop/tags/list"
}

Results of GitLab environment info

We use the official GitLab Helm chart version 6.0.2

Expand for output related to GitLab environment info

$ gitlab-rake gitlab:env:info

System information
System:		
Proxy:		no
Current User:	git
Using RVM:	no
Ruby Version:	2.7.5p203
Gem Version:	3.2.19
Bundler Version:2.3.6
Rake Version:	13.0.6
Redis Version:	6.0.16
Sidekiq Version:6.4.0
Go Version:	unknown

GitLab information
Version:	15.0.2-ee
Revision:	94267b33436
Directory:	/srv/gitlab
DB Adapter:	PostgreSQL
DB Version:	13.8
URL:		https://git.example.co
HTTP Clone URL:	https://git.example.co/some-group/some-project.git
SSH Clone URL:	git@git.example.co:some-group/some-project.git
Elasticsearch:	no
Geo:		no
Using LDAP:	yes
Using Omniauth:	no

GitLab Shell
Version:	14.3.0
Repository storage paths:
- default: 	/var/opt/gitlab/repo
GitLab Shell path:		/home/git/gitlab-shell

Edited by 🤖 GitLab Bot 🤖