Skip to content

Elasticsearch service status when ignoring incompatible versions #73798

@legrego

Description

@legrego

The elasticsearch core service has three service status levels defined today:

critical

This happens when Kibana has connected to a cluster which has one or more nodes with incompatible versions.

degraded

This happens when Kibana has connected to a cluster which has one or more nodes with incompatible versions, and Kibana is configured with elasticsearch.ignoreIncompatibleVersions: true. This is a dev-only setting which allows Kibana to start up even if it's connected to an incompatible cluster.

available

This happens when Kibana has connected to a cluster with fully compatible nodes.


The Spaces plugin waits for elasticsearch to become available before attempting to create the default space:

const isElasticsearchReady = status.elasticsearch.level === ServiceStatusLevels.available;
const isSavedObjectsReady = status.savedObjects.level === ServiceStatusLevels.available;
if (!isElasticsearchReady || !isSavedObjectsReady) {
return of({
level: ServiceStatusLevels.unavailable,
summary: 'required core services are not ready',
} as ServiceStatus);
}

This works for pretty much everyone, but we run into problems when Kibana is configured with elasticsearch.ignoreIncompatibleVersions: true, since the elasticsearch service never reaches the available status when connected to an incompatible cluster.
The result is we never create the Default space, which leads to users getting the dreaded application privileges must refer to at least one resource error.


Given that, I have a couple of questions:

  1. In general, should consumers attempt to work with services which are in a degraded state? It's hard to know why a service is degraded to know whether or not to attempt a particular action. For this specific service, and specific degradation reason, it makes sense for Spaces to attempt to create the default space, but that's relies on an implementation detail that this is the only reason the service would ever enter the degraded state.
  2. If Kibana is configured to ignore incompatible versions, should we really be reporting a degraded state? Or would available be more appropriate? This is a genuine question, I'm not sure what the best approach here would be. I could make arguments for both sides.

cc @dgieselaar @elastic/kibana-security

Metadata

Metadata

Assignees

Labels

Team:CorePlatform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t//discuss

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions