Conversation
Create a completely separate Supporter when data streams are enabled. If data streams are enabled, ensure that no setup (template, ILM, pipeline) related config is specified.
380e936 to
1bb9da4
Compare
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Steps errors
Expand to view the steps failures
|
Codecov Report
@@ Coverage Diff @@
## master #4449 +/- ##
==========================================
+ Coverage 76.04% 76.07% +0.02%
==========================================
Files 159 160 +1
Lines 9748 9775 +27
==========================================
+ Hits 7413 7436 +23
- Misses 2335 2339 +4
|
|
If data streams are enabled, pipeline registration is disabled and attempting to setup pipelines will fail. No pipeline will be specified when indexing; the pipeline must be specified in the index template. Also, if the server is running managed (by Fleet), the server will fail to start unless data streams are enabled.
1bb9da4 to
dd14171
Compare
simitt
left a comment
There was a problem hiding this comment.
apm-server.ilm.* configurations (including apm-server.ilm.setup.enabled=false and
apm-server.ilm.enabled=false) are not allowed when using datastreams - but configuring setup.template.* is allowed and ignored.
From a migration perspective it might be easier for users if their configurations for ILM and templates were still allowed but ignored (and a warning is logged).
Apart from that - changes look good and on a quick test run work as expected.
Oops, that was an oversight.
That's a good point, I suppose it's a bit friendlier to log warnings instead. I'll update to do that. |
If legacy config is defined along with data streams config, log warnings rather than returning errors. Remove libbeat template setup config overrides and move the overrides into idxmgmt. This is necessary to detect when setup.template is explicitly specified by the user, vs. injected by our code.
|
I broke things by moving the ConditionalOverride stuff, looking into it now. |
simitt
left a comment
There was a problem hiding this comment.
I believe the two failing system tests actually uncover a bug in the current behavior - the APM Server injected changes should not show up as config changes, but they should be part of the exported template (as they are now) - so changing the expectations to fix the tests would be fine.
Perform some gymnastics in order to only set legacy defaults when data streams are not enabled. Migrate "export config" system tests to Go.
|
should we update |
Yes indeed, you make a good point. I should have thought about that a bit harder. I managed to get it to work with config overrides, but it would be better if these defaults don't show up. I'm not sure how we can stop the logging overrides from showing up there. I'll dig a bit more... |
@jalvz IMO we should hold off for now. The initial release will be very experimental, so probably better not to advertise so widely. |
I'm going to pull this out into a separate PR. |
|
jenkins run the tests please |
* idxmgmt: create independent data streams Supporter Create a completely separate Supporter when data streams are enabled. If data streams are enabled, ensure that no setup (template, ILM, pipeline) related config is specified. * beater: enabling data streams disables pipeline If data streams are enabled, pipeline registration is disabled and attempting to setup pipelines will fail. No pipeline will be specified when indexing; the pipeline must be specified in the index template. Also, if the server is running managed (by Fleet), the server will fail to start unless data streams are enabled. * systemtest: add tests for data streams * idxmgmt: log warnings upon finding legacy config If legacy config is defined along with data streams config, log warnings rather than returning errors.
* idxmgmt: create independent data streams Supporter Create a completely separate Supporter when data streams are enabled. If data streams are enabled, ensure that no setup (template, ILM, pipeline) related config is specified. * beater: enabling data streams disables pipeline If data streams are enabled, pipeline registration is disabled and attempting to setup pipelines will fail. No pipeline will be specified when indexing; the pipeline must be specified in the index template. Also, if the server is running managed (by Fleet), the server will fail to start unless data streams are enabled. * systemtest: add tests for data streams * idxmgmt: log warnings upon finding legacy config If legacy config is defined along with data streams config, log warnings rather than returning errors.
|
Tested with BC1
|
Motivation/summary
Separate data streams support from existing index management and selector, and extend config validation to prevent mixing data streams and existing index management config (ILM, pipelines, template setup, index names, etc.)
When the server is running under Agent, it is now necessary for data streams to be enabled. We should inject the config (
-E apm-server.data_streams.enabled) from the program spec.Finally, we introduce system tests to show that with data streams enabled, the server works when given only limited privileges like those given by Fleet.
Checklist
- [ ] I have updated CHANGELOG.asciidocI have considered changes for:
- [ ] documentation(later)- [ ] metrics and monitoring (create issue for Kibana team to add metrics to visualizations, e.g. Kibana#44001)- [ ] telemetry- [ ] Elasticsearch Service (https://cloud.elastic.co)- [ ] Elastic Cloud Enterprise (https://www.elastic.co/products/ece)- [ ] Elastic Cloud on Kubernetes (https://www.elastic.co/elastic-cloud-kubernetes)How to test these changes
apm-server.data_streams.enabled=true, should index intotraces-*etc., with no pipeline specified at index time.apm-server setupwithapm-server.data_streams.enabled=true, should fail.apm-server setup --pipelineswithapm-server.data_streams.enabled=true, should fail.Related issues
#4378