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

Do not stop running trial even when ECK is not in trial mode #3150

Merged
merged 3 commits into from
May 28, 2020

Conversation

pebrc
Copy link
Collaborator

@pebrc pebrc commented May 27, 2020

Trials on Elasticsearch level can only be started once.
The intention behind this change is to avoid a bad user experience.
We encourage users to start trials via ECK but the Kibana UI also
advertises trials in various places when users try to access commercial features.
We don't want to change the Kibana behaviour to keep this easy way to try out a feature.
This change therefore tolerates a cluster running in trial mode even if ECK's license level
would require us to downgrade this cluster to a Basic license.

Fixes #3141

Trials on Elasticsearch level can only be started once.
The intention behind this change is avoid a bad user experience.
We encourage users to start trials via ECK but the Kibana UI also
advertises trials in various places when users try to access commercial features.
We don't want to change the Kibana behaviour to keep this easy way to try out a feature.
This change therefore tolerates a cluster running in trial mode even if ECK's license level
would require us to downgrade this cluster to a Basic license.
@pebrc pebrc added >enhancement Enhancement of existing functionality v1.2.0 labels May 27, 2020
Copy link
Contributor

@sebgl sebgl left a comment

Choose a reason for hiding this comment

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

LGTM

@pebrc pebrc merged commit 57fdf90 into elastic:master May 28, 2020
sebgl added a commit that referenced this pull request May 29, 2020
)

Fixes #3163.
Fixes a bug introduced in #3150.

We used to rely on the license fetched by the observers on a regular
basis, but this can lead to a race condition as described in
#3163 (comment).

Instead, let's keep things simple, and do a synchronous request to
get the license as part of the normal reconciliation, to then decide
whether or not it should be updated.

In case of error (eg. Elasticsearch req timeout), enqueue a new
reconciliation, but don't abort the current reconciliation.

This PR also adds some minor refactoring of the code, and avoids
a call to start_basic if the current license is already basic.
@charith-elastic charith-elastic changed the title Do not stop running trial even when ECK not in trial mode Do not stop running trial even when ECK is not in trial mode Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement Enhancement of existing functionality v1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ECK should not downgrade trial licensed clusters
2 participants