Tag creation failure (TypeError in rugged)

Please read this!

Before opening a new issue, make sure to search for keywords in the issues filtered by the "regression" or "bug" label.

For the Community Edition issue tracker:

  • https://gitlab.com/gitlab-org/gitlab-ce/issues?label_name%5B%5D=regression
  • https://gitlab.com/gitlab-org/gitlab-ce/issues?label_name%5B%5D=bug

For the Enterprise Edition issue tracker:

  • https://gitlab.com/gitlab-org/gitlab-ee/issues?label_name%5B%5D=regression
  • https://gitlab.com/gitlab-org/gitlab-ee/issues?label_name%5B%5D=bug

and verify the issue you're about to submit isn't a duplicate.

Please remove this notice if you're confident your issue isn't a duplicate.


Summary

Unable to create or push a new tag.

Steps to reproduce

  • Go in tag tab in a given repository, create a new tag. Get error "GitLab: API is not accessible" or
  • Push a new tag and get remote rejected with message "remote: GitLab: API is not accessible"

What is the current bug behavior?

When I try to create or push a new tag, I get the following stack trace in production.log file:

==> production.log <==

TypeError (wrong argument type Array (expected String)):
  /usr/share/webapps/gitlab/lib/gitlab/git/repository.rb:92:in `new'
  /usr/share/webapps/gitlab/lib/gitlab/git/repository.rb:92:in `block in rugged'
  /usr/share/webapps/gitlab/lib/gitlab/git/storage/circuit_breaker.rb:51:in `perform'
  /usr/share/webapps/gitlab/lib/gitlab/git/repository.rb:91:in `rugged'
  /usr/share/webapps/gitlab/lib/gitlab/git/repository.rb:1257:in `rugged_tag_exists?'
  /usr/share/webapps/gitlab/lib/gitlab/git/repository.rb:271:in `block in tag_exists?'
  /usr/share/webapps/gitlab/lib/gitlab/gitaly_client.rb:115:in `block in migrate'
  /usr/share/webapps/gitlab/lib/gitlab/metrics/influx_db.rb:92:in `measure'
  /usr/share/webapps/gitlab/lib/gitlab/gitaly_client.rb:114:in `migrate'
  /usr/share/webapps/gitlab/lib/gitlab/git/repository.rb:956:in `gitaly_migrate'
  /usr/share/webapps/gitlab/lib/gitlab/git/repository.rb:267:in `tag_exists?'
  /usr/share/webapps/gitlab/app/models/repository.rb:458:in `method_missing'
  /usr/share/webapps/gitlab/lib/gitlab/checks/change_access.rb:121:in `tag_exists?'
  /usr/share/webapps/gitlab/lib/gitlab/checks/change_access.rb:100:in `tag_checks'
  /usr/share/webapps/gitlab/lib/gitlab/checks/change_access.rb:38:in `exec'
  /usr/share/webapps/gitlab/lib/gitlab/git_access.rb:205:in `check_single_change_access'
  /usr/share/webapps/gitlab/lib/gitlab/git_access.rb:194:in `block in check_change_access!'
  /usr/share/webapps/gitlab/lib/gitlab/changes_list.rb:12:in `each'
  /usr/share/webapps/gitlab/lib/gitlab/changes_list.rb:12:in `each'
  /usr/share/webapps/gitlab/lib/gitlab/git_access.rb:191:in `check_change_access!'
  /usr/share/webapps/gitlab/lib/gitlab/git_access.rb:172:in `check_push_access!'
  /usr/share/webapps/gitlab/lib/gitlab/git_access.rb:50:in `check'
  /usr/share/webapps/gitlab/lib/api/internal.rb:40:in `block (2 levels) in <class:Internal>'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape-1.0.0/lib/grape/endpoint.rb:57:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape-1.0.0/lib/grape/endpoint.rb:57:in `block (2 levels) in generate_api_method'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/notifications.rb:166:in `instrument'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape-1.0.0/lib/grape/endpoint.rb:56:in `block in generate_api_method'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape-1.0.0/lib/grape/endpoint.rb:262:in `block in run'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/notifications.rb:166:in `instrument'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape-1.0.0/lib/grape/endpoint.rb:243:in `run'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape-1.0.0/lib/grape/endpoint.rb:313:in `block in build_stack'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape-1.0.0/lib/grape/middleware/base.rb:31:in `call!'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape-1.0.0/lib/grape/middleware/base.rb:24:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape-1.0.0/lib/grape/middleware/base.rb:31:in `call!'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape-1.0.0/lib/grape/middleware/base.rb:24:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape_logging-1.7.0/lib/grape_logging/middleware/request_logger.rb:60:in `block in call!'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape_logging-1.7.0/lib/grape_logging/middleware/request_logger.rb:58:in `catch'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape_logging-1.7.0/lib/grape_logging/middleware/request_logger.rb:58:in `call!'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape-1.0.0/lib/grape/middleware/base.rb:24:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/rack-oauth2-1.2.3/lib/rack/oauth2/server/resource.rb:20:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/rack-oauth2-1.2.3/lib/rack/oauth2/server/resource/bearer.rb:8:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape-1.0.0/lib/grape/middleware/error.rb:34:in `block in call!'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape-1.0.0/lib/grape/middleware/error.rb:33:in `catch'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape-1.0.0/lib/grape/middleware/error.rb:33:in `call!'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape-1.0.0/lib/grape/middleware/base.rb:24:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/head.rb:13:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape-1.0.0/lib/grape/endpoint.rb:227:in `call!'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape-1.0.0/lib/grape/endpoint.rb:221:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape-1.0.0/lib/grape/router/route.rb:72:in `exec'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape-1.0.0/lib/grape/router.rb:119:in `process_route'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape-1.0.0/lib/grape/router.rb:74:in `block in identity'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape-1.0.0/lib/grape/router.rb:93:in `transaction'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape-1.0.0/lib/grape/router.rb:72:in `identity'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape-1.0.0/lib/grape/router.rb:57:in `block in call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape-1.0.0/lib/grape/router.rb:135:in `with_optimization'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape-1.0.0/lib/grape/router.rb:56:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape-1.0.0/lib/grape/api.rb:119:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape-1.0.0/lib/grape/api.rb:45:in `call!'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/grape-1.0.0/lib/grape/api.rb:40:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/routing/mapper.rb:51:in `serve'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/journey/router.rb:43:in `block in serve'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/journey/router.rb:30:in `each'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/journey/router.rb:30:in `serve'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/routing/route_set.rb:817:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/peek-performance_bar-1.3.0/lib/peek/views/performance_bar/process_utilization.rb:120:in `call'
  /usr/share/webapps/gitlab/lib/gitlab/middleware/multipart.rb:93:in `call'
  /usr/share/webapps/gitlab/lib/gitlab/request_profiler/middleware.rb:14:in `call'
  /usr/share/webapps/gitlab/lib/gitlab/middleware/go.rb:17:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/flipper-0.10.2/lib/flipper/middleware/memoizer.rb:55:in `call'
  /usr/share/webapps/gitlab/lib/gitlab/etag_caching/middleware.rb:11:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/warden-1.2.6/lib/warden/manager.rb:35:in `block in call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/warden-1.2.6/lib/warden/manager.rb:34:in `catch'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/warden-1.2.6/lib/warden/manager.rb:34:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/rack-cors-0.4.0/lib/rack/cors.rb:80:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/rack-attack-4.4.1/lib/rack/attack.rb:107:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/etag.rb:24:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/conditionalget.rb:38:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/head.rb:13:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/flash.rb:260:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/session/abstract/id.rb:225:in `context'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/session/abstract/id.rb:220:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/cookies.rb:560:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/query_cache.rb:36:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:88:in `__run_callbacks__'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/railties-4.2.8/lib/rails/rack/logger.rb:38:in `call_app'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/railties-4.2.8/lib/rails/rack/logger.rb:20:in `block in call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/tagged_logging.rb:68:in `block in tagged'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/tagged_logging.rb:26:in `tagged'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/activesupport-4.2.8/lib/active_support/tagged_logging.rb:68:in `tagged'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/railties-4.2.8/lib/rails/rack/logger.rb:20:in `call'
  /usr/share/webapps/gitlab/lib/gitlab/request_context.rb:18:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/request_store-1.3.1/lib/request_store/middleware.rb:9:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.8/lib/action_dispatch/middleware/request_id.rb:21:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/methodoverride.rb:22:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/runtime.rb:18:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/lock.rb:17:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/sendfile.rb:113:in `call'
  /usr/share/webapps/gitlab/lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/sentry-raven-2.5.3/lib/raven/integrations/rack.rb:50:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/railties-4.2.8/lib/rails/engine.rb:518:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/railties-4.2.8/lib/rails/application.rb:165:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/railties-4.2.8/lib/rails/railtie.rb:194:in `public_send'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/railties-4.2.8/lib/rails/railtie.rb:194:in `method_missing'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/urlmap.rb:66:in `block in call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/urlmap.rb:50:in `each'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/rack-1.6.8/lib/rack/urlmap.rb:50:in `call'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:562:in `process_client'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/unicorn-worker-killer-0.4.4/lib/unicorn/worker_killer.rb:52:in `process_client'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:658:in `worker_loop'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:508:in `spawn_missing_workers'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:519:in `maintain_worker_count'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:283:in `join'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/gems/unicorn-5.1.0/bin/unicorn_rails:209:in `<top (required)>'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/bin/unicorn_rails:22:in `load'
  /usr/share/webapps/gitlab/vendor/bundle/ruby/2.3.0/bin/unicorn_rails:22:in `<main>'

What is the expected correct behavior?

Successful tag creation!

Relevant logs and/or screenshots

In addition to production.log paste before, I get this logs in gitlab-shell.log:

==> gitlab-shell.log <==
I, [2017-10-19T09:26:47.065468 #21121]  INFO -- : POST http+unix://%2Frun%2Fgitlab%2Fgitlab-workhorse.socket/api/v4/internal/allowed 0.04338
E, [2017-10-19T09:26:47.065563 #21121] ERROR -- : API call <POST http+unix://%2Frun%2Fgitlab%2Fgitlab-workhorse.socket/api/v4/internal/allowed> failed: 500 => <{"message":"500 Internal Server Error"}>.

Output of checks

Note that my gitlab installation comes from package manager on Archlinux. It is started using systemd script instead of initd script (that cause warning in gitlab:check). I can post my systemd unit files to see exactly which commands is run!

Results of GitLab environment info

Expand for output related to GitLab environment info
System information
System:		
Current User:	gitlab
Using RVM:	no
Ruby Version:	2.3.5p376
Gem Version:	2.6.14
Bundler Version:1.15.3
Rake Version:	12.0.0
Redis Version:	4.0.2
Git Version:	2.14.2
Sidekiq Version:5.0.4
Go Version:	go1.9.1 linux/amd64

GitLab information
Version:	10.0.4
Revision:	8ebd2dd
Directory:	/usr/share/webapps/gitlab
DB Adapter:	mysql2
URL:		https://gitlab.yapbreak.fr
HTTP Clone URL:	https://gitlab.yapbreak.fr/some-group/some-project.git
SSH Clone URL:	gitlab@gitlab.yapbreak.fr:some-group/some-project.git
Using LDAP:	no
Using Omniauth:	no

GitLab Shell
Version:	5.9.4
Repository storage paths:
- default: 	/var/lib/gitlab/repositories
Hooks:		/usr/share/webapps/gitlab-shell/hooks
Git:		/usr/bin/git

Results of GitLab check

Expand for output related to GitLab check
Checking GitLab Shell ...

GitLab Shell version >= 5.9.0 ? ... OK (5.9.4)
Repo base directory exists?
default... yes
Repo storage directories are symlinks?
default... no
Repo paths owned by gitlab:root, or gitlab:gitlab?
default... yes
Repo paths access is drwxrws---?
default... yes
hooks directories in repos are links: ... 
2/1 ... ok
2/2 ... ok
4/3 ... ok
3/4 ... ok
5/5 ... ok
8/6 ... ok
3/7 ... repository is empty
5/8 ... ok
3/9 ... ok
Running /usr/share/webapps/gitlab-shell/bin/check
Check GitLab API access: OK
Redis available via internal API: OK

Access to /var/lib/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

Reply by email is disabled in config/gitlab.yml
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? ... yes
Init script exists? ... no
  Try fixing it:
  Install the init script
  For more information see:
  doc/install/installation.md in section "Install Init Script"
  Please fix the error above and rerun the checks.
Init script up-to-date? ... can't check because of previous errors
Projects have namespace: ... 
2/1 ... yes
2/2 ... yes
4/3 ... yes
3/4 ... yes
5/5 ... yes
8/6 ... yes
3/7 ... yes
5/8 ... yes
3/9 ... yes
Redis version >= 2.8.0? ... yes
Ruby version >= 2.3.3 ? ... yes (2.4.2)
Git version >= 2.7.3 ? ... yes (2.14.2)
Git user has default SSH configuration? ... yes
Active users: ... 2

Checking GitLab ... Finished
Assignee Loading
Time tracking Loading