Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_cluster/state should always return cluster_uuid #30143

Merged
merged 4 commits into from
Apr 30, 2018

Conversation

pickypg
Copy link
Member

@pickypg pickypg commented Apr 25, 2018

Currently, the only way to get the REST response for the /_cluster/state
call to return the cluster_uuid is to request the metadata metrics,
which is one of the most expensive response structures. However, external
monitoring agents will likely want the cluster_uuid to correlate the
response with other API responses whether or not they want cluster
metadata.

Relates to elastic/beats#6807

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

Copy link
Contributor

@bleskes bleskes left a comment

Choose a reason for hiding this comment

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

LGTM, though I believe you need a skip clause in your yml tests to make sure it doesn't run against an old version that doesn't output the uuid.

@pickypg
Copy link
Member Author

pickypg commented Apr 25, 2018

@bleskes I wonder if I should just make a specific test for the cluster_uuid in that case, then skip only that one for older versions and avoid having none of these REST tests run on older versions?

@bleskes
Copy link
Contributor

bleskes commented Apr 25, 2018

@pickypg makes sense.

@pickypg pickypg force-pushed the feature/always-return-cluster_uuid branch from 4d3149f to a581a7d Compare April 25, 2018 20:57
---
"get cluster state returns cluster_uuid at the top level":
- skip:
version: " - 6.99.99"
Copy link
Member Author

Choose a reason for hiding this comment

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

There will be a follow-up PR to change this to 6.3.99 after this PR is merged / backported to 6.x (6.4).

Copy link
Member Author

Choose a reason for hiding this comment

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

#30264 as promised

@pickypg pickypg force-pushed the feature/always-return-cluster_uuid branch from 56d7cbc to 0cd2bb6 Compare April 26, 2018 18:51
@pickypg
Copy link
Member Author

pickypg commented Apr 26, 2018

jenkins test this

pickypg and others added 4 commits April 26, 2018 17:17
Currently, the only way to get the REST response for the `/_cluster/state`
call to return the `cluster_uuid` is to request the `metadata` metrics,
which is one of the most expensive response structures. However, external
monitoring agents will likely want the `cluster_uuid` to correlate the
response with other API responses whether or not they want cluster
metadata.
@pickypg pickypg force-pushed the feature/always-return-cluster_uuid branch from 0cd2bb6 to fb669f3 Compare April 26, 2018 21:17
@pickypg
Copy link
Member Author

pickypg commented Apr 27, 2018

jenkins test this

@pickypg
Copy link
Member Author

pickypg commented Apr 27, 2018

@bleskes Updated with skip logic and CI has calmed down

@pickypg pickypg merged commit 725a5af into elastic:master Apr 30, 2018
@pickypg pickypg deleted the feature/always-return-cluster_uuid branch April 30, 2018 14:16
pickypg added a commit that referenced this pull request Apr 30, 2018
Currently, the only way to get the REST response for the `/_cluster/state`
call to return the `cluster_uuid` is to request the `metadata` metrics,
which is one of the most expensive response structures. However, external
monitoring agents will likely want the `cluster_uuid` to correlate the
response with other API responses whether or not they want cluster
metadata.
@pickypg
Copy link
Member Author

pickypg commented Apr 30, 2018

6.x/6.4: eea10f1

jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request May 1, 2018
* origin/master:
  [test] add java packaging test project (elastic#30161)
  Fix macros in changelog (elastic#30269)
  [DOCS] Fixes syskeygen command name
  [ML] Include 3rd party C++ component notices (elastic#30132)
  _cluster/state Skip Test for pre-6.4, not pre-7.0 (elastic#30264)
  Improve docs for disk watermarks (elastic#30249)
  [DOCS] Removes redundant Active Directory realm settings (elastic#30190)
  [DOCS] Removes redundant LDAP realm settings (elastic#30193)
  _cluster/state should always return cluster_uuid (elastic#30143)
  HTML5ify Javadoc for core and test framework (elastic#30234)
  Minor tweaks to reroute documentation (elastic#30246)
tlrx added a commit to tlrx/elasticsearch that referenced this pull request May 16, 2018
Since elastic#30143, the Cluster State API should always returns the current
cluster_uuid in the response body, regardless of the metrics filters.

This is not exactly true as it is returned only if metadata metrics and
no specific indices are requested.

This commit fixes the behavior to always return the cluster_uuid and
add new test.
tlrx added a commit that referenced this pull request May 17, 2018
Since #30143, the Cluster State API should always returns the current
cluster_uuid in the response body, regardless of the metrics filters.

This is not exactly true as it is returned only if metadata metrics and
no specific indices are requested.

This commit fixes the behavior to always return the cluster_uuid and
add new test.
tlrx added a commit that referenced this pull request May 17, 2018
Since #30143, the Cluster State API should always returns the current
cluster_uuid in the response body, regardless of the metrics filters.

This is not exactly true as it is returned only if metadata metrics and
no specific indices are requested.

This commit fixes the behavior to always return the cluster_uuid and
add new test.
ywelsch pushed a commit to ywelsch/elasticsearch that referenced this pull request May 23, 2018
Since elastic#30143, the Cluster State API should always returns the current
cluster_uuid in the response body, regardless of the metrics filters.

This is not exactly true as it is returned only if metadata metrics and
no specific indices are requested.

This commit fixes the behavior to always return the cluster_uuid and
add new test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants