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

Remove auto option from setup.ilm.enabled and set the default value to true #28671

Merged
merged 4 commits into from
Oct 29, 2021

Conversation

kvch
Copy link
Contributor

@kvch kvch commented Oct 27, 2021

What does this PR do?

This PR removes auto from the available options of setup.ilm.enabled. Previously, auto was used to ease users into using ILM in 7.x by only loading ILM if Elasticsearch supported it.

Why is it important?

With moving to 8.x, the option no longer make sense, because the supported Elasticsearch supports ILM always. Also, as we are adopting data streams, the suggested solution is to use ILM to manage the backing indices of data streams. Thus, I would not like to expose the option of managing indices with Beats without ILM. We should let users skip loading an ILM policy, but we should rely on ILM for index management.

In this PR a moderately complex part of ILM loading is removed. 🎉

Checklist

  • My code follows the style guidelines of this project
    - [ ] I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

@kvch kvch added 8.0-candidate Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team labels Oct 27, 2021
@kvch kvch requested a review from ruflin October 27, 2021 13:36
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Oct 27, 2021
@mergify
Copy link
Contributor

mergify bot commented Oct 27, 2021

This pull request does not have a backport label. Could you fix it @kvch? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 7./d branch. /d is the digit

NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label Oct 27, 2021
@elasticmachine
Copy link
Collaborator

elasticmachine commented Oct 27, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2021-10-28T08:00:50.415+0000

  • Duration: 106 min 38 sec

  • Commit: 18c749d

Test stats 🧪

Test Results
Failed 0
Passed 54080
Skipped 5359
Total 59439

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

@@ -26,7 +26,7 @@ Example configuration:

["source","yaml",subs="attributes"]
----
setup.ilm.enabled: auto
setup.ilm.enabled: true
setup.ilm.rollover_alias: "{beatname_lc}"
Copy link
Member

Choose a reason for hiding this comment

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

As a follow up: As we only have data streams in 8.0, the rollover_alias config can be removed. Deprecate in 7.x?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

return false, errOf(ErrESVersionNotSupported)
}
return false, nil
}

if !enabled && mode == ModeEnabled {
if !enabledILM && enabled {
Copy link
Member

Choose a reason for hiding this comment

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

if enabled == false we should never get to this line of code because of line 96?

}
return avail, probe
func checkILMVersion(ver common.Version) (avail bool) {
return !ver.LessThan(esMinILMVersion)
Copy link
Member

Choose a reason for hiding this comment

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

Just checked in the code what esMinILMVersion and it is 6.6.0, so we will also be able to get rid of this code 🥳

Copy link
Collaborator

Choose a reason for hiding this comment

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

So let's clean this up 👍🏼

@kvch kvch merged commit 39d1541 into elastic:master Oct 29, 2021
Icedroid pushed a commit to Icedroid/beats that referenced this pull request Nov 1, 2021
@kvch kvch added the backport-v8.0.0 Automated backport with mergify label Nov 15, 2021
@mergify mergify bot removed the backport-skip Skip notification from the automated backport with mergify label Nov 15, 2021
mergify bot pushed a commit that referenced this pull request Nov 15, 2021
kvch added a commit that referenced this pull request Nov 15, 2021
…ue to true (#28671) (#28959)

(cherry picked from commit 39d1541)

Co-authored-by: Noémi Ványi <kvch@users.noreply.github.com>
@ghost
Copy link

ghost commented Dec 6, 2021

Hi @kvch,

We have gone through this ticket and tried to locate the proposed changes. However, we are unable to find 'setup.ilm.enabled' property in beats yml files.

Could you please brief us on how to validate the above merged PR.

Thanks,
QAS

@kvch
Copy link
Contributor Author

kvch commented Dec 6, 2021

The option is called setup.ilm.enabled. You can find it in the reference configuration here: https://github.com/elastic/beats/blob/7.16/filebeat/filebeat.reference.yml#L2135
What you need to check is the default value is true and that ILM gets loaded as before.

@ghost
Copy link

ghost commented Dec 7, 2021

Hi @kvch

Thanks for sharing the feedback on our queries.

We are now able to fetch the option under filebeat.reference.yml file in commented form.

Query: can you please confirm if we need to uncomment it from now while doing beats install on 8.0 and also if any other steps are required to perform so that beats data is generated into data streams and not as indices.

Screenshot:
image

Thanks
QAS

@kvch
Copy link
Contributor Author

kvch commented Dec 7, 2021

No need to uncomment it. It is enabled by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.0.0 Automated backport with mergify Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants