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

Add Enterprise license type #14249

Merged
merged 3 commits into from
Oct 28, 2019
Merged

Conversation

ph
Copy link
Contributor

@ph ph commented Oct 25, 2019

Add the Enterprise license type and regenerate the types files.

Fixes: #14246

Add the Enterprise license type and regenerate the types files.

Fixes: elastic#14246
@ph ph added the needs_backport PR is waiting to be backported to other branches. label Oct 25, 2019
@ph
Copy link
Contributor Author

ph commented Oct 25, 2019

need to be backported to 7.5, 7.x

func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh they changed their method.

@ph
Copy link
Contributor Author

ph commented Oct 25, 2019

@urso After looking at the code, I see that we are not sending an appropriate User-Agent for every HTTP request.

We should send one unique per beats something like Filebeat v7.5.0, Metricbeat v7.5.0, etc.. Looking at the code, I don't see a good way to retrieve the beat name and the version when the ES client is created without linking the version package (assuming that we also add the name there) and the elasticsearch package or doing other refactoring.

The query string options seems less problematic for us.

@urso
Copy link

urso commented Oct 25, 2019

@ph A beat can customize its name and even version. You need access to beat.Info in order to create the UA. Maybe we can add the user agent as paramter to elasticsearch.NewClient or its configure structure. We should do this in a separate PR.

@ph
Copy link
Contributor Author

ph commented Oct 25, 2019

sound good, we already have what we need to do it.

https://github.com/elastic/beats/blob/fleet/agent/kibana/round_trippers.go#L33-L51

@ph ph merged commit 5f06f19 into elastic:master Oct 28, 2019
@ph ph added v7.5.0 and removed needs_backport PR is waiting to be backported to other branches. labels Oct 28, 2019
ph added a commit to ph/beats that referenced this pull request Oct 28, 2019
* Add Enterprise license type

Add the Enterprise license type and regenerate the types files.

Fixes: elastic#14246
(cherry picked from commit 5f06f19)
@ph ph added the v7.6.0 label Oct 28, 2019
ph added a commit to ph/beats that referenced this pull request Oct 28, 2019
* Add Enterprise license type

Add the Enterprise license type and regenerate the types files.

Fixes: elastic#14246
(cherry picked from commit 5f06f19)
ph added a commit that referenced this pull request Oct 28, 2019
* Add Enterprise license type

Add the Enterprise license type and regenerate the types files.

Fixes: #14246
(cherry picked from commit 5f06f19)
@ph ph added the test-plan Add this PR to be manual test plan label Jan 2, 2020
@andresrc andresrc added needs testing notes and removed needs testing notes test-plan Add this PR to be manual test plan labels Jan 14, 2020
@urso urso added the test-plan Add this PR to be manual test plan label Jan 15, 2020
@ph
Copy link
Contributor Author

ph commented Jan 23, 2020

testing license-related check is not a simple task when its not "trial" or "basic", in the linked private issues there are test servers that @bytebilly has created with credentials to be able to tested with a real server. The other way is to use the generated license in the private repository with dev artifact to run a local server. cc @Fae

@faec
Copy link
Contributor

faec commented Jan 24, 2020

Initial test pass succeeded (beats work fine with an enterprise cluster), but turned up some logging issues that @ph is fixing in #15834: we don't currently log the detected license anywhere (beats only report whether the license check was successful, not which license is in use), and some log messages during the license check were being dropped. Will do another test pass once the fix gets in to confirm that enterprise clusters report the correct license.

@faec
Copy link
Contributor

faec commented Feb 6, 2020

The logging changes above made it into today's build candidate, and another testing pass confirmed that everything looks good

@ph
Copy link
Contributor Author

ph commented Feb 6, 2020

Thanks @faec 🎉

jorgemarey pushed a commit to jorgemarey/beats that referenced this pull request Jun 8, 2020
* Add Enterprise license type

Add the Enterprise license type and regenerate the types files.

Fixes: elastic#14246
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
* Add Enterprise license type

Add the Enterprise license type and regenerate the types files.

Fixes: elastic#14246
(cherry picked from commit fbc83dc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs testing notes review test-plan Add this PR to be manual test plan test-plan-ok This PR passed manual testing v7.5.0 v7.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support 'enterprise' license type
4 participants