Commit 0f7f22d2 authored by Valery Sizov's avatar Valery Sizov

Merge branch 'es_checker' of gitlab.com:gitlab-org/gitlab-ee into ee_master

parents 8151efa5 852615b2
......@@ -8,6 +8,10 @@ v 8.5.1
v 8.5.0
- Fix Elasticsearch blob results linking to the wrong reference ID (Stan Hu)
v 8.6.0(unreleased)
- [Elastic] Add elastic checker to gitlab:check
v 8.5.0
- Show warning when mirror repository default branch could not be updated because it has diverged from upstream.
- More reliable wiki indexer
- GitLab Pages gets support for custom domain and custom certificate
......
......@@ -30,6 +30,7 @@ namespace :gitlab do
check_ruby_version
check_git_version
check_active_users
check_elasticsearch if Gitlab.config.elasticsearch.enabled
finished_checking "GitLab"
end
......@@ -981,4 +982,27 @@ namespace :gitlab do
puts "No ref lock files exist".green
end
end
def check_elasticsearch
client = Elasticsearch::Client.new(host: Gitlab.config.elasticsearch.host,
port: Gitlab.config.elasticsearch.port)
print "Elasticsearch version >= 2.0? ... "
version = client.info["version"]["number"]
if version.starts_with?("2")
puts "yes (#{version})".green
else
puts "no".red
end
print "Elasticsearch has plugin delete-by-query installed? ... "
if client.cat.plugins.include?("delete-by-query")
puts "yes".green
else
puts "no".red
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment