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

[Monitoring] Update monitoring template versions #69317

Merged
merged 3 commits into from
Feb 26, 2021

Conversation

axw
Copy link
Member

@axw axw commented Feb 22, 2021

Update monitoring template versions to 7.12.0, to ensure they are replaced on upgrade.

The "local" (default) monitoring exporter checks the version before replacing the template:

// Check that each required template exists, installing it if needed
final List<String> missingTemplates = Arrays.stream(MonitoringTemplateUtils.TEMPLATE_IDS)
.filter(id -> hasTemplate(clusterState, templateName(id)) == false)
.collect(Collectors.toList());
if (missingTemplates.isEmpty() == false) {
logger.debug((Supplier<?>) () -> new ParameterizedMessage("template {} not found", missingTemplates));
for (String templateId : missingTemplates) {
final String templateName = MonitoringTemplateUtils.templateName(templateId);
asyncActions.add(() -> putTemplate(templateName, MonitoringTemplateUtils.loadTemplate(templateId),
new ResponseActionListener<>("template", templateName, pendingResponses)));
}
}

I made a change to .monitoring_beats in #65997, which landed in 7.11.0, but did not update the template version. On master, the "last updated version" is 7.0.0, and on 7.x it is 7.0.1. There have been several other template changes since 7.0.1. IIANM, with rolling upgrades, monitoring templates would not have been updated since 7.0.1.

Update monitoring template versions to 7.11.0, to
ensure they are replaced on upgrade.
@axw
Copy link
Member Author

axw commented Feb 24, 2021

@chrisronline not sure if you can review this or not. If not then I'll try and hunt down someone else who can.

@chrisronline
Copy link
Contributor

cc @jakelandis Do we need to bump this version every time we make mapping changes?

@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label Feb 24, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (Team:Core/Features)

@jakelandis
Copy link
Contributor

Do we need to bump this version every time we make mapping changes?

@chrisronline - yes

@axw - if you are backporting this to 7.12, can you adjust the version here to 7.12 ? It shouldn't make a technical difference, but I can imagine someone looking a support diagnostic and scratching their head why on 7.11 the mappings are not installed. Also maybe a comment in the code that source code was updated in 7.11 but not applied until 7.12 and link to this issue ?

@axw
Copy link
Member Author

axw commented Feb 25, 2021

Thanks @jakelandis, I've updated the version as suggested.

@jakelandis
Copy link
Contributor

@elasticmachine update branch
(looks like the test failure has recently been fixed/muted)

Copy link
Contributor

@jakelandis jakelandis left a comment

Choose a reason for hiding this comment

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

LGTM.

@jakelandis
Copy link
Contributor

@axw - lmk if you bump into any issues merging or backporting.

@axw axw merged commit 0b567d6 into elastic:master Feb 26, 2021
@axw axw deleted the bump-monitoring-template-version branch February 26, 2021 00:55
axw added a commit to axw/elasticsearch that referenced this pull request Feb 26, 2021
* [Monitoring] Update monitoring template versions

Update monitoring template versions to 7.11.0, to
ensure they are replaced on upgrade.

* Change template versions to 7.12.0

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
axw added a commit that referenced this pull request Feb 26, 2021
* [Monitoring] Update monitoring template versions

Update monitoring template versions to 7.11.0, to
ensure they are replaced on upgrade.

* Change template versions to 7.12.0

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
axw added a commit that referenced this pull request Feb 26, 2021
* [Monitoring] Update monitoring template versions

Update monitoring template versions to 7.11.0, to
ensure they are replaced on upgrade.

* Change template versions to 7.12.0

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@axw
Copy link
Member Author

axw commented Feb 26, 2021

Thanks @jakelandis! All done.

@jakelandis jakelandis removed the v8.0.0 label Jul 26, 2021
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.

4 participants