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

Include elasticsearch statefulset nodes in availability check #371

Merged

Conversation

pavolloffay
Copy link
Member

Resolves #343

Signed-off-by: Pavol Loffay ploffay@redhat.com

Signed-off-by: Pavol Loffay <ploffay@redhat.com>
@codecov
Copy link

codecov bot commented Apr 10, 2019

Codecov Report

Merging #371 into master will decrease coverage by 0.3%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #371      +/-   ##
==========================================
- Coverage   90.01%   89.71%   -0.31%     
==========================================
  Files          64       64              
  Lines        3076     3093      +17     
==========================================
+ Hits         2769     2775       +6     
- Misses        207      216       +9     
- Partials      100      102       +2
Impacted Files Coverage Δ
pkg/controller/jaeger/elasticsearch.go 50.72% <50%> (-5.05%) ⬇️
pkg/storage/elasticsearch_secrets.go 92.39% <0%> (ø) ⬆️
pkg/account/main.go 100% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2567ae1...c193e1c. Read the comment docs.

@pavolloffay
Copy link
Member Author

The coverage dropped, I think we do not test wait in other controller either. Not sure how to test it either in unit tests.

@@ -83,6 +83,21 @@ func waitForAvailableElastic(c client.Client, es esv1.Elasticsearch) error {
available++
}
}
ssList := corev1.StatefulSetList{}
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the relationship between the deployment above and this stateful set? Is it sufficient to just check the stateful set?

Copy link
Member Author

Choose a reason for hiding this comment

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

SS is used exclusively for only master nodes. The deployments are used for data or other combinations.

return false, err
}
for _, d := range ssList.Items {
available += d.Status.ReadyReplicas
Copy link
Contributor

Choose a reason for hiding this comment

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

That may seem a bit confusing when debugging an issue: when there's a mismatch, which ones aren't ready?

Wouldn't it be better to have two counters, one for the deployments and one for the stateful sets?

Copy link
Member Author

Choose a reason for hiding this comment

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

+1 I have split them into SS and deployments.

Signed-off-by: Pavol Loffay <ploffay@redhat.com>
@pavolloffay pavolloffay merged commit 4174554 into jaegertracing:master Apr 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wait for elasticseach should query also statefulsest
2 participants