Skip to content

GET /_migration/deprecations doesn't check disk watermarks against correct settings #137005

@DaveCTurner

Description

@DaveCTurner

In TransportNodeDeprecationCheckAction we check for nodes exceeding the low watermark by passing in the (filtered) static settings from the local node, and the (filtered) dynamic settings from its cluster state, and reporting a violation of the watermark if the node's disk usage is too high according to either of these settings sets:

DeprecationIssue watermarkIssue = checkDiskLowWatermark(
filteredNodeSettings,
filteredClusterState.metadata().settings(),

if (exceedsLowWatermark(nodeSettings, clusterSettings, freeBytes, totalBytes)
|| exceedsLowWatermark(dynamicSettings, clusterSettings, freeBytes, totalBytes)) {
return new DeprecationIssue(
DeprecationIssue.Level.CRITICAL,

There's several issues with this:

  1. There should be no facility for filtering out the relevant settings here.
  2. The node-local settings have no relevance to disk watermarks unless the node is the elected master.
  3. Even the elected master's node-local settings have no relevance to disk watermarks if the settings are overridden with dynamic values.
  4. Conversely, if the settings are not overriden with dynamic values then checking filteredClusterState.metadata().settings() means checking against the default value of 85%, even if the master's node-local settings specify a different value.

Instead, since this action is originally invoked by the elected master, it should include in its request the actual disk watermark that the node should use.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions