gitlab

Gitaly on gitlab not seeing my folder of repository


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 understand 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":""}

And if I change back it working again without issue. I check the authorization for user git and all is correct.

Do you already encounter this bug where you cannot access your repository after this change and how you can fix it ?

Thank you for your help. Regards

I try upgrading to see if that change but no, force chown, change directory and push all in but nothing seems to work.


Solution

  • If you switch from git_data_dirs to gitaly['configuration'], keep two things exactly the same as before:

    Also set:

    gitlab_rails['gitlab_shell_repos_path'] = '/data/gitlab/git-data/repositories'

    Then run:

    gitlab-ctl reconfigure
    gitlab-ctl restart gitaly
    gitlab-rake gitlab:check
    

    In my experience "repository not found" erro after this change is caused by a mismatched storage name or an incorrect path.