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

Try to reconcile license even in absence of known health status #6278

Merged
merged 1 commit into from
Jan 5, 2023

Conversation

pebrc
Copy link
Collaborator

@pebrc pebrc commented Jan 5, 2023

Fixes #6274

Change the logic so that license reconciliation is attempted as soon as we have endpoints in the K8s service. But only log an error if we think based on the observed cluster health that the license API call should succeed.

  • in case of an expired license the observed health will be 403, and we will try to reconcile the license
  • attempts will be logged by the es client in debug mode
  • if the cluster should respond to requests based on the health status additional logging on errors will happen and a Kubernetes event will be generated. This restriction is motivated by the fact the users get confused by messages like "could not reconcile license" when in fact the underlying issue is that their cluster is down. So this preserves the functionality that Stricter notion of esReacheable: require health response #5796 introduced.

@botelastic botelastic bot added the triage label Jan 5, 2023
@pebrc pebrc added the >bug Something isn't working label Jan 5, 2023
@botelastic botelastic bot removed the triage label Jan 5, 2023
@thbkrkr thbkrkr self-assigned this Jan 5, 2023
Copy link
Contributor

@thbkrkr thbkrkr left a comment

Choose a reason for hiding this comment

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

LGTM

I kind of tested it by tweaking the operator (observer health / license reconciliation error).

@thbkrkr thbkrkr added the v2.7.0 label Jan 5, 2023
@pebrc pebrc merged commit 7c9bb79 into elastic:main Jan 5, 2023
pebrc added a commit to pebrc/cloud-on-k8s that referenced this pull request Jan 9, 2023
@pebrc
Copy link
Collaborator Author

pebrc commented Jan 9, 2023

💚 All backports created successfully

Status Branch Result
2.6

Questions ?

Please refer to the Backport tool documentation

@pebrc pebrc added v2.6.0 and removed v2.7.0 labels Jan 9, 2023
naemono pushed a commit that referenced this pull request Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug Something isn't working v2.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cluster license cannot be updated by ECK if it has already expired
2 participants