Skip to content

gitaly is not really optional (10.5)

Summary

It seems that gitaly is not really optional, despite the fact that it can be disabled by setting gitaly['enable'] = true in gitlab.rb.

Without gitaly, users are unable to actually use 'git' client to interact with the various repos (clone, pull, push, etc).

Steps to reproduce

  1. disable gitaly & reconfigure gitlab

  2. attempt to clone a repo using http protocol:

$ git clone http://gitlab/project/foobar.git
remote: Internal server error
fatal: unable to access 'http://gitlab/project/foobar.git/': The requested URL returned error: 500

Example Project

Any project will do

What is the current bug behavior?

git operations fail, errors are reported in the log.

What is the expected correct behavior?

git operations should succeed.

Relevant logs and/or screenshots

The gitlab-shell.log will show this:

I, [2018-02-22T13:28:30.734883 #10277]  INFO -- : gitlab-shell: executing git command <gitaly-upload-pack unix:/var/opt/gitlab/gitaly/gitaly.socket {"repository":{"storage_name":"default","relative_path":"project/foobar.git","git_object_directory":"","git_alternate_object_directories":[],"gl_repository":"project-46"},"gl_repository":"project-46","gl_id":"key-15","gl_username":"chrisg"}> for user with key key-15.
E, [2018-02-22T13:28:30.743087 #10277] ERROR -- : gitaly-upload-pack: upload-pack failed: rpc error: code = Unavailable desc = all SubConns are in TransientFailure

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info

System information System: CentOS 6.9 Current User: git Using RVM: no Ruby Version: 2.3.6p384 Gem Version: 2.6.13 Bundler Version:1.13.7 Rake Version: 12.3.0 Redis Version: 3.2.11 Git Version: 2.14.3 Sidekiq Version:5.0.5 Go Version: unknown

GitLab information Version: 10.5.0 Revision: 34d5766 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: http://kt-git..com HTTP Clone URL: http://kt-git..com/some-group/some-project.git SSH Clone URL: git@kt-git.****.com:some-group/some-project.git Using LDAP: no Using Omniauth: no

GitLab Shell Version: 6.0.3 Repository storage paths:

  • default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git

Results of GitLab application Check

NOTE: This is run AFTER correcting the problem and enabling gitaly.

Expand for output related to the GitLab application check

Checking GitLab Shell ...

GitLab Shell version >= 6.0.3 ? ... OK (6.0.3) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 4/2 ... ok 4/5 ... ok 4/6 ... ok 6/7 ... ok 4/8 ... ok 4/9 ... ok 18/12 ... ok 4/13 ... ok 4/14 ... ok 4/15 ... ok 22/16 ... ok 22/17 ... ok 21/18 ... ok 21/19 ... ok 23/20 ... ok 23/21 ... ok 4/22 ... ok 23/23 ... ok 23/24 ... repository is empty 4/25 ... ok 4/26 ... ok 4/27 ... ok 4/28 ... ok 24/29 ... ok 25/31 ... ok 4/32 ... ok 21/33 ... ok 4/34 ... ok 4/36 ... ok 4/37 ... ok 4/38 ... ok 23/39 ... ok 23/40 ... repository is empty 23/42 ... ok 4/43 ... ok 26/44 ... ok 26/45 ... ok 26/46 ... ok 22/47 ... ok 26/48 ... ok 22/49 ... ok 22/50 ... ok 21/51 ... ok 26/52 ... ok 22/53 ... ok 28/55 ... repository is empty 4/56 ... ok 4/57 ... ok Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK

Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes Number of Sidekiq processes ... 1

Checking Sidekiq ... Finished

Checking Reply by email ...

IMAP server credentials are correct? ... yes Init.d configured correctly? ... skipped MailRoom running? ... skipped

Checking Reply by email ... Finished

Checking LDAP ...

LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab ...

Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... no Try fixing it: sudo chown -R git /var/opt/gitlab/gitlab-rails/uploads sudo find /var/opt/gitlab/gitlab-rails/uploads -type f -exec chmod 0644 {} ; sudo find /var/opt/gitlab/gitlab-rails/uploads -type d -not -path /var/opt/gitlab/gitlab-rails/uploads -exec chmod 0700 {} ; For more information see: doc/install/installation.md in section "GitLab" Please fix the error above and rerun the checks. Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 4/2 ... yes 4/5 ... yes 4/6 ... yes 6/7 ... yes 4/8 ... yes 4/9 ... yes 18/12 ... yes 4/13 ... yes 4/14 ... yes 4/15 ... yes 22/16 ... yes 22/17 ... yes 21/18 ... yes 21/19 ... yes 23/20 ... yes 23/21 ... yes 4/22 ... yes 23/23 ... yes 23/24 ... yes 4/25 ... yes 4/26 ... yes 4/27 ... yes 4/28 ... yes 24/29 ... yes 25/31 ... yes 4/32 ... yes 21/33 ... yes 4/34 ... yes 4/36 ... yes 4/37 ... yes 4/38 ... yes 23/39 ... yes 23/40 ... yes 23/42 ... yes 4/43 ... yes 26/44 ... yes 26/45 ... yes 26/46 ... yes 22/47 ... yes 26/48 ... yes 22/49 ... yes 22/50 ... yes 21/51 ... yes 26/52 ... yes 22/53 ... yes 28/55 ... yes 4/56 ... yes 4/57 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.3.6) Git version >= 2.9.5 ? ... yes (2.14.3) Git user has default SSH configuration? ... yes Active users: ... 16

Checking GitLab ... Finished

Possible fixes