Skip to content

Conversation

@alexey-ivanov-es
Copy link
Contributor

@alexey-ivanov-es alexey-ivanov-es commented Nov 14, 2025

This change moves the disk watermark check from all nodes to the master node since the check is performed against information in ClusterInfo. Also, it changes what setting values are used - using values from the cluster state if they are set, or from node settings otherwise.

There's a potential edge case: in a mixed cluster (e.g. master 9.2.1 (before the fix), other nodes 9.3 (after the fix)), the check wouldn't be performed. However, due to #137004, the check isn't working in the released versions anyway, so this doesn't make things worse.

Closes #137005

@alexey-ivanov-es alexey-ivanov-es added >bug :Core/Infra/Core Core issues without another label auto-backport Automatically create backport pull requests when merged branch:9.2 branch:9.1 branch:8.19 labels Nov 14, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@elasticsearchmachine
Copy link
Collaborator

Hi @alexey-ivanov-es, I've created a changelog YAML for you.

@alexey-ivanov-es alexey-ivanov-es requested a review from a team November 14, 2025 17:45
@mosche
Copy link
Contributor

mosche commented Nov 17, 2025

sorry, i got distracted... I'll get back to this tomorrow morning @alexey-ivanov-es

Copy link
Contributor

@mosche mosche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, just a few minor nits. But wondering if we should address the testing gap here?

public List<DeprecationIssue> nodeSettingsIssues() {
return nodeSettingsIssues.get();
DeprecationIssue watermarkIssue = diskWatermarkIssue.get();
List<DeprecationIssue> deprecationIssues = nodeSettingsIssues.get();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optional nit, how about better distinguishing between the enhanced nodeSettingsIssues and the ones collected from remote nodes, e.g. renaming the latter to remoteNodeSettingsIssues or similar making it more obvious that it's not the same as nodeSettingsIssues that are ultimately returned

assertThat(exception.getCause().getMessage(), containsString("boom"));
}

public void testCheckDiskLowWatermark() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like masterOperation operation isn't covered at all, but obviously that's not new to this PR.
Should that be added? wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a unit test for it. I wanted to add an integration or REST test, but found it's quite difficult to set up the behavior needed I wanted to test

@alexey-ivanov-es alexey-ivanov-es merged commit 28992e6 into elastic:main Dec 1, 2025
33 of 35 checks passed
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
9.1 Commit could not be cherrypicked due to conflicts
8.19 Commit could not be cherrypicked due to conflicts
9.2

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 138115

alexey-ivanov-es added a commit to alexey-ivanov-es/elasticsearch that referenced this pull request Dec 1, 2025
…rrect settings values (elastic#138115)

This change moves the disk watermark check from all nodes to the master node since the check is performed against information in ClusterInfo. Also, it changes what setting values are used - using values from the cluster state if they are set, or from node settings otherwise.

There's a potential edge case: in a mixed cluster (e.g. master 9.2.1 (before the fix), other nodes 9.3 (after the fix)), the check wouldn't be performed. However, due to elastic#137004, the check isn't working in the released versions anyway, so this doesn't make things worse.

Closes elastic#137005
@alexey-ivanov-es alexey-ivanov-es deleted the bug-137005 branch December 1, 2025 14:06
elasticsearchmachine pushed a commit that referenced this pull request Dec 1, 2025
…rrect settings values (#138115) (#138818)

This change moves the disk watermark check from all nodes to the master node since the check is performed against information in ClusterInfo. Also, it changes what setting values are used - using values from the cluster state if they are set, or from node settings otherwise.

There's a potential edge case: in a mixed cluster (e.g. master 9.2.1 (before the fix), other nodes 9.3 (after the fix)), the check wouldn't be performed. However, due to #137004, the check isn't working in the released versions anyway, so this doesn't make things worse.

Closes #137005
alexey-ivanov-es added a commit to alexey-ivanov-es/elasticsearch that referenced this pull request Dec 1, 2025
alexey-ivanov-es added a commit to alexey-ivanov-es/elasticsearch that referenced this pull request Dec 1, 2025
elasticsearchmachine pushed a commit that referenced this pull request Dec 1, 2025
elasticsearchmachine pushed a commit that referenced this pull request Dec 1, 2025
…inst correct settings values (#138115) (#138840)

* [8.19] GET /_migration/deprecations doesn't check disk watermarks against correct settings values (#138115)

* Fix build
@alexey-ivanov-es
Copy link
Contributor Author

Backported to 8.19 and 9.1 manually

mamazzol added a commit that referenced this pull request Jan 2, 2026
…ced in #138115

Skip frozen nodes on disk watermark check(#140118) Solves bug introduced in #138115
mamazzol added a commit to mamazzol/elasticsearch that referenced this pull request Jan 2, 2026
…introduced in elastic#138115

Skip frozen nodes on disk watermark check(elastic#140118) Solves bug introduced in elastic#138115
mamazzol added a commit to mamazzol/elasticsearch that referenced this pull request Jan 2, 2026
…introduced in elastic#138115

Skip frozen nodes on disk watermark check(elastic#140118) Solves bug introduced in elastic#138115
mamazzol added a commit to mamazzol/elasticsearch that referenced this pull request Jan 2, 2026
…introduced in elastic#138115

Skip frozen nodes on disk watermark check(elastic#140118) Solves bug introduced in elastic#138115
elasticsearchmachine pushed a commit that referenced this pull request Jan 2, 2026
…introduced in #138115 (#140118) (#140122)

* Skip frozen nodes on disk watermark check(#140118) Solves bug introduced in #138115

Skip frozen nodes on disk watermark check(#140118) Solves bug introduced in #138115

* Use constructor instead of builder for ClusterInfo

* [CI] Auto commit changes from spotless

---------

Co-authored-by: elasticsearchmachine <[email protected]>
elasticsearchmachine pushed a commit that referenced this pull request Jan 2, 2026
…ntroduced in #138115 (#140118) (#140120)

* Skip frozen nodes on disk watermark check(#140118) Solves bug introduced in #138115

Skip frozen nodes on disk watermark check(#140118) Solves bug introduced in #138115

* Use constructor instead of builder for ClusterInfo
elasticsearchmachine pushed a commit that referenced this pull request Jan 2, 2026
…ced in #138115 (#140121)

Skip frozen nodes on disk watermark check(#140118) Solves bug introduced in #138115
samxbr pushed a commit to samxbr/elasticsearch that referenced this pull request Jan 5, 2026
…introduced in elastic#138115

Skip frozen nodes on disk watermark check(elastic#140118) Solves bug introduced in elastic#138115
elasticsearchmachine pushed a commit that referenced this pull request Jan 6, 2026
…ced in #138115 (#140123)

Skip frozen nodes on disk watermark check(#140118) Solves bug introduced in #138115
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged >bug :Core/Infra/Core Core issues without another label Team:Core/Infra Meta label for core/infra team v8.19.9 v9.1.9 v9.2.3 v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

3 participants