[es] ignore version qualifiers (#33877)

This commit is contained in:
Jonathan Budzenski 2019-04-17 08:25:44 -05:00 committed by Jonathan Budzenski
parent 6a9b9d41e2
commit 404c2c2fb8
No known key found for this signature in database
GPG key ID: D28BF9418FA0F292

View file

@ -38,7 +38,6 @@ const lastWarnedNodesForServer = new WeakMap();
export function ensureEsVersion(server, kibanaVersion) {
const { callWithInternalUser } = server.plugins.elasticsearch.getCluster('admin');
const isProd = server.config().get('env.prod');
server.logWithMetadata(['plugin', 'debug'], 'Checking Elasticsearch version');
return callWithInternalUser('nodes.info', {
@ -63,11 +62,11 @@ export function ensureEsVersion(server, kibanaVersion) {
// It's acceptable if ES and Kibana versions are not the same so long as
// they are not incompatible, but we should warn about it
// In development we ignore, this can be expected when testing against snapshots
// or across version qualifiers
const exactMisMatch = esNode.version !== kibanaVersion;
// Ignore version qualifiers
// https://github.com/elastic/elasticsearch/issues/36859
const looseMismatch = coerce(esNode.version).version !== coerce(kibanaVersion).version;
if (isProd && exactMisMatch || looseMismatch) {
if (looseMismatch) {
warningNodes.push(esNode);
}
});