[8.10] Fleet - Turn some error messages in info (#164333) (#164429)

# Backport

This will backport the following commits from `main` to `8.10`:
- [Fleet - Turn some error messages in info
(#164333)](https://github.com/elastic/kibana/pull/164333)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Luca
Belluccini","email":"luca.belluccini@elastic.co"},"sourceCommit":{"committedDate":"2023-08-22T11:03:22Z","message":"Fleet
- Turn some error messages in info (#164333)\n\n##
Summary\r\n\r\nProposal to fix
https://github.com/elastic/kibana/issues/164270\r\n\r\n###
Checklist\r\n\r\n- [ ] Possibly evaluate the \"verbosity\" vs
\"troubleshoot-ability\"\r\n- [ ] Backport\r\n\r\nCo-authored-by: Julia
Bardi
<90178898+juliaElastic@users.noreply.github.com>","sha":"79f8dcd90ceaddd0a0f9cc32440a954ae12b5357","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Fleet","v8.10.0","v8.11.0","v8.9.2"],"number":164333,"url":"https://github.com/elastic/kibana/pull/164333","mergeCommit":{"message":"Fleet
- Turn some error messages in info (#164333)\n\n##
Summary\r\n\r\nProposal to fix
https://github.com/elastic/kibana/issues/164270\r\n\r\n###
Checklist\r\n\r\n- [ ] Possibly evaluate the \"verbosity\" vs
\"troubleshoot-ability\"\r\n- [ ] Backport\r\n\r\nCo-authored-by: Julia
Bardi
<90178898+juliaElastic@users.noreply.github.com>","sha":"79f8dcd90ceaddd0a0f9cc32440a954ae12b5357"}},"sourceBranch":"main","suggestedTargetBranches":["8.10","8.9"],"targetPullRequestStates":[{"branch":"8.10","label":"v8.10.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/164333","number":164333,"mergeCommit":{"message":"Fleet
- Turn some error messages in info (#164333)\n\n##
Summary\r\n\r\nProposal to fix
https://github.com/elastic/kibana/issues/164270\r\n\r\n###
Checklist\r\n\r\n- [ ] Possibly evaluate the \"verbosity\" vs
\"troubleshoot-ability\"\r\n- [ ] Backport\r\n\r\nCo-authored-by: Julia
Bardi
<90178898+juliaElastic@users.noreply.github.com>","sha":"79f8dcd90ceaddd0a0f9cc32440a954ae12b5357"}},{"branch":"8.9","label":"v8.9.2","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Luca Belluccini <luca.belluccini@elastic.co>
This commit is contained in:
Kibana Machine 2023-08-22 07:09:23 -04:00 committed by GitHub
parent 4ecdd41d96
commit 85519b9d8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -776,7 +776,7 @@ const updateExistingDataStream = async ({
delete mappings.properties.data_stream;
}
logger.debug(`Updating mappings for ${dataStreamName}`);
logger.info(`Attempt to update the mappings for the ${dataStreamName} (write_index_only)`);
await retryTransientEsErrors(
() =>
esClient.indices.putMapping({
@ -789,9 +789,8 @@ const updateExistingDataStream = async ({
// if update fails, rollover data stream and bail out
} catch (err) {
logger.error(`Mappings update for ${dataStreamName} failed`);
logger.error(err);
logger.info(`Mappings update for ${dataStreamName} failed due to ${err}`);
logger.info(`Triggering a rollover for ${dataStreamName}`);
await rolloverDataStream(dataStreamName, esClient);
return;
}