Gitaly not seeing my folder of repository

Problem to solve

I wanted to upgrade my Gitlab to the latest one following the Gitlab process :

I have in my configuration

git_data_dirs({
  "default" => {
    "path" => "/data/gitlab/git-data"
   }
})

So I understant that in the later on it will be remove so I modify to have :

gitaly['configuration'] = {
        pack_objects_cache: {
                # gitaly['pack_objects_cache_enabled']
                #enabled: ...,
                # gitaly['pack_objects_cache_dir']
                dir: '/data/gitlab/git-data/repositories/+gitaly/PackObjectsCache',
                # gitaly['pack_objects_cache_max_age']
                #max_age: ...,
        },
        storage: [
          {
               name: 'default',
               path: '/data/gitlab/git-data',
          },
      ],

}

I just added the storage because the other was already here.

But when I reconfigure I lost all my repository asking to create a new one with some error in the log but when I follow the relative_path the file is here :

{"component":"gitaly.UnaryServerInterceptor","correlation_id":"01K201FP807G32AW2YE3CEB","error":"repository not found","error_metadata":{"relative_path":"@hashed/1a/65/1a6562590ef19d1045d06288e9e6dcd71ccde5cee80f1d5a774eb.git","storage_name":"default"},"grpc.code":"NotFound","grpc.meta.auth_version":"v2","grpc.meta.client_name":"gitlab-web","grpc.meta.deadline_type":"regular","grpc.meta.method_operation":"accessor","grpc.meta.method_scope":"repository","grpc.meta.method_type":"unary","grpc.method":"FindDefaultBranchName","grpc.request.deadline":"2025-08-06T17:55:13.149","grpc.request.fullMethod":"/gitaly.RefService/FindDefaultBranchName","grpc.request.glProjectPath":"","grpc.request.glRepository":"project-50","grpc.request.payload_bytes":129,"grpc.request.repoPath":"@hashed/1a/65/1a6562590ef19d1045d06c4055742d38288e1ccde5cee80f1d5a774eb.git","grpc.request.repoStorage":"default","grpc.response.payload_bytes":0,"grpc.service":"gitaly.RefService","grpc.start_time":"2025-08-06T17:55:03.469","grpc.time_ms":0.174,"level":"info","msg":"finished unary call with code NotFound","pid":5947,"remote_ip":"172.31.190.70","span.kind":"server","system":"grpc","time":"2025-08-06T15:55:03.469Z","user_id":"2","username":""}

Versions

  • [ x] Self-managed

Versions

  • GitLab 16.11.1 (I know I am late that why I try to upgrade)

Thank you for your time

So I respond after finding the answer else where :

git_data_dirs and gitaly[configuration] don’t follow the same same path so for

git_data_dirs({
  "default" => {
    "path" => "/data/gitlab/git-data"
   }
})

But for Gitaly it should be like this

gitaly['configuration'] = {
        pack_objects_cache: {
                # gitaly['pack_objects_cache_enabled']
                #enabled: ...,
                # gitaly['pack_objects_cache_dir']
                dir: '/data/gitlab/git-data/repositories/+gitaly/PackObjectsCache',
                # gitaly['pack_objects_cache_max_age']
                #max_age: ...,
        },
        storage: [
          {
               name: 'default',
               path: '/data/gitlab/git-data/repositories',
          },
      ],

}

I should have add “/repositories” so it access the correct directory

2 Likes