Using OpenSearch in GitLab 15.0 shows the error "Elasticsearch version not compatible" in the UI.
Summary
One of our customers reported that using OpenSearch 1.3.2 with GitLab 15.0 shows this error:
Elasticsearch version not compatible
I was able to replicate this using AWS OpenSearch 1.2.
Checking in the Rails console:
SystemCheck::App::SearchCheck.current_version
=> #<Gitlab::VersionInfo:0x00007fe224d0cec0 @major=1, @minor=2, @patch=4>
SystemCheck::App::SearchCheck.distribution
=> "elasticsearch"
It seems that GitLab detected this as an Elasticsearch cluster, which probably caused the error above to show.
This was also reflected in gitlab-rake gitlab:check
:
Elasticsearch version 7.x-8.x or OpenSearch version 1.x ... no (elasticsearch 1.2.4)
Steps to reproduce
- Install GitLab 15.0.
- Setup an OpenSearch cluster (1.2 or 1.3.2)
- Configure GitLab to use the OpenSearch cluster.
What is the current bug behavior?
UI shows Elasticsearch version not compatible
.
What is the expected correct behavior?
OpenSearch integration should work.
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Ubuntu 20.04 Proxy: no Current User: git Using RVM: no Ruby Version: 2.7.5p203 Gem Version: 3.1.4 Bundler Version:2.2.33 Rake Version: 13.0.6 Redis Version: 6.2.6 Sidekiq Version:6.4.0 Go Version: unknown GitLab information Version: 15.0.0-ee Revision: 3b397c17532 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 13.6 URL: https://zd-294331.jpid.xyz HTTP Clone URL: https://zd-294331.jpid.xyz/some-group/some-project.git SSH Clone URL: git@zd-294331.jpid.xyz:some-group/some-project.git Elasticsearch: yes Geo: no Using LDAP: no Using Omniauth: yes Omniauth Providers: GitLab Shell Version: 14.3.0 Repository storage paths: - default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab subtasks ...
Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 14.3.0 ? ... OK (14.3.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes Number of Sidekiq processes (cluster/worker) ... 1/1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab App ...
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? ... skipped (no tmp uploads folder yet) Systemd unit files or init script exist? ... skipped (omnibus-gitlab has neither init script nor systemd units) Systemd unit files or init script up-to-date? ... skipped (omnibus-gitlab has neither init script nor systemd units) Projects have namespace: ... 2/1 ... yes Redis version >= 5.0.0? ... yes Ruby version >= 2.7.2 ? ... yes (2.7.5) Git user has default SSH configuration? ... yes Active users: ... 1 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... yes Elasticsearch version 7.x-8.x or OpenSearch version 1.x ... no (elasticsearch 1.2.4) For more information see: doc/integration/elasticsearch.md
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished