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

Only provision Enterprise licenses as of 7.8.1 #3273

Merged
merged 5 commits into from
Jun 23, 2020

Conversation

pebrc
Copy link
Collaborator

@pebrc pebrc commented Jun 17, 2020

This is to avoid breakage in older clients that call the deprecated
'_xpack' API to query the license level which is not backwards compatible.

  • Do no longer provision Enterprise licenses to clusters < 7.8.1
  • Do not attempt to install platinum or gold licenses into cluster >= 7.8.1 (will lead to errors in the logs as they get rejected, but maybe that is a helpful diagnostic tool? Happy to back that last commit out again)

This is optimistically assuming that the fix is landing in 7.8.1

Fixes #3272

This is to avoid breakage in older clients that call the deprecated
'_xpack' API to query the license level which is not backwards compatible.
@pebrc pebrc added >bug Something isn't working v1.2.0 labels Jun 17, 2020
@anyasabo
Copy link
Contributor

I realized we should update or remove the comment here
https://github.com/elastic/cloud-on-k8s/blob/master/pkg/apis/elasticsearch/v1/fields.go#L43

XPackLicenseUploadTypes = "xpack.license.upload.types" // >= 7.6.0

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

@@ -111,7 +111,7 @@ func xpackConfig(ver version.Version, httpCfg commonv1.HTTPConfig) *CanonicalCon
cfg[esv1.XPackSecurityAuthcRealmsNativeNative1Order] = -99
}

if ver.IsSameOrAfter(version.MustParse("7.6.0")) {
if ver.IsSameOrAfter(version.MustParse("7.8.1")) {
cfg[esv1.XPackLicenseUploadTypes] = []string{
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering what will happen if people do a version upgrade from 7.7.0 (platinum license) to 7.8.1 (requires an Enterprise license). Can they just continue with the existing platinum license, and only a call to refresh the license would be impacted?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This could potentially lead to unpleasant errors in the logs. If the license was still valid everything would be fine. But once it expires or gets close to expire the operator would still try to apply a platinum license to the 7.8.1 cluster which would fail because of the restriction.

I think we should at least not try to apply a platinum license.

@pebrc pebrc requested a review from anyasabo June 18, 2020 15:59
@pebrc
Copy link
Collaborator Author

pebrc commented Jun 23, 2020

Apologies for the back and forth but after sleeping over this I think the last commit which I just reverted might cause more problems than it solves. Leaving the matching logic unchanged gives us a bit more maneuvering space in case things go wrong at the cost of an unhelpful error message.

I think we should think about a more comprehensive approach that would give us seamless bwc compatibility with older licenses but that should be a separate PR.

@pebrc pebrc merged commit 8b8ef0f into elastic:master Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug Something isn't working v1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enterprise license breaks incompatible clients
3 participants