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

[Monitoring] Use 0 as the default for shard count if the node is not found #21000

Merged
merged 5 commits into from
Jul 24, 2018

Conversation

chrisronline
Copy link
Contributor

Fixes #20628

This PR changes the default for shardCount from null to 0.

@tsullivan Is this the right way to fix it? Or is the real problem that the coordinating node isn't returned in the getShardStats() call?

@@ -58,6 +58,8 @@ export function getShardStats(req, esIndexPattern, cluster, { includeNodes = fal
}
};

console.log('CHRIS', JSON.stringify(params));

Copy link
Member

Choose a reason for hiding this comment

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

please remove :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

haha oh wow I'm ashamed that I left that in!

Copy link
Member

Choose a reason for hiding this comment

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

Eh, we've all done it. #21002 :D

@@ -35,7 +35,7 @@ export function mapNodesInfo(nodeHits, clusterStats, shardStats) {
isOnline,
nodeTypeLabel: nodeTypeLabel,
nodeTypeClass: nodeTypeClass,
shardCount: get(shardStats, `nodes[${sourceNode.uuid}].shardCount`, null),
shardCount: get(shardStats, `nodes[${sourceNode.uuid}].shardCount`, 0),
Copy link
Member

Choose a reason for hiding this comment

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

👍 It looks good to fix the bug this way. It will help the UI make sense of the data and be able to sort it correctly when the table is sorted by number of shards.

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@chrisronline
Copy link
Contributor Author

Looks like a flaky test:

RQXJOYpFJdU5qTaKoEttlJQNnEGQWslOwD8ozaepQAAAA==�[0mproc  [ftr]        │        tryForTime timeout: [POST http://localhost:9515/session/caa409f75c4023f0a3e9192e71e4fee6/element / {"using":"css selector","value":".visualization"}] no such element: Unable to locate element: {"method":"css selector","selector":".visualization"}

jenkins, test this

@elasticmachine
Copy link
Contributor

💔 Build Failed

@chrisronline
Copy link
Contributor Author

jenkins, test this

@elasticmachine
Copy link
Contributor

💔 Build Failed

@pickypg
Copy link
Member

pickypg commented Jul 23, 2018

You might want to try rebasing onto the latest master, @chrisronline.

Copy link
Member

@pickypg pickypg left a comment

Choose a reason for hiding this comment

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

LGTM pending passing tests of course. I agree with Tim that this is a better solution than null.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Member

@tsullivan tsullivan left a comment

Choose a reason for hiding this comment

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

LGTM!

@tsullivan
Copy link
Member

I've seen an issue where this bug was reported in 5.5.3. I don't think this fix will be cleanly backportable that far. Feel free to backport this as far back as it will cleanly merge.

@chrisronline chrisronline merged commit 92dd341 into elastic:master Jul 24, 2018
@chrisronline chrisronline deleted the monitoring/fix/20628 branch July 24, 2018 16:56
chrisronline added a commit to chrisronline/kibana that referenced this pull request Jul 24, 2018
…found (elastic#21000)

* Use 0 as the default for shard count if the node is not found

* Remove debug

* Updating snapshot tests

* Update api integration test
chrisronline added a commit to chrisronline/kibana that referenced this pull request Jul 24, 2018
…found (elastic#21000)

* Use 0 as the default for shard count if the node is not found

* Remove debug

* Updating snapshot tests

* Update api integration test
@chrisronline
Copy link
Contributor Author

@tsullivan It only goes back to 6.3 cleanly so will backport as far as there

chrisronline added a commit that referenced this pull request Jul 25, 2018
…found (#21000) (#21166)

* Use 0 as the default for shard count if the node is not found

* Remove debug

* Updating snapshot tests

* Update api integration test
@chrisronline
Copy link
Contributor Author

chrisronline commented Jul 25, 2018

Backport:

6.x: 1e3d510
6.4: b96fed3
6.3: 9a74f94

chrisronline added a commit that referenced this pull request Jul 25, 2018
…found (#21000) (#21165)

* Use 0 as the default for shard count if the node is not found

* Remove debug

* Updating snapshot tests

* Update api integration test
@rashmivkulkarni
Copy link
Contributor

This didn't make it to 6.4.0 v.
Updating it to 6.4.1 .

cc @chrisronline @LeeDr

chrisronline added a commit to chrisronline/kibana that referenced this pull request Aug 27, 2018
…found (elastic#21000)

* Use 0 as the default for shard count if the node is not found

* Remove debug

* Updating snapshot tests

* Update api integration test
chrisronline added a commit that referenced this pull request Aug 27, 2018
…found (#21000) (#22428)

* Use 0 as the default for shard count if the node is not found

* Remove debug

* Updating snapshot tests

* Update api integration 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.

[Monitoring] Elasticsearch Nodes listing shows blank for nodes with 0 allocated shards
5 participants