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

Allow bootstrap plugins to appear in _cat/plugins #66260

Merged
merged 7 commits into from
Dec 17, 2020

Conversation

pugnascotia
Copy link
Contributor

Closes #66107.

Bootstrap plugins are not loaded in the main Elasticsearch process, but
instead take effect only when ES is starting. As such, these plugins are
skipped when ES loads all installed plugins.

As a result, it was impossible for the plugins _cat API to report
whether any bootstrap plugins are installed.

Fix this by adjusting how the loading process skips bootstrap plugins,
and then tweaking the plugins _cat API so that bootstrap plugins can
optionally be included in the response.

Bootstrap plugins are not loaded in the main Elasticsearch process, but
instead take effect only when ES is starting. As such, these plugins are
skipped when ES loads all installed plugins.

As a result, it was impossible for the plugins _cat API to report
whether any bootstrap plugins are installed.

Fix this by adjusting how the loading process skips bootstrap plugins,
and then tweaking the plugins _cat API so that bootstrap plugins can
optionally be included in the response.
@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Dec 14, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@@ -106,12 +113,16 @@ private Table buildTable(RestRequest req, ClusterStateResponse state, NodesInfoR
continue;
}
for (PluginInfo pluginInfo : plugins.getPluginInfos()) {
if (pluginInfo.getType() == PluginType.BOOTSTRAP && includeBootstrapPlugins == false) {
Copy link
Member

Choose a reason for hiding this comment

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

We don't seem to have any unit tests for this class. Would it be possible to add a simple one? The packaging tests added seem to be testing this new flag, but that doesn't seem like the right place, since the flag doesn't directly have anything to do with the quota aware fs plugin, it's just the only example we have so far a bootstrap plugin.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rjernst I've added unit tests, please take a look.

Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @pugnascotia!

@pugnascotia pugnascotia merged commit 4ff6125 into elastic:master Dec 17, 2020
@pugnascotia pugnascotia deleted the cat-api-bootstrap-plugins branch December 17, 2020 09:30
pugnascotia added a commit that referenced this pull request Dec 17, 2020
Closes #66107.

Bootstrap plugins are not loaded in the main Elasticsearch process, but
instead take effect only when ES is starting. As such, these plugins are
skipped when ES loads all installed plugins.

As a result, it was impossible for the plugins _cat API to report
whether any bootstrap plugins are installed.

Fix this by adjusting how the loading process skips bootstrap plugins,
and then tweaking the plugins _cat API so that bootstrap plugins can
optionally be included in the response.
@pugnascotia
Copy link
Contributor Author

Backported to 7.x in d948960. I also adjusted the version skip range in the yml test in master in 1eb50f8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Core Core issues without another label >enhancement Team:Core/Infra Meta label for core/infra team v6.8.14 v7.12.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

_cat/plugins does not list quota-aware-fs plugin
4 participants