Skip to content

gitlab check: Problem with Elastic Search

We are currently using Gitlab Enterprise Edition Starter: gitlab-ee.x86_64 0:9.3.0-ee.0.el7

It is installed as an Omnibus package.

I recently updated GitLab from v9.2.5 to v9.3.0

Before and after the update, I ran a gitlab check (“gitlab-rake gitlab:check” cmd). After the Update I noticed a problem with Elastic Search.

Before Update:

Active users: 67

Elasticsearch version 5.1 - 5.3? ... yes (5.1.2)

Checking GitLab ... Finished

After Update:


Active users: ... 67

Elasticsearch version 5.1 - 5.3? ... rake aborted!

NameError: undefined local variable or method `current_version' for #<SystemCheck::App::ElasticsearchCheck:0x007f8521c39f30>

Did you mean? checkout_version

/opt/gitlab/embedded/service/gitlab-rails/lib/system_check/app/elasticsearch_check.rb:21:in `check?'

/opt/gitlab/embedded/service/gitlab-rails/lib/system_check/simple_executor.rb:61:in `run_check'

/opt/gitlab/embedded/service/gitlab-rails/lib/system_check/simple_executor.rb:35:in `block in execute'

/opt/gitlab/embedded/service/gitlab-rails/lib/system_check/simple_executor.rb:34:in `execute'

/opt/gitlab/embedded/service/gitlab-rails/lib/system_check.rb:19:in `run'

/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/check.rake:42:in `block (3 levels) in <main>'

/opt/gitlab/embedded/bin/bundle:22:in `load'

/opt/gitlab/embedded/bin/bundle:22:in `<main>'

Tasks: TOP => gitlab:check => gitlab:app:check

(See full trace by running task with --trace)

As recommended I did a “gitlab-rake gitlab:check –trace”:



Active users: ... 67

Elasticsearch version 5.1 - 5.3? ... rake aborted!

NameError: undefined local variable or method `current_version' for #<SystemCheck::App::ElasticsearchCheck:0x007f89e98fbe00>

Did you mean? checkout_version

/opt/gitlab/embedded/service/gitlab-rails/lib/system_check/app/elasticsearch_check.rb:21:in `check?'

/opt/gitlab/embedded/service/gitlab-rails/lib/system_check/simple_executor.rb:61:in `run_check'

/opt/gitlab/embedded/service/gitlab-rails/lib/system_check/simple_executor.rb:35:in `block in execute'

/opt/gitlab/embedded/lib/ruby/2.3.0/set.rb:306:in `each_key'

/opt/gitlab/embedded/lib/ruby/2.3.0/set.rb:306:in `each'

/opt/gitlab/embedded/service/gitlab-rails/lib/system_check/simple_executor.rb:34:in `execute'

/opt/gitlab/embedded/service/gitlab-rails/lib/system_check.rb:19:in `run'

/opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/check.rake:42:in `block (3 levels) in <main>'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:240:in `block in execute'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `each'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:235:in `execute'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:179:in `block in invoke_with_call_chain'

/opt/gitlab/embedded/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:172:in `invoke_with_call_chain'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:201:in `block in invoke_prerequisites'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:199:in `each'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:199:in `invoke_prerequisites'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:178:in `block in invoke_with_call_chain'

/opt/gitlab/embedded/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:172:in `invoke_with_call_chain'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/task.rb:165:in `invoke'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:150:in `invoke_task'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `each'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:106:in `block in top_level'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:115:in `run_with_threads'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb100in `top_level'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:78:in `block in run'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:176:in `standard_exception_handling'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rake-10.5.0/lib/rake/application.rb:75:in `run'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/rake-10.5.0/bin/rake:33:in `<top (required)>'

/opt/gitlab/embedded/bin/rake:22:in `load'

/opt/gitlab/embedded/bin/rake:22:in `<top (required)>'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:74:in `load'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:74:in `kernel_load'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:27:in `run'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/cli.rb:332:in `exec'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/cli.rb:20:in `dispatch'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/cli.rb:11:in `start'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/exe/bundle:34:in `block in <top (required)>'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/lib/bundler/friendly_errors.rb100in `with_friendly_errors'

/opt/gitlab/embedded/lib/ruby/gems/2.3.0/gems/bundler-1.13.7/exe/bundle:26:in `<top (required)>'

/opt/gitlab/embedded/bin/bundle:22:in `load'

/opt/gitlab/embedded/bin/bundle:22:in `<main>'

Tasks: TOP => gitlab:check => gitlab:app:check

“gitlab-rake gitlab:app:check” showed the same error as “gitlab-rake gitlab-check” concerning Elastic Search.

The Elastic search is working fine but it is probably a regression in the gitlab-rake task

Similar output of check can be seen here in the repo check

#2731 (closed)

ZD: https://gitlab.zendesk.com/agent/tickets/79287

cc// @brodock