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

[Fleet] Set default settings in component template instead of default template #105603

Closed
simitt opened this issue Jul 14, 2021 · 3 comments · Fixed by #111197
Closed

[Fleet] Set default settings in component template instead of default template #105603

simitt opened this issue Jul 14, 2021 · 3 comments · Fixed by #111197
Assignees
Labels
Team:Fleet Team label for Observability Data Collection Fleet team technical debt Improvement of the software architecture and operational architecture v7.16.0

Comments

@simitt
Copy link
Contributor

simitt commented Jul 14, 2021

Kibana version: 7.14.0

Describe the bug:
Fleet installs a custom component template and default component templates for settings and mappings if defined in the package. However, the created index_template always contains index settings for the refresh_interval, number_of_shards, and some others.
Settings defined in an index template can not be overwritten by component templates (see component template docs). Neither the default nor the custom component template can set settings such as number_of_shards, etc. at the moment.

It might be ok to fix some settings directly in the index_template, such as the lifecycle.name, but others such as number_of_shards and routing.* should be adjustable, at least by the package maintainers.

An open question is how this should be handled if nothing is specified in the package that would trigger creating a mapping and setting component template to be created.

Steps to reproduce:

  1. Add some definition like the following to a package's datastream manifest:
elasticsearch:
  index_template:
    settings:
      number_of_replicas: 2
  1. Start a local package registry containing the package changes
  2. Start an environment that is consuming your local package registry and install the package and add it to the an agent policy
  3. Define number_of_replicas: 5 in the @Custom component template
  4. Ensure the data stream for the package is created (by ingesting some data, depending on the package)
  5. Check the index settings (e.g. GET .ds-traces-apm-default-2021.07.14-000003/_settings) and see that the number_of_replicas is still set to 1 although a different value was defined for the package default and for the custom package.

Expected behavior:

Screenshots (if relevant):

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

Any additional context:

@simitt simitt added the bug Fixes for quality problems that affect the customer experience label Jul 14, 2021
@botelastic botelastic bot added the needs-team Issues missing a team label label Jul 14, 2021
@simitt simitt added 7.14.0 Team:Fleet Team label for Observability Data Collection Fleet team labels Jul 14, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@botelastic botelastic bot removed the needs-team Issues missing a team label label Jul 14, 2021
@simitt
Copy link
Contributor Author

simitt commented Jul 14, 2021

@jen-huang while I labeled this a bug for 7.14, it is not a problem for APM right now (will be in 7.15 though); please relabel if this better fits into 7.15.

@ruflin
Copy link
Member

ruflin commented Jul 14, 2021

This also ties into #104620, we might not need most of these settings. Lets push this to 7.15.

@jen-huang jen-huang removed the 7.14.0 label Jul 14, 2021
@jen-huang jen-huang changed the title Fleet sets default settings directly in index_template instead of component templates [Fleet] Default settings are set directly in index_template instead of component templates Jul 20, 2021
@jen-huang jen-huang changed the title [Fleet] Default settings are set directly in index_template instead of component templates [Fleet] Set default settings in component template instead of default template Aug 17, 2021
@jen-huang jen-huang added technical debt Improvement of the software architecture and operational architecture v7.16.0 and removed bug Fixes for quality problems that affect the customer experience labels Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Fleet Team label for Observability Data Collection Fleet team technical debt Improvement of the software architecture and operational architecture v7.16.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants