sameersbn / sameersbn/docker-gitlab

I backup gitlab have a error: "rake gitlab:backup:create"

Open
#2,233 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
8.1k
Forks
2.1k
Avg merge
17h 47m
Merged PRs (30d)
7

Description

I run the command "docker exec --user git -ti ab36944a202d bundle exec rake gitlab:backup:create"

Get the error

rake aborted!
Gitlab::Git::CommandError: 13:HasLocalBranches: cmd wait: exit status 128. debug_error_string:{"created":"@1600854712.405284020","description":"Error received from peer unix:/home/git/gitlab/tmp/sockets/private/gitaly.socket","file":"src/core/lib/surface/call.cc","file_line":1055,"grpc_message":"HasLocalBranches: cmd wait: exit status 128","grpc_status":13}
/home/git/gitlab/lib/gitlab/git/wraps_gitaly_errors.rb:13:in `rescue in wrapped_gitaly_errors'
/home/git/gitlab/lib/gitlab/git/wraps_gitaly_errors.rb:6:in `wrapped_gitaly_errors'
/home/git/gitlab/lib/gitlab/git/repository.rb:1047:in `uncached_has_local_branches?'
/home/git/gitlab/lib/gitlab/git/repository.rb:167:in `block in has_local_branches?'
/home/git/gitlab/lib/gitlab/utils/strong_memoize.rb:30:in `strong_memoize'
/home/git/gitlab/lib/gitlab/git/repository.rb:166:in `has_local_branches?'
/home/git/gitlab/app/models/repository.rb:582:in `has_visible_content?'
/home/git/gitlab/lib/gitlab/repository_cache_adapter.rb:92:in `block (2 levels) in cache_method_asymmetrically'
/home/git/gitlab/lib/gitlab/repository_cache.rb:44:in `fetch_without_caching_false'
/home/git/gitlab/lib/gitlab/repository_cache_adapter.rb:187:in `block (2 levels) in cache_method_output_asymmetrically'
/home/git/gitlab/lib/gitlab/null_request_store.rb:34:in `fetch'
/home/git/gitlab/lib/gitlab/safe_request_store.rb:12:in `fetch'
/home/git/gitlab/lib/gitlab/repository_cache.rb:25:in `fetch'
/home/git/gitlab/lib/gitlab/repository_cache_adapter.rb:186:in `block in cache_method_output_asymmetrically'
/home/git/gitlab/lib/gitlab/utils/strong_memoize.rb:30:in `strong_memoize'
/home/git/gitlab/lib/gitlab/repository_cache_adapter.rb:200:in `block in memoize_method_output'
/home/git/gitlab/lib/gitlab/repository_cache_adapter.rb:209:in `no_repository_fallback'
/home/git/gitlab/lib/gitlab/repository_cache_adapter.rb:199:in `memoize_method_output'
/home/git/gitlab/lib/gitlab/repository_cache_adapter.rb:185:in `cache_method_output_asymmetrically'
/home/git/gitlab/lib/gitlab/repository_cache_adapter.rb:91:in `block in cache_method_asymmetrically'
/home/git/gitlab/app/models/repository.rb:556:in `empty?'
/home/git/gitlab/app/models/repository.rb:382:in `expire_emptiness_caches'
/home/git/gitlab/lib/backup/repository.rb:225:in `empty_repo?'
/home/git/gitlab/lib/backup/repository.rb:202:in `dump_project'
/home/git/gitlab/lib/backup/repository.rb:152:in `block in dump_consecutive'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/relation/batches.rb:70:in `block (2 levels) in find_each'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/relation/batches.rb:70:in `each'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/relation/batches.rb:70:in `block in find_each'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/relation/batches.rb:136:in `block in find_in_batches'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/relation/batches.rb:238:in `block in in_batches'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/relation/batches.rb:222:in `loop'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/relation/batches.rb:222:in `in_batches'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/relation/batches.rb:135:in `find_in_batches'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/relation/batches.rb:69:in `find_each'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/querying.rb:21:in `find_each'
/home/git/gitlab/lib/backup/repository.rb:151:in `dump_consecutive'
/home/git/gitlab/lib/backup/repository.rb:17:in `dump'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:105:in `block (4 levels) in <top (required)>'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:11:in `block (3 levels) in <top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'

Caused by:
GRPC::Internal: 13:HasLocalBranches: cmd wait: exit status 128. debug_error_string:{"created":"@1600854712.405284020","description":"Error received from peer unix:/home/git/gitlab/tmp/sockets/private/gitaly.socket","file":"src/core/lib/surface/call.cc","file_line":1055,"grpc_message":"HasLocalBranches: cmd wait: exit status 128","grpc_status":13}
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grpc-1.30.2-x86_64-linux/src/ruby/lib/grpc/generic/active_call.rb:29:in `check_status'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grpc-1.30.2-x86_64-linux/src/ruby/lib/grpc/generic/active_call.rb:180:in `attach_status_results_and_complete_call'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grpc-1.30.2-x86_64-linux/src/ruby/lib/grpc/generic/active_call.rb:376:in `request_response'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grpc-1.30.2-x86_64-linux/src/ruby/lib/grpc/generic/client_stub.rb:178:in `block in request_response'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grpc-1.30.2-x86_64-linux/src/ruby/lib/grpc/generic/interceptors.rb:170:in `intercept!'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grpc-1.30.2-x86_64-linux/src/ruby/lib/grpc/generic/client_stub.rb:177:in `request_response'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/grpc-1.30.2-x86_64-linux/src/ruby/lib/grpc/generic/service.rb:171:in `block (3 levels) in rpc_stub_class'
/home/git/gitlab/lib/gitlab/gitaly_client.rb:177:in `execute'
/home/git/gitlab/lib/gitlab/gitaly_client/call.rb:18:in `block in call'
/home/git/gitlab/lib/gitlab/gitaly_client/call.rb:55:in `recording_request'
/home/git/gitlab/lib/gitlab/gitaly_client/call.rb:17:in `call'
/home/git/gitlab/lib/gitlab/gitaly_client.rb:167:in `call'
/home/git/gitlab/lib/gitlab/gitaly_client/repository_service.rb:99:in `has_local_branches?'
/home/git/gitlab/lib/gitlab/git/repository.rb:1048:in `block in uncached_has_local_branches?'
/home/git/gitlab/lib/gitlab/git/wraps_gitaly_errors.rb:7:in `wrapped_gitaly_errors'
/home/git/gitlab/lib/gitlab/git/repository.rb:1047:in `uncached_has_local_branches?'
/home/git/gitlab/lib/gitlab/git/repository.rb:167:in `block in has_local_branches?'
/home/git/gitlab/lib/gitlab/utils/strong_memoize.rb:30:in `strong_memoize'
/home/git/gitlab/lib/gitlab/git/repository.rb:166:in `has_local_branches?'
/home/git/gitlab/app/models/repository.rb:582:in `has_visible_content?'
/home/git/gitlab/lib/gitlab/repository_cache_adapter.rb:92:in `block (2 levels) in cache_method_asymmetrically'
/home/git/gitlab/lib/gitlab/repository_cache.rb:44:in `fetch_without_caching_false'
/home/git/gitlab/lib/gitlab/repository_cache_adapter.rb:187:in `block (2 levels) in cache_method_output_asymmetrically'
/home/git/gitlab/lib/gitlab/null_request_store.rb:34:in `fetch'
/home/git/gitlab/lib/gitlab/safe_request_store.rb:12:in `fetch'
/home/git/gitlab/lib/gitlab/repository_cache.rb:25:in `fetch'
/home/git/gitlab/lib/gitlab/repository_cache_adapter.rb:186:in `block in cache_method_output_asymmetrically'
/home/git/gitlab/lib/gitlab/utils/strong_memoize.rb:30:in `strong_memoize'
/home/git/gitlab/lib/gitlab/repository_cache_adapter.rb:200:in `block in memoize_method_output'
/home/git/gitlab/lib/gitlab/repository_cache_adapter.rb:209:in `no_repository_fallback'
/home/git/gitlab/lib/gitlab/repository_cache_adapter.rb:199:in `memoize_method_output'
/home/git/gitlab/lib/gitlab/repository_cache_adapter.rb:185:in `cache_method_output_asymmetrically'
/home/git/gitlab/lib/gitlab/repository_cache_adapter.rb:91:in `block in cache_method_asymmetrically'
/home/git/gitlab/app/models/repository.rb:556:in `empty?'
/home/git/gitlab/app/models/repository.rb:382:in `expire_emptiness_caches'
/home/git/gitlab/lib/backup/repository.rb:225:in `empty_repo?'
/home/git/gitlab/lib/backup/repository.rb:202:in `dump_project'
/home/git/gitlab/lib/backup/repository.rb:152:in `block in dump_consecutive'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/relation/batches.rb:70:in `block (2 levels) in find_each'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/relation/batches.rb:70:in `each'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/relation/batches.rb:70:in `block in find_each'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/relation/batches.rb:136:in `block in find_in_batches'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/relation/batches.rb:238:in `block in in_batches'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/relation/batches.rb:222:in `loop'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/relation/batches.rb:222:in `in_batches'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/relation/batches.rb:135:in `find_in_batches'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/relation/batches.rb:69:in `find_each'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/querying.rb:21:in `find_each'
/home/git/gitlab/lib/backup/repository.rb:151:in `dump_consecutive'
/home/git/gitlab/lib/backup/repository.rb:17:in `dump'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:105:in `block (4 levels) in <top (required)>'
/home/git/gitlab/lib/tasks/gitlab/backup.rake:11:in `block (3 levels) in <top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.6.0/gems/rake-12.3.3/exe/rake:27:in `<top (required)>'
Tasks: TOP => gitlab:backup:repo:create
(See full trace by running task with --trace)

How can I resolve it ?
Thank you.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported gitlab:backup:create command and the Tasks: TOP => gitlab:backup:repo:create trace. Read lib/tasks/gitlab/backup.rake, lib/backup/repository.rb, and the repository/Gitaly paths named in the stack trace, then rerun with --trace if needed. Done means the backup completes without the HasLocalBranches error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, gitlab, shell
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.