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

[7.10] fix: ensure ES index names are lowercase (#4295) #4303

Merged
merged 1 commit into from
Oct 12, 2020

Conversation

simitt
Copy link
Contributor

@simitt simitt commented Oct 12, 2020

Backports the following commits to 7.10:

Ensure customized index names are always lowercase,
fixing regression introduced with https://github.com/elastic/beats/pull/18854/files

fixes elastic#4294
@codecov-io
Copy link

Codecov Report

Merging #4303 into 7.10 will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             7.10    #4303      +/-   ##
==========================================
+ Coverage   80.25%   80.28%   +0.03%     
==========================================
  Files         158      158              
  Lines        8641     8645       +4     
==========================================
+ Hits         6935     6941       +6     
+ Misses       1706     1704       -2     
Impacted Files Coverage Δ
idxmgmt/supporter.go 84.37% <100.00%> (+0.16%) ⬆️
model/modeldecoder/v2/decoder.go 95.89% <100.00%> (+0.01%) ⬆️
...ack/apm-server/aggregation/txmetrics/aggregator.go 91.51% <0.00%> (ø)
processor/otel/consumer.go 94.00% <0.00%> (+0.44%) ⬆️

@apmmachine
Copy link
Contributor

💚 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

Expand to view the summary

Build stats

  • Build Cause: [Pull request #4303 opened]

  • Start Time: 2020-10-12T08:52:38.311+0000

  • Duration: 27 min 27 sec

Test stats 🧪

Test Results
Failed 0
Passed 4038
Skipped 142
Total 4180

Steps errors 2

Expand to view the steps failures

  • Name: Compress

    • Description: tar --exclude=coverage-files.tgz -czf coverage-files.tgz coverage

    • Duration: 0 min 0 sec

    • Start Time: 2020-10-12T09:08:16.970+0000

    • log

  • Name: Compress

    • Description: tar --exclude=system-tests-linux-files.tgz -czf system-tests-linux-files.tgz system-tests

    • Duration: 0 min 0 sec

    • Start Time: 2020-10-12T09:20:02.855+0000

    • log

@simitt simitt merged commit 1c6ff2d into elastic:7.10 Oct 12, 2020
@axw axw self-assigned this Oct 15, 2020
@axw
Copy link
Member

axw commented Oct 15, 2020

I tested this with apm-integration-testing, using the flag --index-suffix=SHOUTING. This results in a failure to create the template:

localtesting_7.10.0_apm-server | {"level":"error","timestamp":"2020-10-15T09:30:56.471Z","logger":"publisher_pipeline_output","caller":"pipeline/output.go:154","message":"Failed to connect to backoff(elasticsearch(http://elasticsearch:9200)): Connection marked as failed bec
ause the onConnect callback failed: error loading template apm-7.10.0-transaction-SHOUTING: could not load template. Elasticsearch returned: couldn't load template: 400 Bad Request: {\"error\":{\"root_cause\":[{\"type\":\"invalid_index_template_exception\",\"reason\":\"inde
x_template [apm-7.10.0-transaction-SHOUTING] invalid, cause [Validation Failed: 1: name must be lower cased;]\"}],\"type\":\"invalid_index_template_exception\",\"reason\":\"index_template [apm-7.10.0-transaction-SHOUTING] invalid, cause [Validation Failed: 1: name must be l
ower cased;]\"},\"status\":400}. Response body: {\"error\":{\"root_cause\":[{\"type\":\"invalid_index_template_exception\",\"reason\":\"index_template [apm-7.10.0-transaction-SHOUTING] invalid, cause [Validation Failed: 1: name must be lower cased;]\"}],\"type\":\"invalid_i
ndex_template_exception\",\"reason\":\"index_template [apm-7.10.0-transaction-SHOUTING] invalid, cause [Validation Failed: 1: name must be lower cased;]\"},\"status\":400}. Template is: {\n  \"index_patterns\": [\n    \"apm-7.10.0-transaction-SHOUTING*\"\n  ],\n  \"order\":
 2,\n  \"settings\": {\n    \"index\": {\n      \"lifecycle.name\": \"apm-rollover-30-days\",\n      \"lifecycle.rollover_alias\": \"apm-7.10.0-transaction-SHOUTING\"\n    }\n  }\n}"}

Although not exactly the same bug, I'm inclined to reopen to fix this. WDYT @simitt?

@simitt
Copy link
Contributor Author

simitt commented Oct 15, 2020

oh good catch - yes please reopen, I am going to work on a fix for it.

@axw
Copy link
Member

axw commented Oct 15, 2020

Created #4321

@simitt
Copy link
Contributor Author

simitt commented Oct 15, 2020

I don't think we should label this as regression - as this works as expected; rather add #4322 to the test plan (although generally the two fixes go out with 7.9 as bug fixes).

@axw
Copy link
Member

axw commented Oct 16, 2020

Fair point! Removed the label.

@simitt simitt deleted the backport/7.10/pr-4295 branch October 19, 2020 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants