diff --git a/.ci/scripts/packaging-test.sh b/.ci/scripts/packaging-test.sh index 1509a2091d29..3b0e41d0c09d 100755 --- a/.ci/scripts/packaging-test.sh +++ b/.ci/scripts/packaging-test.sh @@ -37,11 +37,6 @@ if [ -f "/etc/os-release" ] ; then if [[ "$ID" == "debian" || "$ID_LIKE" == "debian" ]] ; then # FIXME: The base image should not have rpm installed sudo rm -Rf /usr/bin/rpm - # Work around incorrect lintian version - # https://github.com/elastic/elasticsearch/issues/48573 - if [ $VERSION_ID == 10 ] ; then - sudo apt-get install -y --allow-downgrades lintian=2.15.0 - fi fi else cat /etc/issue || true diff --git a/build-tools-internal/src/main/groovy/elasticsearch.ide.gradle b/build-tools-internal/src/main/groovy/elasticsearch.ide.gradle index b36c54328d03..84b35b9a7568 100644 --- a/build-tools-internal/src/main/groovy/elasticsearch.ide.gradle +++ b/build-tools-internal/src/main/groovy/elasticsearch.ide.gradle @@ -88,7 +88,7 @@ if (providers.systemProperty('idea.active').forUseAtConfigurationTime().getOrNul tasks.register('buildDependencyArtifacts') { group = 'ide' description = 'Builds artifacts needed as dependency for IDE modules' - dependsOn ':client:rest-high-level:shadowJar', ':plugins:repository-hdfs:hadoop-client-api:shadowJar', ':plugins:repository-azure:azure-storage-blob:shadowJar' + dependsOn ':client:rest-high-level:shadowJar', ':plugins:repository-hdfs:hadoop-client-api:shadowJar', ':modules:repository-azure:azure-storage-blob:shadowJar' } idea { diff --git a/distribution/docker/build.gradle b/distribution/docker/build.gradle index 0bba047581af..866e0900f54d 100644 --- a/distribution/docker/build.gradle +++ b/distribution/docker/build.gradle @@ -70,8 +70,7 @@ configurations { dockerSource log4jConfig tini - repositoryPlugins - nonRepositoryPlugins + allPlugins filebeat metricbeat cloudflareZlib @@ -85,8 +84,7 @@ dependencies { dockerSource project(path: ":distribution:archives:linux-tar", configuration: 'default') log4jConfig project(path: ":distribution", configuration: 'log4jConfig') tini "krallin:tini:0.19.0:${tiniArch}" - repositoryPlugins project(path: ':plugins', configuration: 'repositoryPlugins') - nonRepositoryPlugins project(path: ':plugins', configuration: 'nonRepositoryPlugins') + allPlugins project(path: ':plugins', configuration: 'allPlugins') filebeat "beats:filebeat:${VersionProperties.elasticsearch}:${beatsArch}@tar.gz" metricbeat "beats:metricbeat:${VersionProperties.elasticsearch}:${beatsArch}@tar.gz" cloudflareZlib "cloudflare:zlib:${cloudflareZlibVersion}@tar.gz" @@ -272,8 +270,6 @@ void addBuildDockerContextTask(Architecture architecture, DockerBase base) { String buildId = providers.systemProperty('build.id').forUseAtConfigurationTime().getOrNull() boolean includeBeats = VersionProperties.isElasticsearchSnapshot() == true || buildId != null - from configurations.repositoryPlugins - if (includeBeats) { from configurations.filebeat from configurations.metricbeat @@ -407,7 +403,7 @@ void addBuildEssDockerImageTask(Architecture architecture) { final Path projectDir = project.projectDir.toPath() into("plugins") { - from configurations.nonRepositoryPlugins + from configurations.allPlugins } from(projectDir.resolve("src/docker/Dockerfile.cloud-ess")) { diff --git a/distribution/docker/src/docker/Dockerfile b/distribution/docker/src/docker/Dockerfile index 37006770c212..6c48eec65ec2 100644 --- a/distribution/docker/src/docker/Dockerfile +++ b/distribution/docker/src/docker/Dockerfile @@ -137,18 +137,6 @@ RUN sed -i -e 's/ES_DISTRIBUTION_TYPE=tar/ES_DISTRIBUTION_TYPE=docker/' bin/elas find config -type f -exec chmod 0664 {} + <% if (docker_base == "cloud") { %> -# Preinstall common plugins. Note that these are installed as root, meaning the `elasticsearch` user cannot delete them. -COPY repository-s3-${version}.zip repository-gcs-${version}.zip repository-azure-${version}.zip /tmp/ -RUN bin/elasticsearch-plugin install --batch --verbose \\ - file:/tmp/repository-s3-${version}.zip \\ - file:/tmp/repository-gcs-${version}.zip \\ - file:/tmp/repository-azure-${version}.zip -# Generate a replacement example plugins config that reflects what is actually installed -RUN echo "plugins:" > config/elasticsearch-plugins.example.yml && \\ - echo " - id: repository-azure" >> config/elasticsearch-plugins.example.yml && \\ - echo " - id: repository-gcs" >> config/elasticsearch-plugins.example.yml && \\ - echo " - id: repository-s3" >> config/elasticsearch-plugins.example.yml - COPY filebeat-${version}.tar.gz metricbeat-${version}.tar.gz /tmp/ RUN set -eux ; \\ for beat in filebeat metricbeat ; do \\ diff --git a/distribution/packages/build.gradle b/distribution/packages/build.gradle index 3d152cc27cf9..a0c7598352e6 100644 --- a/distribution/packages/build.gradle +++ b/distribution/packages/build.gradle @@ -291,8 +291,10 @@ Closure commonDebConfig(String architecture) { return { configure(commonPackageConfig('deb', architecture)) - // jdeb does not provide a way to set the License control attribute, and ospackage - // silently ignores setting it. Instead, we set the license as "custom field" + // jdeb does not provide a way to set the License control attribute, and + // ospackage silently ignores setting it. This is probably because `License` + // is not actually a field in the Debian control file. So instead, we set + // the license as "custom field". customFields['License'] = 'Elastic-License' archiveVersion = project.version.replace('-', '~') diff --git a/distribution/packages/src/common/scripts/postinst b/distribution/packages/src/common/scripts/postinst index 4fe8982053d0..d7cc3b894239 100644 --- a/distribution/packages/src/common/scripts/postinst +++ b/distribution/packages/src/common/scripts/postinst @@ -8,6 +8,8 @@ # $1=0 : indicates a removal # $1=1 : indicates an upgrade +set -e + # source the default env file if [ -f "@path.env@" ]; then . "@path.env@" diff --git a/distribution/packages/src/common/scripts/postrm b/distribution/packages/src/common/scripts/postrm index 81578470c0c9..3251b7c8fe52 100644 --- a/distribution/packages/src/common/scripts/postrm +++ b/distribution/packages/src/common/scripts/postrm @@ -9,6 +9,8 @@ # $1=0 : indicates a removal # $1=1 : indicates an upgrade +set -e + # source the default env file if [ -f "@path.env@" ]; then . "@path.env@" diff --git a/distribution/packages/src/common/scripts/posttrans b/distribution/packages/src/common/scripts/posttrans index c8e922a86597..161294eb5541 100644 --- a/distribution/packages/src/common/scripts/posttrans +++ b/distribution/packages/src/common/scripts/posttrans @@ -1,3 +1,5 @@ +set -e + # source the default env file if [ -f "@path.env@" ]; then . "@path.env@" diff --git a/distribution/packages/src/common/scripts/preinst b/distribution/packages/src/common/scripts/preinst index 76c617933d1c..d6280ad036bb 100644 --- a/distribution/packages/src/common/scripts/preinst +++ b/distribution/packages/src/common/scripts/preinst @@ -10,6 +10,8 @@ # $1=1 : indicates an new install # $1=2 : indicates an upgrade +set -e + err_exit() { echo "$@" >&2 exit 1 diff --git a/distribution/packages/src/common/scripts/prerm b/distribution/packages/src/common/scripts/prerm index 58d470a22c92..418482a8e8f0 100644 --- a/distribution/packages/src/common/scripts/prerm +++ b/distribution/packages/src/common/scripts/prerm @@ -9,6 +9,8 @@ # $1=0 : indicates a removal # $1=1 : indicates an upgrade +set -e + # source the default env file if [ -f "@path.env@" ]; then . "@path.env@" diff --git a/distribution/packages/src/deb/lintian/elasticsearch b/distribution/packages/src/deb/lintian/elasticsearch index 5f4126de1333..84c7ba3d2485 100644 --- a/distribution/packages/src/deb/lintian/elasticsearch +++ b/distribution/packages/src/deb/lintian/elasticsearch @@ -1,10 +1,12 @@ # we don't have a changelog, but we put our copyright file # under /usr/share/doc/elasticsearch, which triggers this warning +# Note that this is renamed to `no-changelog` in newer versions of +# lintian, but we still support Debian 8+, so we can't change this. changelog-file-missing-in-native-package # we intentionally copy our copyright file for all deb packages copyright-file-contains-full-apache-2-license -copyright-should-refer-to-common-license-file-for-apache-2 +copyright-not-using-common-license-for-apache2 copyright-without-copyright-notice # we still put all our files under /usr/share/elasticsearch even after transition to platform dependent packages @@ -21,7 +23,7 @@ non-standard-file-perm etc/elasticsearch/* non-standard-dir-perm var/lib/elasticsearch/ 2750 != 0755 non-standard-dir-perm var/log/elasticsearch/ 2750 != 0755 -# this lintian tag is simply wrong; contrary to the explanation, debian systemd +# this lintian tag is simply wrong; contrary to the explanation, Debian systemd # does actually look at /usr/lib/systemd/system systemd-service-file-outside-lib usr/lib/systemd/system/elasticsearch.service @@ -30,7 +32,6 @@ maintainer-script-calls-systemctl # bundled JDK embedded-library -arch-dependent-file-in-usr-share usr/share/elasticsearch/jdk/* unstripped-binary-or-object usr/share/elasticsearch/jdk/* extra-license-file usr/share/elasticsearch/jdk/legal/* hardening-no-pie usr/share/elasticsearch/jdk/bin/* @@ -41,3 +42,12 @@ unknown-java-class-version # elastic licensed modules contain elastic license extra-license-file usr/share/elasticsearch/modules/* + +# This dependency appears to have a packaging flaw, and includes a +# generated source file alongside the compiled version +jar-contains-source usr/share/elasticsearch/modules/repository-gcs/api-common*.jar * + +# There's no `License` field in Debian control files, but earlier versions +# of `lintian` were more permissive. Override this warning so that we can +# run `lintian` on different releases of Debian. +unknown-field elasticsearch-*.deb License diff --git a/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/cli/InstallPluginAction.java b/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/cli/InstallPluginAction.java index 02e25ac865b4..b5e508c7d550 100644 --- a/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/cli/InstallPluginAction.java +++ b/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/cli/InstallPluginAction.java @@ -153,6 +153,13 @@ public class InstallPluginAction implements Closeable { } } + /** + * IDs of plugins that have been migrated to modules and do not require installation. This data is + * maintained so that existing user workflows that install these plugins do not need to be updated + * immediately. + */ + public static final Set PLUGINS_CONVERTED_TO_MODULES = Set.of("repository-azure", "repository-gcs", "repository-s3"); + static final Set BIN_DIR_PERMS; static final Set BIN_FILES_PERMS; static final Set CONFIG_DIR_PERMS; @@ -219,6 +226,15 @@ public class InstallPluginAction implements Closeable { handleInstallXPack(buildFlavor()); } + if (PLUGINS_CONVERTED_TO_MODULES.contains(pluginId)) { + // This deliberately does not throw an exception in order to avoid failing automation that relies on installing this + // plugin during deployment. + terminal.errorPrintln( + "[" + pluginId + "] is no longer a plugin but instead a module packaged with this distribution of Elasticsearch" + ); + continue; + } + final List deleteOnFailure = new ArrayList<>(); deleteOnFailures.put(pluginId, deleteOnFailure); diff --git a/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/cli/PluginDescriptor.java b/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/cli/PluginDescriptor.java index 06b054716732..da33d76a9f6b 100644 --- a/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/cli/PluginDescriptor.java +++ b/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/cli/PluginDescriptor.java @@ -8,6 +8,8 @@ package org.elasticsearch.plugins.cli; +import org.elasticsearch.common.Strings; + import java.util.Objects; /** @@ -27,7 +29,7 @@ public class PluginDescriptor { * coordinates. Can be null for official plugins. */ public PluginDescriptor(String id, String location) { - this.id = Objects.requireNonNull(id, "id cannot be null"); + this.id = Strings.requireNonBlank(id, "plugin id cannot be null or blank"); this.location = location; } @@ -40,7 +42,7 @@ public class PluginDescriptor { } public void setId(String id) { - this.id = id; + this.id = Strings.requireNonBlank(id, "plugin id cannot be null or blank"); } public String getLocation() { diff --git a/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/cli/PluginsConfig.java b/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/cli/PluginsConfig.java index c6b54be941de..a9a8cc66d562 100644 --- a/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/cli/PluginsConfig.java +++ b/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/cli/PluginsConfig.java @@ -8,6 +8,7 @@ package org.elasticsearch.plugins.cli; +import org.elasticsearch.common.Strings; import org.elasticsearch.xcontent.ObjectParser; import org.elasticsearch.xcontent.ParseField; import org.elasticsearch.xcontent.XContent; @@ -57,10 +58,12 @@ public class PluginsConfig { * * * @param officialPlugins the plugins that can be installed by name only + * @param migratedPlugins plugins that were once official but have since become modules. These + * plugin IDs can still be specified, but do nothing. * @throws PluginSyncException if validation problems are found */ - public void validate(Set officialPlugins) throws PluginSyncException { - if (this.plugins.stream().anyMatch(each -> each == null || each.getId() == null || each.getId().isBlank())) { + public void validate(Set officialPlugins, Set migratedPlugins) throws PluginSyncException { + if (this.plugins.stream().anyMatch(each -> each == null || Strings.isNullOrBlank(each.getId()))) { throw new RuntimeException("Cannot have null or empty IDs in [elasticsearch-plugins.yml]"); } @@ -72,7 +75,9 @@ public class PluginsConfig { } for (PluginDescriptor plugin : this.plugins) { - if (officialPlugins.contains(plugin.getId()) == false && plugin.getLocation() == null) { + if (officialPlugins.contains(plugin.getId()) == false + && migratedPlugins.contains(plugin.getId()) == false + && plugin.getLocation() == null) { throw new PluginSyncException( "Must specify location for non-official plugin [" + plugin.getId() + "] in [elasticsearch-plugins.yml]" ); diff --git a/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/cli/RemovePluginAction.java b/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/cli/RemovePluginAction.java index 0d195b61c131..21f52072e64a 100644 --- a/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/cli/RemovePluginAction.java +++ b/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/cli/RemovePluginAction.java @@ -26,10 +26,10 @@ import java.util.Locale; import java.util.Map; import java.util.Set; import java.util.StringJoiner; -import java.util.stream.Collectors; import java.util.stream.Stream; import static org.elasticsearch.cli.Terminal.Verbosity.VERBOSE; +import static org.elasticsearch.plugins.cli.InstallPluginAction.PLUGINS_CONVERTED_TO_MODULES; /** * An action for the plugin CLI to remove plugins from Elasticsearch. @@ -116,6 +116,7 @@ public class RemovePluginAction { private void checkCanRemove(PluginDescriptor plugin) throws UserException { String pluginId = plugin.getId(); + final Path pluginDir = env.pluginsFile().resolve(pluginId); final Path pluginConfigDir = env.configFile().resolve(pluginId); final Path removing = env.pluginsFile().resolve(".removing-" + pluginId); @@ -127,12 +128,19 @@ public class RemovePluginAction { */ if ((Files.exists(pluginDir) == false && Files.exists(pluginConfigDir) == false && Files.exists(removing) == false) || (Files.exists(pluginDir) == false && Files.exists(pluginConfigDir) && this.purge == false)) { - final String message = String.format( - Locale.ROOT, - "plugin [%s] not found; run 'elasticsearch-plugin list' to get list of installed plugins", - pluginId - ); - throw new UserException(ExitCodes.CONFIG, message); + + if (PLUGINS_CONVERTED_TO_MODULES.contains(pluginId)) { + terminal.errorPrintln( + "plugin [" + pluginId + "] is no longer a plugin but instead a module packaged with this distribution of Elasticsearch" + ); + } else { + final String message = String.format( + Locale.ROOT, + "plugin [%s] not found; run 'elasticsearch-plugin list' to get list of installed plugins", + pluginId + ); + throw new UserException(ExitCodes.CONFIG, message); + } } final Path pluginBinDir = env.binFile().resolve(pluginId); @@ -159,7 +167,7 @@ public class RemovePluginAction { */ if (Files.exists(pluginDir)) { try (Stream paths = Files.list(pluginDir)) { - pluginPaths.addAll(paths.collect(Collectors.toList())); + pluginPaths.addAll(paths.toList()); } terminal.println(VERBOSE, "removing [" + pluginDir + "]"); } @@ -167,7 +175,7 @@ public class RemovePluginAction { final Path pluginBinDir = env.binFile().resolve(pluginId); if (Files.exists(pluginBinDir)) { try (Stream paths = Files.list(pluginBinDir)) { - pluginPaths.addAll(paths.collect(Collectors.toList())); + pluginPaths.addAll(paths.toList()); } pluginPaths.add(pluginBinDir); terminal.println(VERBOSE, "removing [" + pluginBinDir + "]"); @@ -176,7 +184,7 @@ public class RemovePluginAction { if (Files.exists(pluginConfigDir)) { if (this.purge) { try (Stream paths = Files.list(pluginConfigDir)) { - pluginPaths.addAll(paths.collect(Collectors.toList())); + pluginPaths.addAll(paths.toList()); } pluginPaths.add(pluginConfigDir); terminal.println(VERBOSE, "removing [" + pluginConfigDir + "]"); diff --git a/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/cli/SyncPluginsAction.java b/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/cli/SyncPluginsAction.java index ec12b3cedd3b..8e418609f2e0 100644 --- a/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/cli/SyncPluginsAction.java +++ b/distribution/tools/plugin-cli/src/main/java/org/elasticsearch/plugins/cli/SyncPluginsAction.java @@ -24,6 +24,8 @@ import java.nio.file.DirectoryStream; import java.nio.file.Files; import java.nio.file.Path; import java.util.ArrayList; +import java.util.Comparator; +import java.util.Iterator; import java.util.List; import java.util.Locale; import java.util.Map; @@ -91,7 +93,7 @@ public class SyncPluginsAction implements PluginsSynchronizer { // Parse descriptor file final PluginsConfig pluginsConfig = PluginsConfig.parseConfig(configPath, YamlXContent.yamlXContent); - pluginsConfig.validate(InstallPluginAction.OFFICIAL_PLUGINS); + pluginsConfig.validate(InstallPluginAction.OFFICIAL_PLUGINS, InstallPluginAction.PLUGINS_CONVERTED_TO_MODULES); // Parse cached descriptor file, if it exists final Optional cachedPluginsConfig = Files.exists(previousConfigPath) @@ -115,7 +117,8 @@ public class SyncPluginsAction implements PluginsSynchronizer { PluginChanges getPluginChanges(PluginsConfig pluginsConfig, Optional cachedPluginsConfig) throws PluginSyncException { final List existingPlugins = getExistingPlugins(); - final List pluginsThatShouldExist = pluginsConfig.getPlugins(); + final List pluginsThatShouldExist = getPluginsThatShouldExist(pluginsConfig); + final List pluginsThatActuallyExist = existingPlugins.stream() .map(info -> new PluginDescriptor(info.getName())) .collect(Collectors.toList()); @@ -131,9 +134,42 @@ public class SyncPluginsAction implements PluginsSynchronizer { final List pluginsToUpgrade = getPluginsToUpgrade(pluginsToMaybeUpgrade, cachedPluginsConfig, existingPlugins); + pluginsToRemove.sort(Comparator.comparing(PluginDescriptor::getId)); + pluginsToInstall.sort(Comparator.comparing(PluginDescriptor::getId)); + pluginsToMaybeUpgrade.sort(Comparator.comparing(PluginDescriptor::getId)); + return new PluginChanges(pluginsToRemove, pluginsToInstall, pluginsToUpgrade); } + /** + * Fetch the plugins that ought to be installed, according to the config file. For plugins that + * have migrated to modules, in order to help transition it's OK to still specify these plugins + * in the config file, but they will have no effect. Indeed, any existing plugin installation + * will also be removed, leaving only the module. + *

+ * Why don't we just leave the modularized plugins in this list and allow `InstallPluginAction` + * to print a warning? The problem with doing that is that the sync process wouldn't remove the + * old plugins. Instead, we remove them from the list, meaning that they will be uninstalled if + * they are currently installed. However, this also means that we need to emit our own warning + * that installation by plugin is deprecated. + */ + private List getPluginsThatShouldExist(PluginsConfig pluginsConfig) { + final List pluginsThatShouldExist = new ArrayList<>(pluginsConfig.getPlugins()); + + final Iterator shouldExistIterator = pluginsThatShouldExist.iterator(); + while (shouldExistIterator.hasNext()) { + final PluginDescriptor each = shouldExistIterator.next(); + if (InstallPluginAction.PLUGINS_CONVERTED_TO_MODULES.contains(each.getId())) { + terminal.errorPrintln( + "[" + each.getId() + "] is no longer a plugin but instead a module packaged with this distribution of Elasticsearch" + ); + shouldExistIterator.remove(); + } + } + + return pluginsThatShouldExist; + } + private void performSync(PluginsConfig pluginsConfig, PluginChanges changes) throws Exception { final Proxy proxy = ProxyUtils.buildProxy(pluginsConfig.getProxy()); @@ -283,7 +319,7 @@ public class SyncPluginsAction implements PluginsSynchronizer { private void logRequiredChanges(PluginChanges changes) { final BiConsumer> printSummary = (action, plugins) -> { if (plugins.isEmpty() == false) { - List pluginIds = plugins.stream().map(PluginDescriptor::getId).collect(Collectors.toList()); + List pluginIds = plugins.stream().map(PluginDescriptor::getId).toList(); this.terminal.errorPrintln(String.format(Locale.ROOT, "Plugins to be %s: %s", action, pluginIds)); } }; diff --git a/distribution/tools/plugin-cli/src/test/java/org/elasticsearch/plugins/cli/InstallPluginActionTests.java b/distribution/tools/plugin-cli/src/test/java/org/elasticsearch/plugins/cli/InstallPluginActionTests.java index c926a4b98674..d922ff82d656 100644 --- a/distribution/tools/plugin-cli/src/test/java/org/elasticsearch/plugins/cli/InstallPluginActionTests.java +++ b/distribution/tools/plugin-cli/src/test/java/org/elasticsearch/plugins/cli/InstallPluginActionTests.java @@ -781,8 +781,8 @@ public class InstallPluginActionTests extends ESTestCase { UserException e = expectThrows(UserException.class, () -> installPlugin("analysis-smartnc")); assertThat(e.getMessage(), containsString("Unknown plugin analysis-smartnc, did you mean [analysis-smartcn]?")); - e = expectThrows(UserException.class, () -> installPlugin("repository")); - assertThat(e.getMessage(), containsString("Unknown plugin repository, did you mean any of [repository-s3, repository-gcs]?")); + e = expectThrows(UserException.class, () -> installPlugin("discovery-ec")); + assertThat(e.getMessage(), containsString("Unknown plugin discovery-ec, did you mean any of [discovery-ec2, discovery-gce]?")); e = expectThrows(UserException.class, () -> installPlugin("unknown_plugin")); assertThat(e.getMessage(), containsString("Unknown plugin unknown_plugin")); @@ -1424,4 +1424,15 @@ public class InstallPluginActionTests extends ESTestCase { installPlugin(pluginZip); assertPlugin("fake-with-deps", pluginDir, env.v2()); } + + /** + * Check that plugins that have been migrated to modules do not cause an error on installation, bit + * instead simply print a message to the terminal. + */ + public void testInstallMigratedPlugins() throws Exception { + for (String id : List.of("repository-azure", "repository-gcs", "repository-s3")) { + installPlugin(id); + assertThat(terminal.getErrorOutput(), containsString("[" + id + "] is no longer a plugin")); + } + } } diff --git a/distribution/tools/plugin-cli/src/test/java/org/elasticsearch/plugins/cli/PluginsConfigTests.java b/distribution/tools/plugin-cli/src/test/java/org/elasticsearch/plugins/cli/PluginsConfigTests.java new file mode 100644 index 000000000000..59ccf92e60ac --- /dev/null +++ b/distribution/tools/plugin-cli/src/test/java/org/elasticsearch/plugins/cli/PluginsConfigTests.java @@ -0,0 +1,118 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +package org.elasticsearch.plugins.cli; + +import org.elasticsearch.test.ESTestCase; + +import java.util.ArrayList; +import java.util.List; +import java.util.Set; +import java.util.stream.Stream; + +import static org.hamcrest.Matchers.equalTo; + +public class PluginsConfigTests extends ESTestCase { + + /** + * Check that an empty config object passes validation. + */ + public void test_validate_acceptsEmptyConfig() throws PluginSyncException { + PluginsConfig config = new PluginsConfig(); + config.validate(Set.of(), Set.of()); + } + + /** + * Check that validation rejects a null plugin descriptor. + */ + public void test_validate_rejectsNullDescriptor() { + PluginsConfig config = new PluginsConfig(); + List descriptors = new ArrayList<>(); + descriptors.add(null); + config.setPlugins(descriptors); + final Exception e = expectThrows(RuntimeException.class, () -> config.validate(Set.of(), Set.of())); + assertThat(e.getMessage(), equalTo("Cannot have null or empty IDs in [elasticsearch-plugins.yml]")); + } + + /** + * Check that validation rejects a null plugin descriptor. + */ + public void test_validate_rejectsDescriptorWithNullId() { + PluginsConfig config = new PluginsConfig(); + config.setPlugins(List.of(new PluginDescriptor())); + final Exception e = expectThrows(RuntimeException.class, () -> config.validate(Set.of(), Set.of())); + assertThat(e.getMessage(), equalTo("Cannot have null or empty IDs in [elasticsearch-plugins.yml]")); + } + + /** + * Check that validation rejects duplicate plugin IDs. + */ + public void test_validate_rejectsDuplicatePluginId() { + PluginsConfig config = new PluginsConfig(); + config.setPlugins(List.of(new PluginDescriptor("foo"), new PluginDescriptor("foo"))); + final Exception e = expectThrows(PluginSyncException.class, () -> config.validate(Set.of(), Set.of())); + assertThat(e.getMessage(), equalTo("Duplicate plugin ID [foo] found in [elasticsearch-plugins.yml]")); + } + + /** + * Check that validation rejects unofficial plugins without a location + */ + public void test_validate_rejectsUnofficialPluginWithoutLocation() { + PluginsConfig config = new PluginsConfig(); + config.setPlugins(List.of(new PluginDescriptor("foo"))); + final Exception e = expectThrows(PluginSyncException.class, () -> config.validate(Set.of(), Set.of())); + assertThat(e.getMessage(), equalTo("Must specify location for non-official plugin [foo] in [elasticsearch-plugins.yml]")); + } + + /** + * Check that validation rejects unofficial plugins with a blank location + */ + public void test_validate_rejectsUnofficialPluginWithBlankLocation() { + PluginsConfig config = new PluginsConfig(); + config.setPlugins(List.of(new PluginDescriptor("foo", " "))); + final Exception e = expectThrows(PluginSyncException.class, () -> config.validate(Set.of(), Set.of())); + assertThat(e.getMessage(), equalTo("Empty location for plugin [foo]")); + } + + /** + * Check that validation rejects unofficial plugins with a blank location + */ + public void test_validate_rejectsMalformedProxy() { + List examples = List.of("foo:bar:baz:8080", ":8080", "foo:", "foo:bar"); + + for (String example : examples) { + PluginsConfig config = new PluginsConfig(); + config.setProxy(example); + Exception e = expectThrows(PluginSyncException.class, () -> config.validate(Set.of(), Set.of())); + assertThat(e.getMessage(), equalTo("Malformed [proxy], expected [host:port] in [elasticsearch-plugins.yml]")); + } + } + + /** + * Check that official plugin IDs are accepted. + */ + public void test_validate_allowsOfficialPlugin() throws PluginSyncException { + PluginsConfig config = new PluginsConfig(); + config.setPlugins(List.of(new PluginDescriptor("analysis-icu"))); + config.validate(Set.of("analysis-icu"), Set.of()); + } + + /** + * Check that official plugins that have been migrated to modules are still accepted, despite + * no longer being plugins. + */ + public void test_validate_allowsMigratedPlugin() throws PluginSyncException { + final List descriptors = Stream.of("azure", "gcs", "s3") + .map(each -> new PluginDescriptor("repository-" + each)) + .toList(); + PluginsConfig config = new PluginsConfig(); + config.setPlugins(descriptors); + + config.validate(Set.of(), Set.of("repository-azure", "repository-gcs", "repository-s3")); + } +} diff --git a/distribution/tools/plugin-cli/src/test/java/org/elasticsearch/plugins/cli/RemovePluginActionTests.java b/distribution/tools/plugin-cli/src/test/java/org/elasticsearch/plugins/cli/RemovePluginActionTests.java index e93f230bb65b..fc1155f6de74 100644 --- a/distribution/tools/plugin-cli/src/test/java/org/elasticsearch/plugins/cli/RemovePluginActionTests.java +++ b/distribution/tools/plugin-cli/src/test/java/org/elasticsearch/plugins/cli/RemovePluginActionTests.java @@ -35,6 +35,7 @@ import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.not; import static org.hamcrest.CoreMatchers.nullValue; import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.is; @LuceneTestCase.SuppressFileSystems("*") public class RemovePluginActionTests extends ESTestCase { @@ -271,6 +272,47 @@ public class RemovePluginActionTests extends ESTestCase { removePlugin("fake", home, randomBoolean()); } + /** + * Check that if a plugin exists that has since been migrated to a module, then it is still possible + * to remove that plugin. + */ + public void testRemoveMigratedPluginsWhenInstalled() throws Exception { + for (String id : List.of("repository-azure", "repository-gcs", "repository-s3")) { + createPlugin(id); + Files.createFile(env.pluginsFile().resolve(id).resolve("plugin.jar")); + final MockTerminal terminal = removePlugin(id, home, randomBoolean()); + + assertThat(Files.exists(env.pluginsFile().resolve(id)), is(false)); + // This message shouldn't be printed if plugin was actually installed. + assertThat(terminal.getErrorOutput(), not(containsString("plugin [" + id + "] is no longer a plugin"))); + } + } + + /** + * Check that if we attempt to remove a plugin that has been migrated to a module, and that plugin is + * not actually installed, then we print an appropriate message and exit with a success code. + */ + public void testRemoveMigratedPluginsWhenNotInstalled() throws Exception { + for (String id : List.of("repository-azure", "repository-gcs", "repository-s3")) { + final MockTerminal terminal = removePlugin(id, home, randomBoolean()); + assertThat(terminal.getErrorOutput(), containsString("plugin [" + id + "] is no longer a plugin")); + } + } + + /** + * Check that when removing (1) a regular, installed plugin and (2) an uninstalled plugin that has been migrated + * to a module, then the overall removal succeeds, and a message is printed about the migrated pluging. + */ + public void testRemoveRegularInstalledPluginAndMigratedUninstalledPlugin() throws Exception { + createPlugin("fake"); + Files.createFile(env.pluginsFile().resolve("fake").resolve("plugin.jar")); + + final MockTerminal terminal = removePlugin(List.of("fake", "repository-s3"), home, randomBoolean()); + + assertThat(Files.exists(env.pluginsFile().resolve("fake")), is(false)); + assertThat(terminal.getErrorOutput(), containsString("plugin [repository-s3] is no longer a plugin")); + } + private String expectedConfigDirPreservedMessage(final Path configDir) { return "-> preserving plugin config files [" + configDir + "] in case of upgrade; use --purge if not needed"; } diff --git a/distribution/tools/plugin-cli/src/test/java/org/elasticsearch/plugins/cli/SyncPluginsActionTests.java b/distribution/tools/plugin-cli/src/test/java/org/elasticsearch/plugins/cli/SyncPluginsActionTests.java index c1c46d5e63c1..a2abc644b96c 100644 --- a/distribution/tools/plugin-cli/src/test/java/org/elasticsearch/plugins/cli/SyncPluginsActionTests.java +++ b/distribution/tools/plugin-cli/src/test/java/org/elasticsearch/plugins/cli/SyncPluginsActionTests.java @@ -28,6 +28,7 @@ import java.nio.file.Path; import java.util.List; import java.util.Optional; +import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; @@ -42,6 +43,7 @@ public class SyncPluginsActionTests extends ESTestCase { private Environment env; private SyncPluginsAction action; private PluginsConfig config; + private MockTerminal terminal; @Override @Before @@ -55,7 +57,8 @@ public class SyncPluginsActionTests extends ESTestCase { Files.createDirectories(env.configFile()); Files.createDirectories(env.pluginsFile()); - action = new SyncPluginsAction(new MockTerminal(), env); + terminal = new MockTerminal(); + action = new SyncPluginsAction(terminal, env); config = new PluginsConfig(); } @@ -187,6 +190,51 @@ public class SyncPluginsActionTests extends ESTestCase { assertThat(pluginChanges.upgrade.get(0).getId(), equalTo("my-plugin")); } + /** + * Check that the config file can still specify plugins that have been migrated to modules, but + * they are ignored. + */ + public void test_getPluginChanges_withModularisedPluginsToInstall_ignoresPlugins() throws Exception { + config.setPlugins( + List.of(new PluginDescriptor("repository-azure"), new PluginDescriptor("repository-gcs"), new PluginDescriptor("repository-s3")) + ); + + final PluginChanges pluginChanges = action.getPluginChanges(config, Optional.empty()); + + assertThat(pluginChanges.isEmpty(), is(true)); + for (String plugin : List.of("repository-azure", "repository-gcs", "repository-s3")) { + assertThat( + terminal.getErrorOutput(), + containsString( + "[" + plugin + "] is no longer a plugin but instead a module packaged with this distribution of Elasticsearch" + ) + ); + } + } + + /** + * Check that if there are plugins already installed that have been migrated to modules, then they are removed, + * even if they are specified in the config file. + */ + public void test_getPluginChanges_withModularisedPluginsToRemove_removesPlugins() throws Exception { + createPlugin("repository-azure"); + createPlugin("repository-gcs"); + createPlugin("repository-s3"); + config.setPlugins( + List.of(new PluginDescriptor("repository-azure"), new PluginDescriptor("repository-gcs"), new PluginDescriptor("repository-s3")) + ); + + final PluginChanges pluginChanges = action.getPluginChanges(config, Optional.empty()); + + assertThat(pluginChanges.isEmpty(), is(false)); + assertThat(pluginChanges.install, empty()); + assertThat(pluginChanges.remove, hasSize(3)); + assertThat(pluginChanges.upgrade, empty()); + assertThat(pluginChanges.remove.get(0).getId(), equalTo("repository-azure")); + assertThat(pluginChanges.remove.get(1).getId(), equalTo("repository-gcs")); + assertThat(pluginChanges.remove.get(2).getId(), equalTo("repository-s3")); + } + /** * Check that if there are no changes to apply, then the install and remove actions are not used. * This is a redundant test, really, because the sync action exits early if there are no diff --git a/docs/changelog/81870.yaml b/docs/changelog/81870.yaml new file mode 100644 index 000000000000..a606ee2b26f8 --- /dev/null +++ b/docs/changelog/81870.yaml @@ -0,0 +1,6 @@ +pr: 81870 +summary: Convert repository plugins to modules +area: Infra/Plugins +type: enhancement +issues: + - 81652 diff --git a/docs/plugins/plugin-script.asciidoc b/docs/plugins/plugin-script.asciidoc index c0d1956a4467..aff95d804175 100644 --- a/docs/plugins/plugin-script.asciidoc +++ b/docs/plugins/plugin-script.asciidoc @@ -126,12 +126,11 @@ sudo bin/elasticsearch-plugin install [plugin_id] [plugin_id] ... [plugin_id] Each `plugin_id` can be any valid form for installing a single plugin (e.g., the name of a core plugin, or a custom URL). -For instance, to install the core <>, and -<> run the following command: +For instance, to install the core <>, run the following command: [source,shell] ----------------------------------- -sudo bin/elasticsearch-plugin install analysis-icu repository-s3 +sudo bin/elasticsearch-plugin install analysis-icu ----------------------------------- This command will install the versions of the plugins that matches your diff --git a/docs/plugins/redirects.asciidoc b/docs/plugins/redirects.asciidoc index a5de5c9cd993..c691ac488558 100644 --- a/docs/plugins/redirects.asciidoc +++ b/docs/plugins/redirects.asciidoc @@ -18,7 +18,7 @@ Looking for a hosted solution for Elasticsearch on AWS? Check out https://www.el The Elasticsearch `cloud-aws` plugin has been split into two separate plugins: * <> (`discovery-ec2`) -* <> (`repository-s3`) +* {ref}/repository-s3.html[`repository-s3`] [role="exclude",id="cloud-azure"] === Azure Cloud Plugin @@ -26,7 +26,7 @@ The Elasticsearch `cloud-aws` plugin has been split into two separate plugins: The `cloud-azure` plugin has been split into two separate plugins: * <> (`discovery-azure-classic`) -* <> (`repository-azure`) +* {ref}/repository-azure.html[`repository-azure`] [role="exclude",id="cloud-gce"] diff --git a/docs/plugins/repository.asciidoc b/docs/plugins/repository.asciidoc index 58da220862bb..61716e5f6a05 100644 --- a/docs/plugins/repository.asciidoc +++ b/docs/plugins/repository.asciidoc @@ -6,27 +6,17 @@ functionality in Elasticsearch by adding repositories backed by the cloud or by distributed file systems: [discrete] -==== Core repository plugins +==== Offical repository plugins -The core repository plugins are: +NOTE: Support for S3, GCS and Azure repositories is now bundled in {es} by +default. -<>:: - -The S3 repository plugin adds support for using S3 as a repository. - -<>:: - -The Azure repository plugin adds support for using Azure as a repository. +The official repository plugins are: <>:: The Hadoop HDFS Repository plugin adds support for using HDFS as a repository. -<>:: - -The GCS repository plugin adds support for using Google Cloud Storage service as a repository. - - [discrete] === Community contributed repository plugins @@ -34,11 +24,4 @@ The following plugin has been contributed by our community: * https://github.com/BigDataBoutique/elasticsearch-repository-swift[Openstack Swift] (by Wikimedia Foundation and BigData Boutique) - -include::repository-azure.asciidoc[] - -include::repository-s3.asciidoc[] - include::repository-hdfs.asciidoc[] - -include::repository-gcs.asciidoc[] diff --git a/docs/reference/migration/migrate_8_0.asciidoc b/docs/reference/migration/migrate_8_0.asciidoc index 65989836fe68..d67595de2b5d 100644 --- a/docs/reference/migration/migrate_8_0.asciidoc +++ b/docs/reference/migration/migrate_8_0.asciidoc @@ -36,6 +36,7 @@ include::migrate_8_0/logging-changes.asciidoc[] include::migrate_8_0/mapping-changes.asciidoc[] include::migrate_8_0/packaging-changes.asciidoc[] include::migrate_8_0/painless-changes.asciidoc[] +include::migrate_8_0/plugin-changes.asciidoc[] include::migrate_8_0/rest-api-changes.asciidoc[] include::migrate_8_0/system-req-changes.asciidoc[] include::migrate_8_0/transform.asciidoc[] @@ -94,7 +95,7 @@ The `elasticsearch-setup-passwords` tool is deprecated in 8.0. To manually reset the password for built-in users (including the `elastic` user), use the {ref}/reset-password.html[`elasticsearch-reset-password`] tool, the {es} {ref}/security-api-change-password.html[change passwords API], or the -User Management features in {kib}. +User Management features in {kib}. `elasticsearch-setup-passwords` will be removed in a future release. *Impact* + diff --git a/docs/reference/migration/migrate_8_0/plugin-changes.asciidoc b/docs/reference/migration/migrate_8_0/plugin-changes.asciidoc new file mode 100644 index 000000000000..f4ac2bcf6a9a --- /dev/null +++ b/docs/reference/migration/migrate_8_0/plugin-changes.asciidoc @@ -0,0 +1,48 @@ +[discrete] +[[breaking_80_plugin_changes]] +==== Plugin changes + +//NOTE: The notable-breaking-changes tagged regions are re-used in the +//Installation and Upgrade Guide + +//tag::notable-breaking-changes[] +TIP: {ess-skip-section} + +.The S3, GCS and Azure repository plugins are now included in Elasticsearch +[%collapsible] +==== +*Details* + +In previous versions of {es}, in order to register a snapshot repository +backed by Amazon S3, Google Cloud Storge (GCS) or Microsoft Azure Blob +Storage, you first had to install the corresponding Elasticsearch plugin, +for example `repository-s3`. These plugins are now included in {es} by +default. + +*Impact* + +You no longer need to install the following plugins, and not should attempt +to do so. + +* `repository-azure` +* `repository-gcs` +* `repository-s3` + +{es} and the `elasticsearch-plugin` CLI tool have been changed to tolerate +attempted installation and removal of these plugins in order to avoid +breaking any existing automation. In the future, attempting to install +these plugins will be an error. + +Specifically, the `elasticsearch-plugin` CLI tool will not fail if you +attempt to install any of the above plugins, and will instead print a +warning and skip the plugins. If any of these plugins are already +installed, for example because you installed them when running an older +version of {es}, then you can still remove them with +`elasticsearch-plugin`. Attempting to remove them if they are not installed +will succeed but print a warnings. + +If you run {es} using Docker and you are managing plugins using a +{plugins}/manage-plugins-using-configuration-file.html[configuration file], then when +{es} first starts after you upgrade it, it will remove the above plugins if +they already installed. If any of these plugins are specified in your +configuration file, {es} will ignore them and emit a warning log message. +==== +//end::notable-breaking-changes[] diff --git a/docs/reference/searchable-snapshots/index.asciidoc b/docs/reference/searchable-snapshots/index.asciidoc index 56724b6c8aa7..084ef69f0292 100644 --- a/docs/reference/searchable-snapshots/index.asciidoc +++ b/docs/reference/searchable-snapshots/index.asciidoc @@ -75,16 +75,15 @@ For more complex or time-consuming searches, you can use <> with // tag::searchable-snapshot-repo-types[] Use any of the following repository types with searchable snapshots: -* {plugins}/repository-s3.html[AWS S3] -* {plugins}/repository-gcs.html[Google Cloud Storage] -* {plugins}/repository-azure.html[Azure Blob Storage] +* <> +* <> +* <> * {plugins}/repository-hdfs.html[Hadoop Distributed File Store (HDFS)] * <> such as NFS * <> You can also use alternative implementations of these repository types, for -instance -{plugins}/repository-s3-client.html#repository-s3-compatible-services[MinIO], +instance <>, as long as they are fully compatible. Use the <> API to analyze your repository's suitability for use with searchable snapshots. // end::searchable-snapshot-repo-types[] diff --git a/docs/reference/setup/secure-settings.asciidoc b/docs/reference/setup/secure-settings.asciidoc index 019208f42d00..53cc6618a8e9 100644 --- a/docs/reference/setup/secure-settings.asciidoc +++ b/docs/reference/setup/secure-settings.asciidoc @@ -55,9 +55,9 @@ call instead of reloading after each modification. There are reloadable secure settings for: -* {plugins}/repository-azure-client-settings.html[The Azure repository plugin] +* <> * {plugins}/discovery-ec2-usage.html#_configuring_ec2_discovery[The EC2 discovery plugin] -* {plugins}/repository-gcs-client.html[The GCS repository plugin] -* {plugins}/repository-s3-client.html[The S3 repository plugin] +* <> +* <> * <> * <> diff --git a/docs/reference/snapshot-restore/apis/get-repo-api.asciidoc b/docs/reference/snapshot-restore/apis/get-repo-api.asciidoc index 68c3b3dd0ec5..ecc8d896a5b6 100644 --- a/docs/reference/snapshot-restore/apis/get-repo-api.asciidoc +++ b/docs/reference/snapshot-restore/apis/get-repo-api.asciidoc @@ -97,13 +97,11 @@ URL repository. See <>. More repository types are available through these official plugins: -* {plugins}/repository-s3.html[repository-s3] for S3 repository support +* <> for S3 repository support * {plugins}/repository-hdfs.html[repository-hdfs] for HDFS repository support in Hadoop environments -* {plugins}/repository-azure.html[repository-azure] for Azure storage - repositories -* {plugins}/repository-gcs.html[repository-gcs] for Google Cloud Storage - repositories +* <> for Azure storage repositories +* <> for Google Cloud Storage repositories -- `settings`:: diff --git a/docs/reference/snapshot-restore/apis/put-repo-api.asciidoc b/docs/reference/snapshot-restore/apis/put-repo-api.asciidoc index 21f1fe2dddc7..b18a045d34c8 100644 --- a/docs/reference/snapshot-restore/apis/put-repo-api.asciidoc +++ b/docs/reference/snapshot-restore/apis/put-repo-api.asciidoc @@ -124,13 +124,11 @@ See <>. More repository types are available through these official plugins: -* {plugins}/repository-s3.html[repository-s3] for S3 repository support +* <> for S3 repository support * {plugins}/repository-hdfs.html[repository-hdfs] for HDFS repository support in Hadoop environments -* {plugins}/repository-azure.html[repository-azure] for Azure storage - repositories -* {plugins}/repository-gcs.html[repository-gcs] for Google Cloud Storage - repositories +* <> for Azure storage repositories +* <> for Google Cloud Storage repositories -- [[put-snapshot-repo-api-settings-param]] diff --git a/docs/reference/snapshot-restore/register-repository.asciidoc b/docs/reference/snapshot-restore/register-repository.asciidoc index 7498ec283174..68b4bf4f52c8 100644 --- a/docs/reference/snapshot-restore/register-repository.asciidoc +++ b/docs/reference/snapshot-restore/register-repository.asciidoc @@ -106,6 +106,9 @@ clusters]. If you run the {es} on your own hardware, you can use the following built-in snapshot repository types: +* <> +* <> +* <> * <> * <> * <> @@ -113,10 +116,7 @@ snapshot repository types: [[snapshots-repository-plugins]] Other repository types are available through official plugins: -* {plugins}/repository-s3.html[AWS S3] -* {plugins}/repository-gcs.html[Google Cloud Storage (GCS)] * {plugins}/repository-hdfs.html[Hadoop Distributed File System (HDFS)] -* {plugins}/repository-azure.html[Microsoft Azure] You can also use alternative implementations of these repository types, such as MinIO, as long as they're compatible. To verify a repository's compatibility, @@ -335,3 +335,10 @@ When restoring a repository from a backup, you must not register the repository with {es} until the repository contents are fully restored. If you alter the contents of a repository while it is registered with {es} then the repository may become unreadable or may silently lose some of its contents. + + +include::repository-s3.asciidoc[] + +include::repository-gcs.asciidoc[] + +include::repository-azure.asciidoc[] diff --git a/docs/plugins/repository-azure.asciidoc b/docs/reference/snapshot-restore/repository-azure.asciidoc similarity index 96% rename from docs/plugins/repository-azure.asciidoc rename to docs/reference/snapshot-restore/repository-azure.asciidoc index e1e18df23d1e..5d82ddb3da72 100644 --- a/docs/plugins/repository-azure.asciidoc +++ b/docs/reference/snapshot-restore/repository-azure.asciidoc @@ -1,12 +1,9 @@ [[repository-azure]] -=== Azure Repository Plugin +=== Azure Repository -The Azure Repository plugin adds support for using https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction[Azure Blob storage] as a repository for +You can use https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction[Azure Blob storage] as a repository for {ref}/modules-snapshots.html[Snapshot/Restore]. -:plugin_name: repository-azure -include::install_remove.asciidoc[] - [[repository-azure-usage]] ==== Azure Repository @@ -35,7 +32,7 @@ For more information about these settings, see [IMPORTANT] .Supported Azure Storage Account types =============================================== -The Azure Repository plugin works with all Standard storage accounts +The Azure repository type works with all Standard storage accounts * Standard Locally Redundant Storage - `Standard_LRS` * Standard Zone-Redundant Storage - `Standard_ZRS` diff --git a/docs/plugins/repository-gcs.asciidoc b/docs/reference/snapshot-restore/repository-gcs.asciidoc similarity index 92% rename from docs/plugins/repository-gcs.asciidoc rename to docs/reference/snapshot-restore/repository-gcs.asciidoc index 9720c1ebc3ac..215dc23bbcb5 100644 --- a/docs/plugins/repository-gcs.asciidoc +++ b/docs/reference/snapshot-restore/repository-gcs.asciidoc @@ -1,16 +1,13 @@ [[repository-gcs]] -=== Google Cloud Storage Repository Plugin +=== Google Cloud Storage Repository -The GCS repository plugin adds support for using the https://cloud.google.com/storage/[Google Cloud Storage] +You can use the https://cloud.google.com/storage/[Google Cloud Storage] service as a repository for {ref}/modules-snapshots.html[Snapshot/Restore]. -:plugin_name: repository-gcs -include::install_remove.asciidoc[] - [[repository-gcs-usage]] ==== Getting started -The plugin uses the https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-clients/google-cloud-storage[Google Cloud Java Client for Storage] +This repository type uses the https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-clients/google-cloud-storage[Google Cloud Java Client for Storage] to connect to the Storage service. If you are using https://cloud.google.com/storage/[Google Cloud Storage] for the first time, you must connect to the https://console.cloud.google.com/[Google Cloud Platform Console] @@ -23,8 +20,8 @@ Cloud Storage Service for your project. The Google Cloud Storage service uses the concept of a https://cloud.google.com/storage/docs/key-terms[bucket] as a container for all the data. Buckets are usually created using the -https://console.cloud.google.com/[Google Cloud Platform Console]. The plugin -does not automatically create buckets. +https://console.cloud.google.com/[Google Cloud Platform Console]. This +repository type does not automatically create buckets. To create a new bucket: @@ -43,10 +40,10 @@ https://cloud.google.com/storage/docs/quickstart-console#create_a_bucket[Google [[repository-gcs-service-authentication]] ===== Service Authentication -The plugin must authenticate the requests it makes to the Google Cloud Storage +The repository must authenticate the requests it makes to the Google Cloud Storage service. It is common for Google client libraries to employ a strategy named https://cloud.google.com/docs/authentication/production#providing_credentials_to_your_application[application default credentials]. However, that strategy is only **partially supported** by Elasticsearch. The -plugin operates under the Elasticsearch process, which runs with the security +repository operates under the Elasticsearch process, which runs with the security manager enabled. The security manager obstructs the "automatic" credential discovery when the environment variable `GOOGLE_APPLICATION_CREDENTIALS` is used to point to a local file on disk. It can, however, retrieve the service account that is attached to @@ -62,7 +59,7 @@ You have to obtain and provide https://cloud.google.com/iam/docs/overview#servic manually. For detailed information about generating JSON service account files, see the https://cloud.google.com/storage/docs/authentication?hl=en#service_accounts[Google Cloud documentation]. -Note that the PKCS12 format is not supported by this plugin. +Note that the PKCS12 format is not supported by this repository type. Here is a summary of the steps: @@ -93,7 +90,7 @@ A JSON service account file looks like this: ---- // NOTCONSOLE -To provide this file to the plugin, it must be stored in the {ref}/secure-settings.html[Elasticsearch keystore]. You must +To provide this file to the repository, it must be stored in the {ref}/secure-settings.html[Elasticsearch keystore]. You must add a `file` setting with the name `gcs.client.NAME.credentials_file` using the `add-file` subcommand. `NAME` is the name of the client configuration for the repository. The implicit client name is `default`, but a different client name can be specified in the diff --git a/docs/plugins/repository-s3.asciidoc b/docs/reference/snapshot-restore/repository-s3.asciidoc similarity index 96% rename from docs/plugins/repository-s3.asciidoc rename to docs/reference/snapshot-restore/repository-s3.asciidoc index 1be15458e244..25f05bb5e281 100644 --- a/docs/plugins/repository-s3.asciidoc +++ b/docs/reference/snapshot-restore/repository-s3.asciidoc @@ -1,20 +1,16 @@ [[repository-s3]] -=== S3 Repository Plugin +=== S3 Repository -The S3 repository plugin adds support for using AWS S3 as a repository for -{ref}/modules-snapshots.html[Snapshot/Restore]. +You can use AWS S3 as a repository for {ref}/modules-snapshots.html[Snapshot/Restore]. *If you are looking for a hosted solution of Elasticsearch on AWS, please visit https://www.elastic.co/cloud/.* -:plugin_name: repository-s3 -include::install_remove.asciidoc[] - [[repository-s3-usage]] ==== Getting Started -The plugin provides a repository type named `s3` which may be used when creating -a repository. The repository defaults to using +To register an S3 repository, specify the type as `s3` when creating +the repository. The repository defaults to using https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html[ECS IAM Role] or https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html[EC2 @@ -84,7 +80,7 @@ bin/elasticsearch-keystore remove s3.client.default.secret_key bin/elasticsearch-keystore remove s3.client.default.session_token ---- -*All* client secure settings of this plugin are +*All* client secure settings of this repository type are {ref}/secure-settings.html#reloadable-secure-settings[reloadable]. After you reload the settings, the internal `s3` clients, used to transfer the snapshot contents, will utilize the latest settings from the keystore. Any existing `s3` @@ -125,7 +121,7 @@ settings belong in the `elasticsearch.yml` file. `protocol`:: The protocol to use to connect to S3. Valid values are either `http` or - `https`. Defaults to `https`. When using HTTPS, this plugin validates the + `https`. Defaults to `https`. When using HTTPS, this repository type validates the repository's certificate chain using the JVM-wide truststore. Ensure that the root certificate authority is in this truststore using the JVM's `keytool` tool. @@ -208,7 +204,7 @@ pattern then you should set this setting to `true` when upgrading. ===== S3-compatible services There are a number of storage systems that provide an S3-compatible API, and -the `repository-s3` plugin allows you to use these systems in place of AWS S3. +the `repository-s3` type allows you to use these systems in place of AWS S3. To do so, you should set the `s3.client.CLIENT_NAME.endpoint` setting to the system's endpoint. This setting accepts IP addresses and hostnames and may include a port. For example, the endpoint may be `172.17.0.2` or @@ -216,13 +212,13 @@ include a port. For example, the endpoint may be `172.17.0.2` or `http` if the endpoint does not support HTTPS. https://minio.io[MinIO] is an example of a storage system that provides an -S3-compatible API. The `repository-s3` plugin allows {es} to work with +S3-compatible API. The `repository-s3` type allows {es} to work with MinIO-backed repositories as well as repositories stored on AWS S3. Other S3-compatible storage systems may also work with {es}, but these are not covered by the {es} test suite. Note that some storage systems claim to be S3-compatible without correctly -supporting the full S3 API. The `repository-s3` plugin requires full +supporting the full S3 API. The `repository-s3` type requires full compatibility with S3. In particular it must support the same set of API endpoints, return the same errors in case of failures, and offer a consistency model no weaker than S3's when accessed concurrently by multiple nodes. @@ -328,8 +324,8 @@ include::repository-shared-settings.asciidoc[] storage class for newly created objects, resulting in a mixed usage of storage classes. Additionally, S3 Lifecycle Policies can be used to manage the storage class of existing objects. Due to the extra complexity with the - Glacier class lifecycle, it is not currently supported by the plugin. For - more information about the different classes, see + Glacier class lifecycle, it is not currently supported by this + repository type. For more information about the different classes, see https://docs.aws.amazon.com/AmazonS3/latest/dev/storage-class-intro.html[AWS Storage Classes Guide] diff --git a/docs/reference/snapshot-restore/repository-shared-settings.asciidoc b/docs/reference/snapshot-restore/repository-shared-settings.asciidoc new file mode 100644 index 000000000000..2a4753abee45 --- /dev/null +++ b/docs/reference/snapshot-restore/repository-shared-settings.asciidoc @@ -0,0 +1,12 @@ +`max_restore_bytes_per_sec`:: + + Throttles per node restore rate. Defaults to unlimited. + Note that restores are also throttled through {ref}/recovery.html[recovery settings]. + +`max_snapshot_bytes_per_sec`:: + + Throttles per node snapshot rate. Defaults to `40mb` per second. + +`readonly`:: + + Makes repository read-only. Defaults to `false`. diff --git a/modules/build.gradle b/modules/build.gradle index 57f7495d8713..b499f1001b01 100644 --- a/modules/build.gradle +++ b/modules/build.gradle @@ -22,7 +22,4 @@ configure(subprojects.findAll { it.parent.path == project.path }) { if (project.file('src/main/bin').exists()) { throw new InvalidModelException("Modules cannot contain bin files") } - if (project.file('src/main/config').exists()) { - throw new InvalidModelException("Modules cannot contain config files") - } } diff --git a/plugins/repository-azure/azure-storage-blob/build.gradle b/modules/repository-azure/azure-storage-blob/build.gradle similarity index 100% rename from plugins/repository-azure/azure-storage-blob/build.gradle rename to modules/repository-azure/azure-storage-blob/build.gradle diff --git a/plugins/repository-azure/build.gradle b/modules/repository-azure/build.gradle similarity index 100% rename from plugins/repository-azure/build.gradle rename to modules/repository-azure/build.gradle diff --git a/plugins/repository-azure/licenses/azure-LICENSE.txt b/modules/repository-azure/licenses/azure-LICENSE.txt similarity index 100% rename from plugins/repository-azure/licenses/azure-LICENSE.txt rename to modules/repository-azure/licenses/azure-LICENSE.txt diff --git a/plugins/repository-azure/licenses/azure-NOTICE.txt b/modules/repository-azure/licenses/azure-NOTICE.txt similarity index 100% rename from plugins/repository-azure/licenses/azure-NOTICE.txt rename to modules/repository-azure/licenses/azure-NOTICE.txt diff --git a/plugins/repository-azure/licenses/azure-core-1.10.0.jar.sha1 b/modules/repository-azure/licenses/azure-core-1.10.0.jar.sha1 similarity index 100% rename from plugins/repository-azure/licenses/azure-core-1.10.0.jar.sha1 rename to modules/repository-azure/licenses/azure-core-1.10.0.jar.sha1 diff --git a/plugins/repository-azure/licenses/azure-core-http-netty-1.6.3.jar.sha1 b/modules/repository-azure/licenses/azure-core-http-netty-1.6.3.jar.sha1 similarity index 100% rename from plugins/repository-azure/licenses/azure-core-http-netty-1.6.3.jar.sha1 rename to modules/repository-azure/licenses/azure-core-http-netty-1.6.3.jar.sha1 diff --git a/plugins/repository-azure/licenses/azure-storage-common-12.9.0.jar.sha1 b/modules/repository-azure/licenses/azure-storage-common-12.9.0.jar.sha1 similarity index 100% rename from plugins/repository-azure/licenses/azure-storage-common-12.9.0.jar.sha1 rename to modules/repository-azure/licenses/azure-storage-common-12.9.0.jar.sha1 diff --git a/plugins/repository-azure/licenses/jackson-LICENSE b/modules/repository-azure/licenses/jackson-LICENSE similarity index 100% rename from plugins/repository-azure/licenses/jackson-LICENSE rename to modules/repository-azure/licenses/jackson-LICENSE diff --git a/plugins/repository-azure/licenses/jackson-NOTICE b/modules/repository-azure/licenses/jackson-NOTICE similarity index 100% rename from plugins/repository-azure/licenses/jackson-NOTICE rename to modules/repository-azure/licenses/jackson-NOTICE diff --git a/plugins/repository-azure/licenses/jackson-annotations-2.10.4.jar.sha1 b/modules/repository-azure/licenses/jackson-annotations-2.10.4.jar.sha1 similarity index 100% rename from plugins/repository-azure/licenses/jackson-annotations-2.10.4.jar.sha1 rename to modules/repository-azure/licenses/jackson-annotations-2.10.4.jar.sha1 diff --git a/plugins/repository-azure/licenses/jackson-databind-2.10.4.jar.sha1 b/modules/repository-azure/licenses/jackson-databind-2.10.4.jar.sha1 similarity index 100% rename from plugins/repository-azure/licenses/jackson-databind-2.10.4.jar.sha1 rename to modules/repository-azure/licenses/jackson-databind-2.10.4.jar.sha1 diff --git a/plugins/repository-azure/licenses/jackson-dataformat-xml-2.10.4.jar.sha1 b/modules/repository-azure/licenses/jackson-dataformat-xml-2.10.4.jar.sha1 similarity index 100% rename from plugins/repository-azure/licenses/jackson-dataformat-xml-2.10.4.jar.sha1 rename to modules/repository-azure/licenses/jackson-dataformat-xml-2.10.4.jar.sha1 diff --git a/plugins/repository-azure/licenses/jackson-datatype-jsr310-2.10.4.jar.sha1 b/modules/repository-azure/licenses/jackson-datatype-jsr310-2.10.4.jar.sha1 similarity index 100% rename from plugins/repository-azure/licenses/jackson-datatype-jsr310-2.10.4.jar.sha1 rename to modules/repository-azure/licenses/jackson-datatype-jsr310-2.10.4.jar.sha1 diff --git a/plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.10.4.jar.sha1 b/modules/repository-azure/licenses/jackson-module-jaxb-annotations-2.10.4.jar.sha1 similarity index 100% rename from plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.10.4.jar.sha1 rename to modules/repository-azure/licenses/jackson-module-jaxb-annotations-2.10.4.jar.sha1 diff --git a/plugins/repository-azure/licenses/jakarta.activation-api-1.2.1.jar.sha1 b/modules/repository-azure/licenses/jakarta.activation-api-1.2.1.jar.sha1 similarity index 100% rename from plugins/repository-azure/licenses/jakarta.activation-api-1.2.1.jar.sha1 rename to modules/repository-azure/licenses/jakarta.activation-api-1.2.1.jar.sha1 diff --git a/plugins/repository-azure/licenses/jakarta.activation-api-LICENSE.txt b/modules/repository-azure/licenses/jakarta.activation-api-LICENSE.txt similarity index 100% rename from plugins/repository-azure/licenses/jakarta.activation-api-LICENSE.txt rename to modules/repository-azure/licenses/jakarta.activation-api-LICENSE.txt diff --git a/plugins/repository-azure/licenses/jakarta.activation-api-NOTICE.txt b/modules/repository-azure/licenses/jakarta.activation-api-NOTICE.txt similarity index 100% rename from plugins/repository-azure/licenses/jakarta.activation-api-NOTICE.txt rename to modules/repository-azure/licenses/jakarta.activation-api-NOTICE.txt diff --git a/plugins/repository-azure/licenses/jakarta.xml.bind-api-2.3.2.jar.sha1 b/modules/repository-azure/licenses/jakarta.xml.bind-api-2.3.2.jar.sha1 similarity index 100% rename from plugins/repository-azure/licenses/jakarta.xml.bind-api-2.3.2.jar.sha1 rename to modules/repository-azure/licenses/jakarta.xml.bind-api-2.3.2.jar.sha1 diff --git a/plugins/repository-azure/licenses/jakarta.xml.bind-api-LICENSE.txt b/modules/repository-azure/licenses/jakarta.xml.bind-api-LICENSE.txt similarity index 100% rename from plugins/repository-azure/licenses/jakarta.xml.bind-api-LICENSE.txt rename to modules/repository-azure/licenses/jakarta.xml.bind-api-LICENSE.txt diff --git a/plugins/repository-azure/licenses/jakarta.xml.bind-api-NOTICE.txt b/modules/repository-azure/licenses/jakarta.xml.bind-api-NOTICE.txt similarity index 100% rename from plugins/repository-azure/licenses/jakarta.xml.bind-api-NOTICE.txt rename to modules/repository-azure/licenses/jakarta.xml.bind-api-NOTICE.txt diff --git a/plugins/repository-azure/licenses/netty-LICENSE.txt b/modules/repository-azure/licenses/netty-LICENSE.txt similarity index 100% rename from plugins/repository-azure/licenses/netty-LICENSE.txt rename to modules/repository-azure/licenses/netty-LICENSE.txt diff --git a/plugins/repository-azure/licenses/netty-NOTICE.txt b/modules/repository-azure/licenses/netty-NOTICE.txt similarity index 100% rename from plugins/repository-azure/licenses/netty-NOTICE.txt rename to modules/repository-azure/licenses/netty-NOTICE.txt diff --git a/plugins/repository-azure/licenses/netty-buffer-4.1.66.Final.jar.sha1 b/modules/repository-azure/licenses/netty-buffer-4.1.66.Final.jar.sha1 similarity index 100% rename from plugins/repository-azure/licenses/netty-buffer-4.1.66.Final.jar.sha1 rename to modules/repository-azure/licenses/netty-buffer-4.1.66.Final.jar.sha1 diff --git a/plugins/repository-azure/licenses/netty-codec-4.1.66.Final.jar.sha1 b/modules/repository-azure/licenses/netty-codec-4.1.66.Final.jar.sha1 similarity index 100% rename from plugins/repository-azure/licenses/netty-codec-4.1.66.Final.jar.sha1 rename to modules/repository-azure/licenses/netty-codec-4.1.66.Final.jar.sha1 diff --git a/plugins/repository-azure/licenses/netty-codec-http-4.1.66.Final.jar.sha1 b/modules/repository-azure/licenses/netty-codec-http-4.1.66.Final.jar.sha1 similarity index 100% rename from plugins/repository-azure/licenses/netty-codec-http-4.1.66.Final.jar.sha1 rename to modules/repository-azure/licenses/netty-codec-http-4.1.66.Final.jar.sha1 diff --git a/plugins/repository-azure/licenses/netty-codec-http2-4.1.66.Final.jar.sha1 b/modules/repository-azure/licenses/netty-codec-http2-4.1.66.Final.jar.sha1 similarity index 100% rename from plugins/repository-azure/licenses/netty-codec-http2-4.1.66.Final.jar.sha1 rename to modules/repository-azure/licenses/netty-codec-http2-4.1.66.Final.jar.sha1 diff --git a/plugins/repository-azure/licenses/netty-codec-socks-4.1.66.Final.jar.sha1 b/modules/repository-azure/licenses/netty-codec-socks-4.1.66.Final.jar.sha1 similarity index 100% rename from plugins/repository-azure/licenses/netty-codec-socks-4.1.66.Final.jar.sha1 rename to modules/repository-azure/licenses/netty-codec-socks-4.1.66.Final.jar.sha1 diff --git a/plugins/repository-azure/licenses/netty-common-4.1.66.Final.jar.sha1 b/modules/repository-azure/licenses/netty-common-4.1.66.Final.jar.sha1 similarity index 100% rename from plugins/repository-azure/licenses/netty-common-4.1.66.Final.jar.sha1 rename to modules/repository-azure/licenses/netty-common-4.1.66.Final.jar.sha1 diff --git a/plugins/repository-azure/licenses/netty-handler-4.1.66.Final.jar.sha1 b/modules/repository-azure/licenses/netty-handler-4.1.66.Final.jar.sha1 similarity index 100% rename from plugins/repository-azure/licenses/netty-handler-4.1.66.Final.jar.sha1 rename to modules/repository-azure/licenses/netty-handler-4.1.66.Final.jar.sha1 diff --git a/plugins/repository-azure/licenses/netty-handler-proxy-4.1.66.Final.jar.sha1 b/modules/repository-azure/licenses/netty-handler-proxy-4.1.66.Final.jar.sha1 similarity index 100% rename from plugins/repository-azure/licenses/netty-handler-proxy-4.1.66.Final.jar.sha1 rename to modules/repository-azure/licenses/netty-handler-proxy-4.1.66.Final.jar.sha1 diff --git a/plugins/repository-azure/licenses/netty-resolver-4.1.66.Final.jar.sha1 b/modules/repository-azure/licenses/netty-resolver-4.1.66.Final.jar.sha1 similarity index 100% rename from plugins/repository-azure/licenses/netty-resolver-4.1.66.Final.jar.sha1 rename to modules/repository-azure/licenses/netty-resolver-4.1.66.Final.jar.sha1 diff --git a/plugins/repository-azure/licenses/netty-transport-4.1.66.Final.jar.sha1 b/modules/repository-azure/licenses/netty-transport-4.1.66.Final.jar.sha1 similarity index 100% rename from plugins/repository-azure/licenses/netty-transport-4.1.66.Final.jar.sha1 rename to modules/repository-azure/licenses/netty-transport-4.1.66.Final.jar.sha1 diff --git a/plugins/repository-azure/licenses/reactive-streams-1.0.3.jar.sha1 b/modules/repository-azure/licenses/reactive-streams-1.0.3.jar.sha1 similarity index 100% rename from plugins/repository-azure/licenses/reactive-streams-1.0.3.jar.sha1 rename to modules/repository-azure/licenses/reactive-streams-1.0.3.jar.sha1 diff --git a/plugins/repository-azure/licenses/reactive-streams-LICENSE.txt b/modules/repository-azure/licenses/reactive-streams-LICENSE.txt similarity index 100% rename from plugins/repository-azure/licenses/reactive-streams-LICENSE.txt rename to modules/repository-azure/licenses/reactive-streams-LICENSE.txt diff --git a/plugins/repository-azure/licenses/reactive-streams-NOTICE.txt b/modules/repository-azure/licenses/reactive-streams-NOTICE.txt similarity index 100% rename from plugins/repository-azure/licenses/reactive-streams-NOTICE.txt rename to modules/repository-azure/licenses/reactive-streams-NOTICE.txt diff --git a/plugins/repository-azure/licenses/reactor-core-3.3.10.RELEASE.jar.sha1 b/modules/repository-azure/licenses/reactor-core-3.3.10.RELEASE.jar.sha1 similarity index 100% rename from plugins/repository-azure/licenses/reactor-core-3.3.10.RELEASE.jar.sha1 rename to modules/repository-azure/licenses/reactor-core-3.3.10.RELEASE.jar.sha1 diff --git a/plugins/repository-azure/licenses/reactor-core-LICENSE.txt b/modules/repository-azure/licenses/reactor-core-LICENSE.txt similarity index 100% rename from plugins/repository-azure/licenses/reactor-core-LICENSE.txt rename to modules/repository-azure/licenses/reactor-core-LICENSE.txt diff --git a/plugins/repository-azure/licenses/reactor-core-NOTICE.txt b/modules/repository-azure/licenses/reactor-core-NOTICE.txt similarity index 100% rename from plugins/repository-azure/licenses/reactor-core-NOTICE.txt rename to modules/repository-azure/licenses/reactor-core-NOTICE.txt diff --git a/plugins/repository-azure/licenses/reactor-netty-0.9.12.RELEASE.jar.sha1 b/modules/repository-azure/licenses/reactor-netty-0.9.12.RELEASE.jar.sha1 similarity index 100% rename from plugins/repository-azure/licenses/reactor-netty-0.9.12.RELEASE.jar.sha1 rename to modules/repository-azure/licenses/reactor-netty-0.9.12.RELEASE.jar.sha1 diff --git a/plugins/repository-azure/licenses/reactor-netty-LICENSE.txt b/modules/repository-azure/licenses/reactor-netty-LICENSE.txt similarity index 100% rename from plugins/repository-azure/licenses/reactor-netty-LICENSE.txt rename to modules/repository-azure/licenses/reactor-netty-LICENSE.txt diff --git a/plugins/repository-azure/licenses/reactor-netty-NOTICE.txt b/modules/repository-azure/licenses/reactor-netty-NOTICE.txt similarity index 100% rename from plugins/repository-azure/licenses/reactor-netty-NOTICE.txt rename to modules/repository-azure/licenses/reactor-netty-NOTICE.txt diff --git a/plugins/repository-azure/licenses/slf4j-api-1.6.2.jar.sha1 b/modules/repository-azure/licenses/slf4j-api-1.6.2.jar.sha1 similarity index 100% rename from plugins/repository-azure/licenses/slf4j-api-1.6.2.jar.sha1 rename to modules/repository-azure/licenses/slf4j-api-1.6.2.jar.sha1 diff --git a/plugins/repository-azure/licenses/slf4j-api-LICENSE.txt b/modules/repository-azure/licenses/slf4j-api-LICENSE.txt similarity index 100% rename from plugins/repository-azure/licenses/slf4j-api-LICENSE.txt rename to modules/repository-azure/licenses/slf4j-api-LICENSE.txt diff --git a/plugins/repository-azure/licenses/slf4j-api-NOTICE.txt b/modules/repository-azure/licenses/slf4j-api-NOTICE.txt similarity index 100% rename from plugins/repository-azure/licenses/slf4j-api-NOTICE.txt rename to modules/repository-azure/licenses/slf4j-api-NOTICE.txt diff --git a/plugins/repository-azure/licenses/stax2-api-4.2.jar.sha1 b/modules/repository-azure/licenses/stax2-api-4.2.jar.sha1 similarity index 100% rename from plugins/repository-azure/licenses/stax2-api-4.2.jar.sha1 rename to modules/repository-azure/licenses/stax2-api-4.2.jar.sha1 diff --git a/plugins/repository-azure/licenses/stax2-api-LICENSE.txt b/modules/repository-azure/licenses/stax2-api-LICENSE.txt similarity index 100% rename from plugins/repository-azure/licenses/stax2-api-LICENSE.txt rename to modules/repository-azure/licenses/stax2-api-LICENSE.txt diff --git a/plugins/repository-azure/licenses/stax2-api-NOTICE.txt b/modules/repository-azure/licenses/stax2-api-NOTICE.txt similarity index 100% rename from plugins/repository-azure/licenses/stax2-api-NOTICE.txt rename to modules/repository-azure/licenses/stax2-api-NOTICE.txt diff --git a/plugins/repository-azure/licenses/woodstox-core-6.0.2.jar.sha1 b/modules/repository-azure/licenses/woodstox-core-6.0.2.jar.sha1 similarity index 100% rename from plugins/repository-azure/licenses/woodstox-core-6.0.2.jar.sha1 rename to modules/repository-azure/licenses/woodstox-core-6.0.2.jar.sha1 diff --git a/plugins/repository-azure/licenses/woodstox-core-LICENSE.txt b/modules/repository-azure/licenses/woodstox-core-LICENSE.txt similarity index 100% rename from plugins/repository-azure/licenses/woodstox-core-LICENSE.txt rename to modules/repository-azure/licenses/woodstox-core-LICENSE.txt diff --git a/plugins/repository-azure/licenses/woodstox-core-NOTICE.txt b/modules/repository-azure/licenses/woodstox-core-NOTICE.txt similarity index 100% rename from plugins/repository-azure/licenses/woodstox-core-NOTICE.txt rename to modules/repository-azure/licenses/woodstox-core-NOTICE.txt diff --git a/plugins/repository-azure/src/internalClusterTest/java/org/elasticsearch/repositories/azure/AzureBlobStoreRepositoryTests.java b/modules/repository-azure/src/internalClusterTest/java/org/elasticsearch/repositories/azure/AzureBlobStoreRepositoryTests.java similarity index 100% rename from plugins/repository-azure/src/internalClusterTest/java/org/elasticsearch/repositories/azure/AzureBlobStoreRepositoryTests.java rename to modules/repository-azure/src/internalClusterTest/java/org/elasticsearch/repositories/azure/AzureBlobStoreRepositoryTests.java diff --git a/plugins/repository-azure/src/internalClusterTest/java/org/elasticsearch/repositories/azure/AzureStorageCleanupThirdPartyTests.java b/modules/repository-azure/src/internalClusterTest/java/org/elasticsearch/repositories/azure/AzureStorageCleanupThirdPartyTests.java similarity index 100% rename from plugins/repository-azure/src/internalClusterTest/java/org/elasticsearch/repositories/azure/AzureStorageCleanupThirdPartyTests.java rename to modules/repository-azure/src/internalClusterTest/java/org/elasticsearch/repositories/azure/AzureStorageCleanupThirdPartyTests.java diff --git a/plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureBlobContainer.java b/modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureBlobContainer.java similarity index 100% rename from plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureBlobContainer.java rename to modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureBlobContainer.java diff --git a/plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureBlobServiceClient.java b/modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureBlobServiceClient.java similarity index 100% rename from plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureBlobServiceClient.java rename to modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureBlobServiceClient.java diff --git a/plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureBlobStore.java b/modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureBlobStore.java similarity index 100% rename from plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureBlobStore.java rename to modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureBlobStore.java diff --git a/plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureClientProvider.java b/modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureClientProvider.java similarity index 100% rename from plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureClientProvider.java rename to modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureClientProvider.java diff --git a/plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureRepository.java b/modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureRepository.java similarity index 100% rename from plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureRepository.java rename to modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureRepository.java diff --git a/plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureRepositoryPlugin.java b/modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureRepositoryPlugin.java similarity index 100% rename from plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureRepositoryPlugin.java rename to modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureRepositoryPlugin.java diff --git a/plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureStorageService.java b/modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureStorageService.java similarity index 100% rename from plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureStorageService.java rename to modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureStorageService.java diff --git a/plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureStorageSettings.java b/modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureStorageSettings.java similarity index 100% rename from plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureStorageSettings.java rename to modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureStorageSettings.java diff --git a/plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/CancellableRateLimitedFluxIterator.java b/modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/CancellableRateLimitedFluxIterator.java similarity index 100% rename from plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/CancellableRateLimitedFluxIterator.java rename to modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/CancellableRateLimitedFluxIterator.java diff --git a/plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/LocationMode.java b/modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/LocationMode.java similarity index 100% rename from plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/LocationMode.java rename to modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/LocationMode.java diff --git a/plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/SocketAccess.java b/modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/SocketAccess.java similarity index 100% rename from plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/SocketAccess.java rename to modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/SocketAccess.java diff --git a/plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/executors/PrivilegedExecutor.java b/modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/executors/PrivilegedExecutor.java similarity index 100% rename from plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/executors/PrivilegedExecutor.java rename to modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/executors/PrivilegedExecutor.java diff --git a/plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/executors/ReactorScheduledExecutorService.java b/modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/executors/ReactorScheduledExecutorService.java similarity index 100% rename from plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/executors/ReactorScheduledExecutorService.java rename to modules/repository-azure/src/main/java/org/elasticsearch/repositories/azure/executors/ReactorScheduledExecutorService.java diff --git a/plugins/repository-azure/src/main/plugin-metadata/plugin-security.policy b/modules/repository-azure/src/main/plugin-metadata/plugin-security.policy similarity index 100% rename from plugins/repository-azure/src/main/plugin-metadata/plugin-security.policy rename to modules/repository-azure/src/main/plugin-metadata/plugin-security.policy diff --git a/plugins/repository-azure/src/test/java/org/elasticsearch/repositories/azure/AzureBlobContainerRetriesTests.java b/modules/repository-azure/src/test/java/org/elasticsearch/repositories/azure/AzureBlobContainerRetriesTests.java similarity index 100% rename from plugins/repository-azure/src/test/java/org/elasticsearch/repositories/azure/AzureBlobContainerRetriesTests.java rename to modules/repository-azure/src/test/java/org/elasticsearch/repositories/azure/AzureBlobContainerRetriesTests.java diff --git a/plugins/repository-azure/src/test/java/org/elasticsearch/repositories/azure/AzureClientProviderTests.java b/modules/repository-azure/src/test/java/org/elasticsearch/repositories/azure/AzureClientProviderTests.java similarity index 100% rename from plugins/repository-azure/src/test/java/org/elasticsearch/repositories/azure/AzureClientProviderTests.java rename to modules/repository-azure/src/test/java/org/elasticsearch/repositories/azure/AzureClientProviderTests.java diff --git a/plugins/repository-azure/src/test/java/org/elasticsearch/repositories/azure/AzureRepositorySettingsTests.java b/modules/repository-azure/src/test/java/org/elasticsearch/repositories/azure/AzureRepositorySettingsTests.java similarity index 100% rename from plugins/repository-azure/src/test/java/org/elasticsearch/repositories/azure/AzureRepositorySettingsTests.java rename to modules/repository-azure/src/test/java/org/elasticsearch/repositories/azure/AzureRepositorySettingsTests.java diff --git a/plugins/repository-azure/src/test/java/org/elasticsearch/repositories/azure/AzureStorageServiceTests.java b/modules/repository-azure/src/test/java/org/elasticsearch/repositories/azure/AzureStorageServiceTests.java similarity index 100% rename from plugins/repository-azure/src/test/java/org/elasticsearch/repositories/azure/AzureStorageServiceTests.java rename to modules/repository-azure/src/test/java/org/elasticsearch/repositories/azure/AzureStorageServiceTests.java diff --git a/plugins/repository-azure/src/test/java/org/elasticsearch/repositories/azure/CancellableRateLimitedFluxIteratorTests.java b/modules/repository-azure/src/test/java/org/elasticsearch/repositories/azure/CancellableRateLimitedFluxIteratorTests.java similarity index 100% rename from plugins/repository-azure/src/test/java/org/elasticsearch/repositories/azure/CancellableRateLimitedFluxIteratorTests.java rename to modules/repository-azure/src/test/java/org/elasticsearch/repositories/azure/CancellableRateLimitedFluxIteratorTests.java diff --git a/plugins/repository-azure/src/yamlRestTest/java/org/elasticsearch/repositories/azure/RepositoryAzureClientYamlTestSuiteIT.java b/modules/repository-azure/src/yamlRestTest/java/org/elasticsearch/repositories/azure/RepositoryAzureClientYamlTestSuiteIT.java similarity index 100% rename from plugins/repository-azure/src/yamlRestTest/java/org/elasticsearch/repositories/azure/RepositoryAzureClientYamlTestSuiteIT.java rename to modules/repository-azure/src/yamlRestTest/java/org/elasticsearch/repositories/azure/RepositoryAzureClientYamlTestSuiteIT.java diff --git a/plugins/repository-azure/src/yamlRestTest/resources/rest-api-spec/test/repository_azure/10_basic.yml b/modules/repository-azure/src/yamlRestTest/resources/rest-api-spec/test/repository_azure/10_basic.yml similarity index 73% rename from plugins/repository-azure/src/yamlRestTest/resources/rest-api-spec/test/repository_azure/10_basic.yml rename to modules/repository-azure/src/yamlRestTest/resources/rest-api-spec/test/repository_azure/10_basic.yml index fe21a295e37b..4ac7f08ae0f5 100644 --- a/plugins/repository-azure/src/yamlRestTest/resources/rest-api-spec/test/repository_azure/10_basic.yml +++ b/modules/repository-azure/src/yamlRestTest/resources/rest-api-spec/test/repository_azure/10_basic.yml @@ -1,6 +1,6 @@ # Integration tests for repository-azure # -"Plugin repository-azure is loaded": +"Module repository-azure is loaded": - skip: reason: "contains is a newly added assertion" features: contains @@ -13,4 +13,4 @@ - do: nodes.info: {} - - contains: { nodes.$master.plugins: { name: repository-azure } } + - contains: { nodes.$master.modules: { name: repository-azure } } diff --git a/plugins/repository-azure/src/yamlRestTest/resources/rest-api-spec/test/repository_azure/20_repository.yml b/modules/repository-azure/src/yamlRestTest/resources/rest-api-spec/test/repository_azure/20_repository.yml similarity index 100% rename from plugins/repository-azure/src/yamlRestTest/resources/rest-api-spec/test/repository_azure/20_repository.yml rename to modules/repository-azure/src/yamlRestTest/resources/rest-api-spec/test/repository_azure/20_repository.yml diff --git a/plugins/repository-gcs/build.gradle b/modules/repository-gcs/build.gradle similarity index 99% rename from plugins/repository-gcs/build.gradle rename to modules/repository-gcs/build.gradle index 4b25ec8887de..ff6dbe983d9c 100644 --- a/plugins/repository-gcs/build.gradle +++ b/modules/repository-gcs/build.gradle @@ -279,7 +279,7 @@ def largeBlobYamlRestTest = tasks.register("largeBlobYamlRestTest", RestIntegTes // We have to wait for configure the cluster here as it might not have been created otherwise yet. testClusters { largeBlobYamlRestTest { - plugin bundlePlugin.archiveFile + module bundlePlugin.archiveFile // force large blob uploads by setting the threshold small, forcing this code path to be tested systemProperty 'es.repository_gcs.large_blob_threshold_byte_size', '256' @@ -333,7 +333,7 @@ if (useFixture) { testClusters.matching { it.name == "yamlRestTestApplicationDefaultCredentials" }.configureEach { setting 'gcs.client.integration_test.endpoint', { "${-> fixtureAddress('gcs-fixture-with-application-default-credentials')}" }, IGNORE_VALUE - plugin tasks.bundlePlugin.archiveFile + module tasks.bundlePlugin.archiveFile environment 'GCE_METADATA_HOST', { "${-> fixtureAddress('gcs-fixture-with-application-default-credentials')}".replace("http://", "") }, IGNORE_VALUE } } diff --git a/plugins/repository-gcs/licenses/api-common-1.10.4.jar.sha1 b/modules/repository-gcs/licenses/api-common-1.10.4.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/api-common-1.10.4.jar.sha1 rename to modules/repository-gcs/licenses/api-common-1.10.4.jar.sha1 diff --git a/plugins/repository-gcs/licenses/api-common-LICENSE.txt b/modules/repository-gcs/licenses/api-common-LICENSE.txt similarity index 100% rename from plugins/repository-gcs/licenses/api-common-LICENSE.txt rename to modules/repository-gcs/licenses/api-common-LICENSE.txt diff --git a/plugins/repository-gcs/licenses/api-common-NOTICE.txt b/modules/repository-gcs/licenses/api-common-NOTICE.txt similarity index 100% rename from plugins/repository-gcs/licenses/api-common-NOTICE.txt rename to modules/repository-gcs/licenses/api-common-NOTICE.txt diff --git a/plugins/repository-gcs/licenses/commons-codec-1.14.jar.sha1 b/modules/repository-gcs/licenses/commons-codec-1.14.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/commons-codec-1.14.jar.sha1 rename to modules/repository-gcs/licenses/commons-codec-1.14.jar.sha1 diff --git a/plugins/repository-gcs/licenses/commons-codec-LICENSE.txt b/modules/repository-gcs/licenses/commons-codec-LICENSE.txt similarity index 100% rename from plugins/repository-gcs/licenses/commons-codec-LICENSE.txt rename to modules/repository-gcs/licenses/commons-codec-LICENSE.txt diff --git a/plugins/repository-gcs/licenses/commons-codec-NOTICE.txt b/modules/repository-gcs/licenses/commons-codec-NOTICE.txt similarity index 100% rename from plugins/repository-gcs/licenses/commons-codec-NOTICE.txt rename to modules/repository-gcs/licenses/commons-codec-NOTICE.txt diff --git a/plugins/repository-gcs/licenses/commons-logging-1.1.3.jar.sha1 b/modules/repository-gcs/licenses/commons-logging-1.1.3.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/commons-logging-1.1.3.jar.sha1 rename to modules/repository-gcs/licenses/commons-logging-1.1.3.jar.sha1 diff --git a/plugins/repository-gcs/licenses/commons-logging-LICENSE.txt b/modules/repository-gcs/licenses/commons-logging-LICENSE.txt similarity index 100% rename from plugins/repository-gcs/licenses/commons-logging-LICENSE.txt rename to modules/repository-gcs/licenses/commons-logging-LICENSE.txt diff --git a/plugins/repository-gcs/licenses/commons-logging-NOTICE.txt b/modules/repository-gcs/licenses/commons-logging-NOTICE.txt similarity index 100% rename from plugins/repository-gcs/licenses/commons-logging-NOTICE.txt rename to modules/repository-gcs/licenses/commons-logging-NOTICE.txt diff --git a/plugins/repository-gcs/licenses/failureaccess-1.0.1.jar.sha1 b/modules/repository-gcs/licenses/failureaccess-1.0.1.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/failureaccess-1.0.1.jar.sha1 rename to modules/repository-gcs/licenses/failureaccess-1.0.1.jar.sha1 diff --git a/plugins/repository-gcs/licenses/failureaccess-LICENSE.txt b/modules/repository-gcs/licenses/failureaccess-LICENSE.txt similarity index 100% rename from plugins/repository-gcs/licenses/failureaccess-LICENSE.txt rename to modules/repository-gcs/licenses/failureaccess-LICENSE.txt diff --git a/plugins/repository-gcs/licenses/failureaccess-NOTICE.txt b/modules/repository-gcs/licenses/failureaccess-NOTICE.txt similarity index 100% rename from plugins/repository-gcs/licenses/failureaccess-NOTICE.txt rename to modules/repository-gcs/licenses/failureaccess-NOTICE.txt diff --git a/plugins/repository-gcs/licenses/gax-1.66.0.jar.sha1 b/modules/repository-gcs/licenses/gax-1.66.0.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/gax-1.66.0.jar.sha1 rename to modules/repository-gcs/licenses/gax-1.66.0.jar.sha1 diff --git a/plugins/repository-gcs/licenses/gax-LICENSE.txt b/modules/repository-gcs/licenses/gax-LICENSE.txt similarity index 100% rename from plugins/repository-gcs/licenses/gax-LICENSE.txt rename to modules/repository-gcs/licenses/gax-LICENSE.txt diff --git a/plugins/repository-gcs/licenses/gax-NOTICE.txt b/modules/repository-gcs/licenses/gax-NOTICE.txt similarity index 100% rename from plugins/repository-gcs/licenses/gax-NOTICE.txt rename to modules/repository-gcs/licenses/gax-NOTICE.txt diff --git a/plugins/repository-gcs/licenses/gax-httpjson-0.83.0.jar.sha1 b/modules/repository-gcs/licenses/gax-httpjson-0.83.0.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/gax-httpjson-0.83.0.jar.sha1 rename to modules/repository-gcs/licenses/gax-httpjson-0.83.0.jar.sha1 diff --git a/plugins/repository-gcs/licenses/gax-httpjson-LICENSE.txt b/modules/repository-gcs/licenses/gax-httpjson-LICENSE.txt similarity index 100% rename from plugins/repository-gcs/licenses/gax-httpjson-LICENSE.txt rename to modules/repository-gcs/licenses/gax-httpjson-LICENSE.txt diff --git a/plugins/repository-gcs/licenses/gax-httpjson-NOTICE.txt b/modules/repository-gcs/licenses/gax-httpjson-NOTICE.txt similarity index 100% rename from plugins/repository-gcs/licenses/gax-httpjson-NOTICE.txt rename to modules/repository-gcs/licenses/gax-httpjson-NOTICE.txt diff --git a/plugins/repository-gcs/licenses/google-api-client-1.32.1.jar.sha1 b/modules/repository-gcs/licenses/google-api-client-1.32.1.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/google-api-client-1.32.1.jar.sha1 rename to modules/repository-gcs/licenses/google-api-client-1.32.1.jar.sha1 diff --git a/plugins/repository-gcs/licenses/google-api-client-LICENSE.txt b/modules/repository-gcs/licenses/google-api-client-LICENSE.txt similarity index 100% rename from plugins/repository-gcs/licenses/google-api-client-LICENSE.txt rename to modules/repository-gcs/licenses/google-api-client-LICENSE.txt diff --git a/plugins/repository-gcs/licenses/google-api-client-NOTICE.txt b/modules/repository-gcs/licenses/google-api-client-NOTICE.txt similarity index 100% rename from plugins/repository-gcs/licenses/google-api-client-NOTICE.txt rename to modules/repository-gcs/licenses/google-api-client-NOTICE.txt diff --git a/plugins/repository-gcs/licenses/google-api-services-storage-LICENSE.txt b/modules/repository-gcs/licenses/google-api-services-storage-LICENSE.txt similarity index 100% rename from plugins/repository-gcs/licenses/google-api-services-storage-LICENSE.txt rename to modules/repository-gcs/licenses/google-api-services-storage-LICENSE.txt diff --git a/plugins/repository-gcs/licenses/google-api-services-storage-NOTICE.txt b/modules/repository-gcs/licenses/google-api-services-storage-NOTICE.txt similarity index 100% rename from plugins/repository-gcs/licenses/google-api-services-storage-NOTICE.txt rename to modules/repository-gcs/licenses/google-api-services-storage-NOTICE.txt diff --git a/plugins/repository-gcs/licenses/google-api-services-storage-v1-rev20210127-1.31.5.jar.sha1 b/modules/repository-gcs/licenses/google-api-services-storage-v1-rev20210127-1.31.5.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/google-api-services-storage-v1-rev20210127-1.31.5.jar.sha1 rename to modules/repository-gcs/licenses/google-api-services-storage-v1-rev20210127-1.31.5.jar.sha1 diff --git a/plugins/repository-gcs/licenses/google-auth-LICENSE.txt b/modules/repository-gcs/licenses/google-auth-LICENSE.txt similarity index 100% rename from plugins/repository-gcs/licenses/google-auth-LICENSE.txt rename to modules/repository-gcs/licenses/google-auth-LICENSE.txt diff --git a/plugins/repository-gcs/licenses/google-auth-NOTICE.txt b/modules/repository-gcs/licenses/google-auth-NOTICE.txt similarity index 100% rename from plugins/repository-gcs/licenses/google-auth-NOTICE.txt rename to modules/repository-gcs/licenses/google-auth-NOTICE.txt diff --git a/plugins/repository-gcs/licenses/google-auth-library-credentials-0.26.0.jar.sha1 b/modules/repository-gcs/licenses/google-auth-library-credentials-0.26.0.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/google-auth-library-credentials-0.26.0.jar.sha1 rename to modules/repository-gcs/licenses/google-auth-library-credentials-0.26.0.jar.sha1 diff --git a/plugins/repository-gcs/licenses/google-auth-library-oauth2-http-0.26.0.jar.sha1 b/modules/repository-gcs/licenses/google-auth-library-oauth2-http-0.26.0.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/google-auth-library-oauth2-http-0.26.0.jar.sha1 rename to modules/repository-gcs/licenses/google-auth-library-oauth2-http-0.26.0.jar.sha1 diff --git a/plugins/repository-gcs/licenses/google-cloud-LICENSE.txt b/modules/repository-gcs/licenses/google-cloud-LICENSE.txt similarity index 100% rename from plugins/repository-gcs/licenses/google-cloud-LICENSE.txt rename to modules/repository-gcs/licenses/google-cloud-LICENSE.txt diff --git a/plugins/repository-gcs/licenses/google-cloud-NOTICE.txt b/modules/repository-gcs/licenses/google-cloud-NOTICE.txt similarity index 100% rename from plugins/repository-gcs/licenses/google-cloud-NOTICE.txt rename to modules/repository-gcs/licenses/google-cloud-NOTICE.txt diff --git a/plugins/repository-gcs/licenses/google-cloud-core-1.95.4.jar.sha1 b/modules/repository-gcs/licenses/google-cloud-core-1.95.4.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/google-cloud-core-1.95.4.jar.sha1 rename to modules/repository-gcs/licenses/google-cloud-core-1.95.4.jar.sha1 diff --git a/plugins/repository-gcs/licenses/google-cloud-core-http-1.95.4.jar.sha1 b/modules/repository-gcs/licenses/google-cloud-core-http-1.95.4.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/google-cloud-core-http-1.95.4.jar.sha1 rename to modules/repository-gcs/licenses/google-cloud-core-http-1.95.4.jar.sha1 diff --git a/plugins/repository-gcs/licenses/google-cloud-storage-1.117.1.jar.sha1 b/modules/repository-gcs/licenses/google-cloud-storage-1.117.1.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/google-cloud-storage-1.117.1.jar.sha1 rename to modules/repository-gcs/licenses/google-cloud-storage-1.117.1.jar.sha1 diff --git a/plugins/repository-gcs/licenses/google-http-LICENSE.txt b/modules/repository-gcs/licenses/google-http-LICENSE.txt similarity index 100% rename from plugins/repository-gcs/licenses/google-http-LICENSE.txt rename to modules/repository-gcs/licenses/google-http-LICENSE.txt diff --git a/plugins/repository-gcs/licenses/google-http-NOTICE.txt b/modules/repository-gcs/licenses/google-http-NOTICE.txt similarity index 100% rename from plugins/repository-gcs/licenses/google-http-NOTICE.txt rename to modules/repository-gcs/licenses/google-http-NOTICE.txt diff --git a/plugins/repository-gcs/licenses/google-http-client-1.39.2.jar.sha1 b/modules/repository-gcs/licenses/google-http-client-1.39.2.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/google-http-client-1.39.2.jar.sha1 rename to modules/repository-gcs/licenses/google-http-client-1.39.2.jar.sha1 diff --git a/plugins/repository-gcs/licenses/google-http-client-appengine-1.39.2.jar.sha1 b/modules/repository-gcs/licenses/google-http-client-appengine-1.39.2.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/google-http-client-appengine-1.39.2.jar.sha1 rename to modules/repository-gcs/licenses/google-http-client-appengine-1.39.2.jar.sha1 diff --git a/plugins/repository-gcs/licenses/google-http-client-gson-1.39.2.jar.sha1 b/modules/repository-gcs/licenses/google-http-client-gson-1.39.2.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/google-http-client-gson-1.39.2.jar.sha1 rename to modules/repository-gcs/licenses/google-http-client-gson-1.39.2.jar.sha1 diff --git a/plugins/repository-gcs/licenses/google-http-client-jackson2-1.39.2.jar.sha1 b/modules/repository-gcs/licenses/google-http-client-jackson2-1.39.2.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/google-http-client-jackson2-1.39.2.jar.sha1 rename to modules/repository-gcs/licenses/google-http-client-jackson2-1.39.2.jar.sha1 diff --git a/plugins/repository-gcs/licenses/google-oauth-client-1.31.5.jar.sha1 b/modules/repository-gcs/licenses/google-oauth-client-1.31.5.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/google-oauth-client-1.31.5.jar.sha1 rename to modules/repository-gcs/licenses/google-oauth-client-1.31.5.jar.sha1 diff --git a/plugins/repository-gcs/licenses/google-oauth-client-LICENSE.txt b/modules/repository-gcs/licenses/google-oauth-client-LICENSE.txt similarity index 100% rename from plugins/repository-gcs/licenses/google-oauth-client-LICENSE.txt rename to modules/repository-gcs/licenses/google-oauth-client-LICENSE.txt diff --git a/plugins/repository-gcs/licenses/google-oauth-client-NOTICE.txt b/modules/repository-gcs/licenses/google-oauth-client-NOTICE.txt similarity index 100% rename from plugins/repository-gcs/licenses/google-oauth-client-NOTICE.txt rename to modules/repository-gcs/licenses/google-oauth-client-NOTICE.txt diff --git a/plugins/repository-gcs/licenses/grpc-context-1.39.0.jar.sha1 b/modules/repository-gcs/licenses/grpc-context-1.39.0.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/grpc-context-1.39.0.jar.sha1 rename to modules/repository-gcs/licenses/grpc-context-1.39.0.jar.sha1 diff --git a/plugins/repository-gcs/licenses/grpc-context-LICENSE.txt b/modules/repository-gcs/licenses/grpc-context-LICENSE.txt similarity index 100% rename from plugins/repository-gcs/licenses/grpc-context-LICENSE.txt rename to modules/repository-gcs/licenses/grpc-context-LICENSE.txt diff --git a/plugins/repository-gcs/licenses/grpc-context-NOTICE.txt b/modules/repository-gcs/licenses/grpc-context-NOTICE.txt similarity index 100% rename from plugins/repository-gcs/licenses/grpc-context-NOTICE.txt rename to modules/repository-gcs/licenses/grpc-context-NOTICE.txt diff --git a/plugins/repository-gcs/licenses/gson-2.8.7.jar.sha1 b/modules/repository-gcs/licenses/gson-2.8.7.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/gson-2.8.7.jar.sha1 rename to modules/repository-gcs/licenses/gson-2.8.7.jar.sha1 diff --git a/plugins/repository-gcs/licenses/gson-LICENSE.txt b/modules/repository-gcs/licenses/gson-LICENSE.txt similarity index 100% rename from plugins/repository-gcs/licenses/gson-LICENSE.txt rename to modules/repository-gcs/licenses/gson-LICENSE.txt diff --git a/plugins/repository-gcs/licenses/gson-NOTICE.txt b/modules/repository-gcs/licenses/gson-NOTICE.txt similarity index 100% rename from plugins/repository-gcs/licenses/gson-NOTICE.txt rename to modules/repository-gcs/licenses/gson-NOTICE.txt diff --git a/plugins/repository-gcs/licenses/guava-30.1.1-jre.jar.sha1 b/modules/repository-gcs/licenses/guava-30.1.1-jre.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/guava-30.1.1-jre.jar.sha1 rename to modules/repository-gcs/licenses/guava-30.1.1-jre.jar.sha1 diff --git a/plugins/repository-gcs/licenses/guava-LICENSE.txt b/modules/repository-gcs/licenses/guava-LICENSE.txt similarity index 100% rename from plugins/repository-gcs/licenses/guava-LICENSE.txt rename to modules/repository-gcs/licenses/guava-LICENSE.txt diff --git a/plugins/repository-gcs/licenses/guava-NOTICE.txt b/modules/repository-gcs/licenses/guava-NOTICE.txt similarity index 100% rename from plugins/repository-gcs/licenses/guava-NOTICE.txt rename to modules/repository-gcs/licenses/guava-NOTICE.txt diff --git a/plugins/repository-gcs/licenses/log4j-1.2-api-2.17.1.jar.sha1 b/modules/repository-gcs/licenses/log4j-1.2-api-2.17.1.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/log4j-1.2-api-2.17.1.jar.sha1 rename to modules/repository-gcs/licenses/log4j-1.2-api-2.17.1.jar.sha1 diff --git a/plugins/repository-gcs/licenses/log4j-LICENSE.txt b/modules/repository-gcs/licenses/log4j-LICENSE.txt similarity index 100% rename from plugins/repository-gcs/licenses/log4j-LICENSE.txt rename to modules/repository-gcs/licenses/log4j-LICENSE.txt diff --git a/plugins/repository-gcs/licenses/log4j-NOTICE.txt b/modules/repository-gcs/licenses/log4j-NOTICE.txt similarity index 100% rename from plugins/repository-gcs/licenses/log4j-NOTICE.txt rename to modules/repository-gcs/licenses/log4j-NOTICE.txt diff --git a/plugins/repository-gcs/licenses/opencensus-LICENSE.txt b/modules/repository-gcs/licenses/opencensus-LICENSE.txt similarity index 100% rename from plugins/repository-gcs/licenses/opencensus-LICENSE.txt rename to modules/repository-gcs/licenses/opencensus-LICENSE.txt diff --git a/plugins/repository-gcs/licenses/opencensus-NOTICE.txt b/modules/repository-gcs/licenses/opencensus-NOTICE.txt similarity index 100% rename from plugins/repository-gcs/licenses/opencensus-NOTICE.txt rename to modules/repository-gcs/licenses/opencensus-NOTICE.txt diff --git a/plugins/repository-gcs/licenses/opencensus-api-0.28.0.jar.sha1 b/modules/repository-gcs/licenses/opencensus-api-0.28.0.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/opencensus-api-0.28.0.jar.sha1 rename to modules/repository-gcs/licenses/opencensus-api-0.28.0.jar.sha1 diff --git a/plugins/repository-gcs/licenses/opencensus-contrib-http-util-0.28.0.jar.sha1 b/modules/repository-gcs/licenses/opencensus-contrib-http-util-0.28.0.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/opencensus-contrib-http-util-0.28.0.jar.sha1 rename to modules/repository-gcs/licenses/opencensus-contrib-http-util-0.28.0.jar.sha1 diff --git a/plugins/repository-gcs/licenses/proto-google-LICENSE.txt b/modules/repository-gcs/licenses/proto-google-LICENSE.txt similarity index 100% rename from plugins/repository-gcs/licenses/proto-google-LICENSE.txt rename to modules/repository-gcs/licenses/proto-google-LICENSE.txt diff --git a/plugins/repository-gcs/licenses/proto-google-NOTICE.txt b/modules/repository-gcs/licenses/proto-google-NOTICE.txt similarity index 100% rename from plugins/repository-gcs/licenses/proto-google-NOTICE.txt rename to modules/repository-gcs/licenses/proto-google-NOTICE.txt diff --git a/plugins/repository-gcs/licenses/proto-google-common-protos-2.3.2.jar.sha1 b/modules/repository-gcs/licenses/proto-google-common-protos-2.3.2.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/proto-google-common-protos-2.3.2.jar.sha1 rename to modules/repository-gcs/licenses/proto-google-common-protos-2.3.2.jar.sha1 diff --git a/plugins/repository-gcs/licenses/proto-google-iam-v1-1.0.14.jar.sha1 b/modules/repository-gcs/licenses/proto-google-iam-v1-1.0.14.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/proto-google-iam-v1-1.0.14.jar.sha1 rename to modules/repository-gcs/licenses/proto-google-iam-v1-1.0.14.jar.sha1 diff --git a/plugins/repository-gcs/licenses/protobuf-LICENSE.txt b/modules/repository-gcs/licenses/protobuf-LICENSE.txt similarity index 100% rename from plugins/repository-gcs/licenses/protobuf-LICENSE.txt rename to modules/repository-gcs/licenses/protobuf-LICENSE.txt diff --git a/plugins/repository-gcs/licenses/protobuf-NOTICE.txt b/modules/repository-gcs/licenses/protobuf-NOTICE.txt similarity index 100% rename from plugins/repository-gcs/licenses/protobuf-NOTICE.txt rename to modules/repository-gcs/licenses/protobuf-NOTICE.txt diff --git a/plugins/repository-gcs/licenses/protobuf-java-3.17.3.jar.sha1 b/modules/repository-gcs/licenses/protobuf-java-3.17.3.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/protobuf-java-3.17.3.jar.sha1 rename to modules/repository-gcs/licenses/protobuf-java-3.17.3.jar.sha1 diff --git a/plugins/repository-gcs/licenses/protobuf-java-util-3.17.3.jar.sha1 b/modules/repository-gcs/licenses/protobuf-java-util-3.17.3.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/protobuf-java-util-3.17.3.jar.sha1 rename to modules/repository-gcs/licenses/protobuf-java-util-3.17.3.jar.sha1 diff --git a/plugins/repository-gcs/licenses/threetenbp-1.5.1.jar.sha1 b/modules/repository-gcs/licenses/threetenbp-1.5.1.jar.sha1 similarity index 100% rename from plugins/repository-gcs/licenses/threetenbp-1.5.1.jar.sha1 rename to modules/repository-gcs/licenses/threetenbp-1.5.1.jar.sha1 diff --git a/plugins/repository-gcs/licenses/threetenbp-LICENSE.txt b/modules/repository-gcs/licenses/threetenbp-LICENSE.txt similarity index 100% rename from plugins/repository-gcs/licenses/threetenbp-LICENSE.txt rename to modules/repository-gcs/licenses/threetenbp-LICENSE.txt diff --git a/plugins/repository-gcs/licenses/threetenbp-NOTICE.txt b/modules/repository-gcs/licenses/threetenbp-NOTICE.txt similarity index 100% rename from plugins/repository-gcs/licenses/threetenbp-NOTICE.txt rename to modules/repository-gcs/licenses/threetenbp-NOTICE.txt diff --git a/plugins/repository-gcs/src/internalClusterTest/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobStoreRepositoryTests.java b/modules/repository-gcs/src/internalClusterTest/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobStoreRepositoryTests.java similarity index 100% rename from plugins/repository-gcs/src/internalClusterTest/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobStoreRepositoryTests.java rename to modules/repository-gcs/src/internalClusterTest/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobStoreRepositoryTests.java diff --git a/plugins/repository-gcs/src/internalClusterTest/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageThirdPartyTests.java b/modules/repository-gcs/src/internalClusterTest/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageThirdPartyTests.java similarity index 100% rename from plugins/repository-gcs/src/internalClusterTest/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageThirdPartyTests.java rename to modules/repository-gcs/src/internalClusterTest/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageThirdPartyTests.java diff --git a/plugins/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobContainer.java b/modules/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobContainer.java similarity index 100% rename from plugins/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobContainer.java rename to modules/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobContainer.java diff --git a/plugins/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobStore.java b/modules/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobStore.java similarity index 100% rename from plugins/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobStore.java rename to modules/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobStore.java diff --git a/plugins/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageClientSettings.java b/modules/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageClientSettings.java similarity index 100% rename from plugins/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageClientSettings.java rename to modules/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageClientSettings.java diff --git a/plugins/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageHttpStatsCollector.java b/modules/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageHttpStatsCollector.java similarity index 100% rename from plugins/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageHttpStatsCollector.java rename to modules/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageHttpStatsCollector.java diff --git a/plugins/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageOperationsStats.java b/modules/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageOperationsStats.java similarity index 100% rename from plugins/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageOperationsStats.java rename to modules/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageOperationsStats.java diff --git a/plugins/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStoragePlugin.java b/modules/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStoragePlugin.java similarity index 100% rename from plugins/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStoragePlugin.java rename to modules/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStoragePlugin.java diff --git a/plugins/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageRepository.java b/modules/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageRepository.java similarity index 100% rename from plugins/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageRepository.java rename to modules/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageRepository.java diff --git a/plugins/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageRetryingInputStream.java b/modules/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageRetryingInputStream.java similarity index 100% rename from plugins/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageRetryingInputStream.java rename to modules/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageRetryingInputStream.java diff --git a/plugins/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageService.java b/modules/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageService.java similarity index 100% rename from plugins/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageService.java rename to modules/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageService.java diff --git a/plugins/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/SocketAccess.java b/modules/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/SocketAccess.java similarity index 100% rename from plugins/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/SocketAccess.java rename to modules/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/SocketAccess.java diff --git a/plugins/repository-gcs/src/main/plugin-metadata/plugin-security.policy b/modules/repository-gcs/src/main/plugin-metadata/plugin-security.policy similarity index 100% rename from plugins/repository-gcs/src/main/plugin-metadata/plugin-security.policy rename to modules/repository-gcs/src/main/plugin-metadata/plugin-security.policy diff --git a/plugins/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobContainerRetriesTests.java b/modules/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobContainerRetriesTests.java similarity index 100% rename from plugins/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobContainerRetriesTests.java rename to modules/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobContainerRetriesTests.java diff --git a/plugins/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobStoreContainerTests.java b/modules/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobStoreContainerTests.java similarity index 100% rename from plugins/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobStoreContainerTests.java rename to modules/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobStoreContainerTests.java diff --git a/plugins/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageClientSettingsTests.java b/modules/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageClientSettingsTests.java similarity index 100% rename from plugins/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageClientSettingsTests.java rename to modules/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageClientSettingsTests.java diff --git a/plugins/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageServiceTests.java b/modules/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageServiceTests.java similarity index 100% rename from plugins/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageServiceTests.java rename to modules/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageServiceTests.java diff --git a/plugins/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/TestUtils.java b/modules/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/TestUtils.java similarity index 100% rename from plugins/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/TestUtils.java rename to modules/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/TestUtils.java diff --git a/plugins/repository-gcs/src/yamlRestTest/java/org/elasticsearch/repositories/gcs/RepositoryGcsClientYamlTestSuiteIT.java b/modules/repository-gcs/src/yamlRestTest/java/org/elasticsearch/repositories/gcs/RepositoryGcsClientYamlTestSuiteIT.java similarity index 100% rename from plugins/repository-gcs/src/yamlRestTest/java/org/elasticsearch/repositories/gcs/RepositoryGcsClientYamlTestSuiteIT.java rename to modules/repository-gcs/src/yamlRestTest/java/org/elasticsearch/repositories/gcs/RepositoryGcsClientYamlTestSuiteIT.java diff --git a/plugins/repository-gcs/src/yamlRestTest/resources/rest-api-spec/test/repository_gcs/10_basic.yml b/modules/repository-gcs/src/yamlRestTest/resources/rest-api-spec/test/repository_gcs/10_basic.yml similarity index 73% rename from plugins/repository-gcs/src/yamlRestTest/resources/rest-api-spec/test/repository_gcs/10_basic.yml rename to modules/repository-gcs/src/yamlRestTest/resources/rest-api-spec/test/repository_gcs/10_basic.yml index 072836280b3b..b7f52c3dd3d3 100644 --- a/plugins/repository-gcs/src/yamlRestTest/resources/rest-api-spec/test/repository_gcs/10_basic.yml +++ b/modules/repository-gcs/src/yamlRestTest/resources/rest-api-spec/test/repository_gcs/10_basic.yml @@ -1,6 +1,6 @@ # Integration tests for repository-gcs # -"Plugin repository-gcs is loaded": +"Module repository-gcs is loaded": - skip: reason: "contains is a newly added assertion" features: contains @@ -13,4 +13,4 @@ - do: nodes.info: {} - - contains: { nodes.$master.plugins: { name: repository-gcs } } + - contains: { nodes.$master.modules: { name: repository-gcs } } diff --git a/plugins/repository-gcs/src/yamlRestTest/resources/rest-api-spec/test/repository_gcs/20_repository.yml b/modules/repository-gcs/src/yamlRestTest/resources/rest-api-spec/test/repository_gcs/20_repository.yml similarity index 100% rename from plugins/repository-gcs/src/yamlRestTest/resources/rest-api-spec/test/repository_gcs/20_repository.yml rename to modules/repository-gcs/src/yamlRestTest/resources/rest-api-spec/test/repository_gcs/20_repository.yml diff --git a/plugins/repository-s3/build.gradle b/modules/repository-s3/build.gradle similarity index 99% rename from plugins/repository-s3/build.gradle rename to modules/repository-s3/build.gradle index 82a776b6374f..24a7166d74b9 100644 --- a/plugins/repository-s3/build.gradle +++ b/modules/repository-s3/build.gradle @@ -235,7 +235,7 @@ if (useFixture) { keystore 's3.client.integration_test_permanent.access_key', s3PermanentAccessKey keystore 's3.client.integration_test_permanent.secret_key', s3PermanentSecretKey setting 's3.client.integration_test_permanent.endpoint', { "${-> fixtureAddress('minio-fixture', 'minio-fixture', '9000')}" }, IGNORE_VALUE - plugin tasks.bundlePlugin.archiveFile + module tasks.bundlePlugin.archiveFile } } @@ -260,7 +260,7 @@ if (useFixture) { testClusters.matching { it.name == "yamlRestTestECS" }.configureEach { setting 's3.client.integration_test_ecs.endpoint', { "${-> fixtureAddress('s3-fixture', 's3-fixture-with-ecs', '80')}" }, IGNORE_VALUE - plugin tasks.bundlePlugin.archiveFile + module tasks.bundlePlugin.archiveFile environment 'AWS_CONTAINER_CREDENTIALS_FULL_URI', { "${-> fixtureAddress('s3-fixture', 's3-fixture-with-ecs', '80')}/ecs_credentials_endpoint" }, IGNORE_VALUE } } diff --git a/plugins/repository-s3/licenses/aws-java-sdk-LICENSE.txt b/modules/repository-s3/licenses/aws-java-sdk-LICENSE.txt similarity index 100% rename from plugins/repository-s3/licenses/aws-java-sdk-LICENSE.txt rename to modules/repository-s3/licenses/aws-java-sdk-LICENSE.txt diff --git a/plugins/repository-s3/licenses/aws-java-sdk-NOTICE.txt b/modules/repository-s3/licenses/aws-java-sdk-NOTICE.txt similarity index 100% rename from plugins/repository-s3/licenses/aws-java-sdk-NOTICE.txt rename to modules/repository-s3/licenses/aws-java-sdk-NOTICE.txt diff --git a/plugins/repository-s3/licenses/aws-java-sdk-core-1.11.749.jar.sha1 b/modules/repository-s3/licenses/aws-java-sdk-core-1.11.749.jar.sha1 similarity index 100% rename from plugins/repository-s3/licenses/aws-java-sdk-core-1.11.749.jar.sha1 rename to modules/repository-s3/licenses/aws-java-sdk-core-1.11.749.jar.sha1 diff --git a/plugins/repository-s3/licenses/aws-java-sdk-s3-1.11.749.jar.sha1 b/modules/repository-s3/licenses/aws-java-sdk-s3-1.11.749.jar.sha1 similarity index 100% rename from plugins/repository-s3/licenses/aws-java-sdk-s3-1.11.749.jar.sha1 rename to modules/repository-s3/licenses/aws-java-sdk-s3-1.11.749.jar.sha1 diff --git a/plugins/repository-s3/licenses/commons-codec-1.14.jar.sha1 b/modules/repository-s3/licenses/commons-codec-1.14.jar.sha1 similarity index 100% rename from plugins/repository-s3/licenses/commons-codec-1.14.jar.sha1 rename to modules/repository-s3/licenses/commons-codec-1.14.jar.sha1 diff --git a/plugins/repository-s3/licenses/commons-codec-LICENSE.txt b/modules/repository-s3/licenses/commons-codec-LICENSE.txt similarity index 100% rename from plugins/repository-s3/licenses/commons-codec-LICENSE.txt rename to modules/repository-s3/licenses/commons-codec-LICENSE.txt diff --git a/plugins/repository-s3/licenses/commons-codec-NOTICE.txt b/modules/repository-s3/licenses/commons-codec-NOTICE.txt similarity index 100% rename from plugins/repository-s3/licenses/commons-codec-NOTICE.txt rename to modules/repository-s3/licenses/commons-codec-NOTICE.txt diff --git a/plugins/repository-s3/licenses/commons-logging-1.1.3.jar.sha1 b/modules/repository-s3/licenses/commons-logging-1.1.3.jar.sha1 similarity index 100% rename from plugins/repository-s3/licenses/commons-logging-1.1.3.jar.sha1 rename to modules/repository-s3/licenses/commons-logging-1.1.3.jar.sha1 diff --git a/plugins/repository-s3/licenses/commons-logging-LICENSE.txt b/modules/repository-s3/licenses/commons-logging-LICENSE.txt similarity index 100% rename from plugins/repository-s3/licenses/commons-logging-LICENSE.txt rename to modules/repository-s3/licenses/commons-logging-LICENSE.txt diff --git a/plugins/repository-s3/licenses/commons-logging-NOTICE.txt b/modules/repository-s3/licenses/commons-logging-NOTICE.txt similarity index 100% rename from plugins/repository-s3/licenses/commons-logging-NOTICE.txt rename to modules/repository-s3/licenses/commons-logging-NOTICE.txt diff --git a/plugins/repository-s3/licenses/httpclient-4.5.10.jar.sha1 b/modules/repository-s3/licenses/httpclient-4.5.10.jar.sha1 similarity index 100% rename from plugins/repository-s3/licenses/httpclient-4.5.10.jar.sha1 rename to modules/repository-s3/licenses/httpclient-4.5.10.jar.sha1 diff --git a/plugins/repository-s3/licenses/httpclient-LICENSE.txt b/modules/repository-s3/licenses/httpclient-LICENSE.txt similarity index 100% rename from plugins/repository-s3/licenses/httpclient-LICENSE.txt rename to modules/repository-s3/licenses/httpclient-LICENSE.txt diff --git a/plugins/repository-s3/licenses/httpclient-NOTICE.txt b/modules/repository-s3/licenses/httpclient-NOTICE.txt similarity index 71% rename from plugins/repository-s3/licenses/httpclient-NOTICE.txt rename to modules/repository-s3/licenses/httpclient-NOTICE.txt index 4f6058178b20..91e5c40c4c6d 100644 --- a/plugins/repository-s3/licenses/httpclient-NOTICE.txt +++ b/modules/repository-s3/licenses/httpclient-NOTICE.txt @@ -1,5 +1,6 @@ Apache HttpComponents Client -Copyright 1999-2015 The Apache Software Foundation +Copyright 1999-2016 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). + diff --git a/plugins/repository-s3/licenses/httpcore-4.4.12.jar.sha1 b/modules/repository-s3/licenses/httpcore-4.4.12.jar.sha1 similarity index 100% rename from plugins/repository-s3/licenses/httpcore-4.4.12.jar.sha1 rename to modules/repository-s3/licenses/httpcore-4.4.12.jar.sha1 diff --git a/plugins/repository-s3/licenses/httpcore-LICENSE.txt b/modules/repository-s3/licenses/httpcore-LICENSE.txt similarity index 100% rename from plugins/repository-s3/licenses/httpcore-LICENSE.txt rename to modules/repository-s3/licenses/httpcore-LICENSE.txt diff --git a/plugins/repository-s3/licenses/httpcore-NOTICE.txt b/modules/repository-s3/licenses/httpcore-NOTICE.txt similarity index 100% rename from plugins/repository-s3/licenses/httpcore-NOTICE.txt rename to modules/repository-s3/licenses/httpcore-NOTICE.txt diff --git a/plugins/repository-s3/licenses/jackson-LICENSE b/modules/repository-s3/licenses/jackson-LICENSE similarity index 100% rename from plugins/repository-s3/licenses/jackson-LICENSE rename to modules/repository-s3/licenses/jackson-LICENSE diff --git a/plugins/repository-s3/licenses/jackson-NOTICE b/modules/repository-s3/licenses/jackson-NOTICE similarity index 100% rename from plugins/repository-s3/licenses/jackson-NOTICE rename to modules/repository-s3/licenses/jackson-NOTICE diff --git a/plugins/repository-s3/licenses/jackson-annotations-2.10.4.jar.sha1 b/modules/repository-s3/licenses/jackson-annotations-2.10.4.jar.sha1 similarity index 100% rename from plugins/repository-s3/licenses/jackson-annotations-2.10.4.jar.sha1 rename to modules/repository-s3/licenses/jackson-annotations-2.10.4.jar.sha1 diff --git a/plugins/repository-s3/licenses/jackson-databind-2.10.4.jar.sha1 b/modules/repository-s3/licenses/jackson-databind-2.10.4.jar.sha1 similarity index 100% rename from plugins/repository-s3/licenses/jackson-databind-2.10.4.jar.sha1 rename to modules/repository-s3/licenses/jackson-databind-2.10.4.jar.sha1 diff --git a/plugins/repository-s3/licenses/jaxb-LICENSE.txt b/modules/repository-s3/licenses/jaxb-LICENSE.txt similarity index 100% rename from plugins/repository-s3/licenses/jaxb-LICENSE.txt rename to modules/repository-s3/licenses/jaxb-LICENSE.txt diff --git a/plugins/repository-s3/licenses/jaxb-NOTICE.txt b/modules/repository-s3/licenses/jaxb-NOTICE.txt similarity index 100% rename from plugins/repository-s3/licenses/jaxb-NOTICE.txt rename to modules/repository-s3/licenses/jaxb-NOTICE.txt diff --git a/plugins/repository-s3/licenses/jaxb-api-2.2.2.jar.sha1 b/modules/repository-s3/licenses/jaxb-api-2.2.2.jar.sha1 similarity index 100% rename from plugins/repository-s3/licenses/jaxb-api-2.2.2.jar.sha1 rename to modules/repository-s3/licenses/jaxb-api-2.2.2.jar.sha1 diff --git a/plugins/repository-s3/licenses/jmespath-java-1.11.749.jar.sha1 b/modules/repository-s3/licenses/jmespath-java-1.11.749.jar.sha1 similarity index 100% rename from plugins/repository-s3/licenses/jmespath-java-1.11.749.jar.sha1 rename to modules/repository-s3/licenses/jmespath-java-1.11.749.jar.sha1 diff --git a/plugins/repository-s3/licenses/joda-time-2.8.1.jar.sha1 b/modules/repository-s3/licenses/joda-time-2.8.1.jar.sha1 similarity index 100% rename from plugins/repository-s3/licenses/joda-time-2.8.1.jar.sha1 rename to modules/repository-s3/licenses/joda-time-2.8.1.jar.sha1 diff --git a/plugins/repository-s3/licenses/joda-time-LICENSE.txt b/modules/repository-s3/licenses/joda-time-LICENSE.txt similarity index 100% rename from plugins/repository-s3/licenses/joda-time-LICENSE.txt rename to modules/repository-s3/licenses/joda-time-LICENSE.txt diff --git a/plugins/repository-s3/licenses/joda-time-NOTICE.txt b/modules/repository-s3/licenses/joda-time-NOTICE.txt similarity index 100% rename from plugins/repository-s3/licenses/joda-time-NOTICE.txt rename to modules/repository-s3/licenses/joda-time-NOTICE.txt diff --git a/plugins/repository-s3/licenses/log4j-1.2-api-2.17.1.jar.sha1 b/modules/repository-s3/licenses/log4j-1.2-api-2.17.1.jar.sha1 similarity index 100% rename from plugins/repository-s3/licenses/log4j-1.2-api-2.17.1.jar.sha1 rename to modules/repository-s3/licenses/log4j-1.2-api-2.17.1.jar.sha1 diff --git a/plugins/repository-s3/licenses/log4j-LICENSE.txt b/modules/repository-s3/licenses/log4j-LICENSE.txt similarity index 100% rename from plugins/repository-s3/licenses/log4j-LICENSE.txt rename to modules/repository-s3/licenses/log4j-LICENSE.txt diff --git a/plugins/repository-s3/licenses/log4j-NOTICE.txt b/modules/repository-s3/licenses/log4j-NOTICE.txt similarity index 100% rename from plugins/repository-s3/licenses/log4j-NOTICE.txt rename to modules/repository-s3/licenses/log4j-NOTICE.txt diff --git a/plugins/repository-s3/src/internalClusterTest/java/org/elasticsearch/repositories/s3/S3BlobStoreRepositoryTests.java b/modules/repository-s3/src/internalClusterTest/java/org/elasticsearch/repositories/s3/S3BlobStoreRepositoryTests.java similarity index 100% rename from plugins/repository-s3/src/internalClusterTest/java/org/elasticsearch/repositories/s3/S3BlobStoreRepositoryTests.java rename to modules/repository-s3/src/internalClusterTest/java/org/elasticsearch/repositories/s3/S3BlobStoreRepositoryTests.java diff --git a/plugins/repository-s3/src/internalClusterTest/java/org/elasticsearch/repositories/s3/S3RepositoryThirdPartyTests.java b/modules/repository-s3/src/internalClusterTest/java/org/elasticsearch/repositories/s3/S3RepositoryThirdPartyTests.java similarity index 100% rename from plugins/repository-s3/src/internalClusterTest/java/org/elasticsearch/repositories/s3/S3RepositoryThirdPartyTests.java rename to modules/repository-s3/src/internalClusterTest/java/org/elasticsearch/repositories/s3/S3RepositoryThirdPartyTests.java diff --git a/plugins/repository-s3/config/repository-s3/log4j2.properties b/modules/repository-s3/src/main/config/log4j2.properties similarity index 100% rename from plugins/repository-s3/config/repository-s3/log4j2.properties rename to modules/repository-s3/src/main/config/log4j2.properties diff --git a/plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/AmazonS3Reference.java b/modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/AmazonS3Reference.java similarity index 100% rename from plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/AmazonS3Reference.java rename to modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/AmazonS3Reference.java diff --git a/plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3BasicCredentials.java b/modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3BasicCredentials.java similarity index 100% rename from plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3BasicCredentials.java rename to modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3BasicCredentials.java diff --git a/plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3BasicSessionCredentials.java b/modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3BasicSessionCredentials.java similarity index 100% rename from plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3BasicSessionCredentials.java rename to modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3BasicSessionCredentials.java diff --git a/plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3BlobContainer.java b/modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3BlobContainer.java similarity index 100% rename from plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3BlobContainer.java rename to modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3BlobContainer.java diff --git a/plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3BlobStore.java b/modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3BlobStore.java similarity index 100% rename from plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3BlobStore.java rename to modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3BlobStore.java diff --git a/plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3ClientSettings.java b/modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3ClientSettings.java similarity index 100% rename from plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3ClientSettings.java rename to modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3ClientSettings.java diff --git a/plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3Repository.java b/modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3Repository.java similarity index 100% rename from plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3Repository.java rename to modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3Repository.java diff --git a/plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3RepositoryPlugin.java b/modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3RepositoryPlugin.java similarity index 100% rename from plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3RepositoryPlugin.java rename to modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3RepositoryPlugin.java diff --git a/plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3RetryingInputStream.java b/modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3RetryingInputStream.java similarity index 100% rename from plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3RetryingInputStream.java rename to modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3RetryingInputStream.java diff --git a/plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3Service.java b/modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3Service.java similarity index 100% rename from plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3Service.java rename to modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3Service.java diff --git a/plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/SocketAccess.java b/modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/SocketAccess.java similarity index 100% rename from plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/SocketAccess.java rename to modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3/SocketAccess.java diff --git a/plugins/repository-s3/src/main/plugin-metadata/plugin-security.policy b/modules/repository-s3/src/main/plugin-metadata/plugin-security.policy similarity index 100% rename from plugins/repository-s3/src/main/plugin-metadata/plugin-security.policy rename to modules/repository-s3/src/main/plugin-metadata/plugin-security.policy diff --git a/plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/AmazonS3Wrapper.java b/modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3/AmazonS3Wrapper.java similarity index 100% rename from plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/AmazonS3Wrapper.java rename to modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3/AmazonS3Wrapper.java diff --git a/plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/AwsS3ServiceImplTests.java b/modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3/AwsS3ServiceImplTests.java similarity index 100% rename from plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/AwsS3ServiceImplTests.java rename to modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3/AwsS3ServiceImplTests.java diff --git a/plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/RepositoryCredentialsTests.java b/modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3/RepositoryCredentialsTests.java similarity index 100% rename from plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/RepositoryCredentialsTests.java rename to modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3/RepositoryCredentialsTests.java diff --git a/plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3BlobContainerRetriesTests.java b/modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3BlobContainerRetriesTests.java similarity index 100% rename from plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3BlobContainerRetriesTests.java rename to modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3BlobContainerRetriesTests.java diff --git a/plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3BlobStoreContainerTests.java b/modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3BlobStoreContainerTests.java similarity index 100% rename from plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3BlobStoreContainerTests.java rename to modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3BlobStoreContainerTests.java diff --git a/plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3ClientSettingsTests.java b/modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3ClientSettingsTests.java similarity index 100% rename from plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3ClientSettingsTests.java rename to modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3ClientSettingsTests.java diff --git a/plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3RepositoryTests.java b/modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3RepositoryTests.java similarity index 100% rename from plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3RepositoryTests.java rename to modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3RepositoryTests.java diff --git a/plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3RetryingInputStreamTests.java b/modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3RetryingInputStreamTests.java similarity index 100% rename from plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3RetryingInputStreamTests.java rename to modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3RetryingInputStreamTests.java diff --git a/plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3ServiceTests.java b/modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3ServiceTests.java similarity index 100% rename from plugins/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3ServiceTests.java rename to modules/repository-s3/src/test/java/org/elasticsearch/repositories/s3/S3ServiceTests.java diff --git a/plugins/repository-s3/src/yamlRestTest/java/org/elasticsearch/repositories/s3/RepositoryS3ClientYamlTestSuiteIT.java b/modules/repository-s3/src/yamlRestTest/java/org/elasticsearch/repositories/s3/RepositoryS3ClientYamlTestSuiteIT.java similarity index 100% rename from plugins/repository-s3/src/yamlRestTest/java/org/elasticsearch/repositories/s3/RepositoryS3ClientYamlTestSuiteIT.java rename to modules/repository-s3/src/yamlRestTest/java/org/elasticsearch/repositories/s3/RepositoryS3ClientYamlTestSuiteIT.java diff --git a/plugins/repository-s3/src/yamlRestTest/resources/rest-api-spec/test/repository_s3/10_basic.yml b/modules/repository-s3/src/yamlRestTest/resources/rest-api-spec/test/repository_s3/10_basic.yml similarity index 73% rename from plugins/repository-s3/src/yamlRestTest/resources/rest-api-spec/test/repository_s3/10_basic.yml rename to modules/repository-s3/src/yamlRestTest/resources/rest-api-spec/test/repository_s3/10_basic.yml index cde14321805f..7ff857ffa0bf 100644 --- a/plugins/repository-s3/src/yamlRestTest/resources/rest-api-spec/test/repository_s3/10_basic.yml +++ b/modules/repository-s3/src/yamlRestTest/resources/rest-api-spec/test/repository_s3/10_basic.yml @@ -1,6 +1,6 @@ # Integration tests for repository-s3 # -"Plugin repository-s3 is loaded": +"Module repository-s3 is loaded": - skip: reason: "contains is a newly added assertion" features: contains @@ -13,4 +13,4 @@ - do: nodes.info: {} - - contains: { nodes.$master.plugins: { name: repository-s3 } } + - contains: { nodes.$master.modules: { name: repository-s3 } } diff --git a/plugins/repository-s3/src/yamlRestTest/resources/rest-api-spec/test/repository_s3/20_repository_permanent_credentials.yml b/modules/repository-s3/src/yamlRestTest/resources/rest-api-spec/test/repository_s3/20_repository_permanent_credentials.yml similarity index 100% rename from plugins/repository-s3/src/yamlRestTest/resources/rest-api-spec/test/repository_s3/20_repository_permanent_credentials.yml rename to modules/repository-s3/src/yamlRestTest/resources/rest-api-spec/test/repository_s3/20_repository_permanent_credentials.yml diff --git a/plugins/repository-s3/src/yamlRestTest/resources/rest-api-spec/test/repository_s3/30_repository_temporary_credentials.yml b/modules/repository-s3/src/yamlRestTest/resources/rest-api-spec/test/repository_s3/30_repository_temporary_credentials.yml similarity index 100% rename from plugins/repository-s3/src/yamlRestTest/resources/rest-api-spec/test/repository_s3/30_repository_temporary_credentials.yml rename to modules/repository-s3/src/yamlRestTest/resources/rest-api-spec/test/repository_s3/30_repository_temporary_credentials.yml diff --git a/plugins/repository-s3/src/yamlRestTest/resources/rest-api-spec/test/repository_s3/40_repository_ec2_credentials.yml b/modules/repository-s3/src/yamlRestTest/resources/rest-api-spec/test/repository_s3/40_repository_ec2_credentials.yml similarity index 100% rename from plugins/repository-s3/src/yamlRestTest/resources/rest-api-spec/test/repository_s3/40_repository_ec2_credentials.yml rename to modules/repository-s3/src/yamlRestTest/resources/rest-api-spec/test/repository_s3/40_repository_ec2_credentials.yml diff --git a/plugins/repository-s3/src/yamlRestTest/resources/rest-api-spec/test/repository_s3/50_repository_ecs_credentials.yml b/modules/repository-s3/src/yamlRestTest/resources/rest-api-spec/test/repository_s3/50_repository_ecs_credentials.yml similarity index 100% rename from plugins/repository-s3/src/yamlRestTest/resources/rest-api-spec/test/repository_s3/50_repository_ecs_credentials.yml rename to modules/repository-s3/src/yamlRestTest/resources/rest-api-spec/test/repository_s3/50_repository_ecs_credentials.yml diff --git a/plugins/build.gradle b/plugins/build.gradle index 73861b599e51..273c299a6e65 100644 --- a/plugins/build.gradle +++ b/plugins/build.gradle @@ -11,17 +11,9 @@ subprojects { } configurations { - repositoryPlugins - nonRepositoryPlugins + allPlugins } -// Intentionally doesn't include `repository-hdfs` -List repositoryPlugins = [ - 'repository-azure', - 'repository-gcs', - 'repository-s3' -] - // only configure immediate children of plugins dir configure(subprojects.findAll { it.parent.path == project.path }) { group = 'org.elasticsearch.plugin' @@ -36,9 +28,5 @@ configure(subprojects.findAll { it.parent.path == project.path }) { } - if (repositoryPlugins.contains(project.name)) { - parent.artifacts.add('repositoryPlugins', tasks.named('bundlePlugin')) - } else { - parent.artifacts.add('nonRepositoryPlugins', tasks.named('bundlePlugin')) - } + parent.artifacts.add('allPlugins', tasks.named('bundlePlugin')) } diff --git a/plugins/discovery-azure-classic/build.gradle b/plugins/discovery-azure-classic/build.gradle index 8fad76700aa0..e2ae1340dec9 100644 --- a/plugins/discovery-azure-classic/build.gradle +++ b/plugins/discovery-azure-classic/build.gradle @@ -16,26 +16,26 @@ esplugin { classname 'org.elasticsearch.plugin.discovery.azure.classic.AzureDiscoveryPlugin' } -versions << [ +def localVersions = versions + [ 'azure' : '0.9.3', 'jersey': '1.13' ] dependencies { - api "com.microsoft.azure:azure-svc-mgmt-compute:${versions.azure}" - api "com.microsoft.azure:azure-core:${versions.azure}" - api "org.apache.httpcomponents:httpclient:${versions.httpclient}" - api "org.apache.httpcomponents:httpcore:${versions.httpcore}" - api "commons-logging:commons-logging:${versions.commonslogging}" - api "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}" - api "commons-codec:commons-codec:${versions.commonscodec}" + api "com.microsoft.azure:azure-svc-mgmt-compute:${localVersions.azure}" + api "com.microsoft.azure:azure-core:${localVersions.azure}" + api "org.apache.httpcomponents:httpclient:${localVersions.httpclient}" + api "org.apache.httpcomponents:httpcore:${localVersions.httpcore}" + api "commons-logging:commons-logging:${localVersions.commonslogging}" + api "org.apache.logging.log4j:log4j-1.2-api:${localVersions.log4j}" + api "commons-codec:commons-codec:${localVersions.commonscodec}" api "commons-lang:commons-lang:2.6" api "commons-io:commons-io:2.4" api 'javax.mail:mail:1.4.5' api 'javax.inject:javax.inject:1' - api "com.sun.jersey:jersey-client:${versions.jersey}" - api "com.sun.jersey:jersey-core:${versions.jersey}" - api "com.sun.jersey:jersey-json:${versions.jersey}" + api "com.sun.jersey:jersey-client:${localVersions.jersey}" + api "com.sun.jersey:jersey-core:${localVersions.jersey}" + api "com.sun.jersey:jersey-json:${localVersions.jersey}" api 'org.codehaus.jettison:jettison:1.1' api 'com.sun.xml.bind:jaxb-impl:2.2.3-1' api 'org.codehaus.jackson:jackson-core-asl:1.9.2' diff --git a/qa/os/src/test/java/org/elasticsearch/packaging/test/DebMetadataTests.java b/qa/os/src/test/java/org/elasticsearch/packaging/test/DebMetadataTests.java index 37277cecbbdb..c4ebeeec2bc9 100644 --- a/qa/os/src/test/java/org/elasticsearch/packaging/test/DebMetadataTests.java +++ b/qa/os/src/test/java/org/elasticsearch/packaging/test/DebMetadataTests.java @@ -29,10 +29,13 @@ public class DebMetadataTests extends PackagingTestCase { public void test05CheckLintian() { String extraArgs = ""; - if (sh.run("lintian --help").stdout.contains("fail-on-warnings")) { - extraArgs = "--fail-on-warnings "; + final String helpText = sh.run("lintian --help").stdout; + if (helpText.contains("fail-on-warnings")) { + extraArgs = "--fail-on-warnings"; + } else if (helpText.contains("--fail-on error")) { + extraArgs = "--fail-on warning"; } - sh.run("lintian " + extraArgs + FileUtils.getDistributionFile(distribution())); + sh.run("lintian %s %s".formatted(extraArgs, FileUtils.getDistributionFile(distribution()))); } public void test06Dependencies() { diff --git a/qa/os/src/test/java/org/elasticsearch/packaging/test/DockerTests.java b/qa/os/src/test/java/org/elasticsearch/packaging/test/DockerTests.java index d378a1a5797a..58cbc6be097e 100644 --- a/qa/os/src/test/java/org/elasticsearch/packaging/test/DockerTests.java +++ b/qa/os/src/test/java/org/elasticsearch/packaging/test/DockerTests.java @@ -22,7 +22,6 @@ import org.elasticsearch.packaging.util.Shell.Result; import org.elasticsearch.packaging.util.docker.DockerRun; import org.elasticsearch.packaging.util.docker.DockerShell; import org.elasticsearch.packaging.util.docker.MockServer; -import org.hamcrest.Matcher; import org.junit.After; import org.junit.Before; import org.junit.BeforeClass; @@ -36,7 +35,6 @@ import java.util.List; import java.util.Map; import java.util.Optional; import java.util.Set; -import java.util.StringJoiner; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -77,6 +75,7 @@ import static org.hamcrest.Matchers.arrayContaining; import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.empty; import static org.hamcrest.Matchers.emptyString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasEntry; @@ -171,29 +170,10 @@ public class DockerTests extends PackagingTestCase { assertThat("Expected no plugins to be listed", r.stdout, emptyString()); } - /** - * Check that Cloud images bundle a selection of plugins. - */ - public void test021PluginsListWithDefaultCloudPlugins() { - assumeTrue( - "Only applies to Cloud images", - distribution.packaging == Packaging.DOCKER_CLOUD || distribution().packaging == Packaging.DOCKER_CLOUD_ESS - ); - - final Installation.Executables bin = installation.executables(); - final List plugins = sh.run(bin.pluginTool + " list").stdout.lines().collect(Collectors.toList()); - - assertThat( - "Expected standard plugins to be listed", - plugins, - equalTo(List.of("repository-azure", "repository-gcs", "repository-s3")) - ); - } - /** * Check that a plugin can be installed without special permissions. */ - public void test022InstallPlugin() { + public void test021InstallPlugin() { runContainer( distribution(), builder().envVar("ELASTIC_PASSWORD", PASSWORD).volume(Path.of(EXAMPLE_PLUGIN_PATH), "/analysis-icu.zip") @@ -205,20 +185,13 @@ public class DockerTests extends PackagingTestCase { final Installation.Executables bin = installation.executables(); sh.run(bin.pluginTool + " install file:///analysis-icu.zip"); - final boolean isCloudImage = distribution().packaging == Packaging.DOCKER_CLOUD - || distribution().packaging == Packaging.DOCKER_CLOUD_ESS; - - final Matcher> matcher = isCloudImage - ? containsInAnyOrder("repository-azure", "repository-gcs", "repository-s3", "analysis-icu") - : equalTo(List.of("analysis-icu")); - - assertThat("Expected installed plugins to be listed", listPlugins(), matcher); + assertThat("Expected installed plugins to be listed", listPlugins(), equalTo(List.of("analysis-icu"))); } /** * Checks that ESS images can install plugins from the local archive. */ - public void test023InstallPluginsFromLocalArchive() { + public void test022InstallPluginsFromLocalArchive() { assumeTrue("Only ESS images have a local archive", distribution().packaging == Packaging.DOCKER_CLOUD_ESS); final String plugin = "analysis-icu"; @@ -237,22 +210,13 @@ public class DockerTests extends PackagingTestCase { /** * Checks that plugins can be installed by deploying a plugins config file. */ - public void test024InstallPluginUsingConfigFile() { - final boolean isCloudImage = distribution().packaging == Packaging.DOCKER_CLOUD - || distribution().packaging == Packaging.DOCKER_CLOUD_ESS; - - final StringJoiner pluginsDescriptor = new StringJoiner("\n", "", "\n"); - pluginsDescriptor.add("plugins:"); - pluginsDescriptor.add(" - id: analysis-icu"); - pluginsDescriptor.add(" location: file:///analysis-icu.zip"); - if (isCloudImage) { - // The repository plugins have to be present, because (1) they are preinstalled, and (2) they - // are owned by `root` and can't be removed. - Stream.of("repository-s3", "repository-azure", "repository-gcs").forEach(plugin -> pluginsDescriptor.add(" - id: " + plugin)); - } - + public void test023InstallPluginUsingConfigFile() { final String filename = "elasticsearch-plugins.yml"; - append(tempDir.resolve(filename), pluginsDescriptor.toString()); + append(tempDir.resolve(filename), """ + plugins: + - id: analysis-icu + location: file:///analysis-icu.zip + """); // Restart the container. This will sync the plugins automatically. Also // stuff the proxy settings with garbage, so any attempt to go out to the internet would fail. The @@ -277,21 +241,15 @@ public class DockerTests extends PackagingTestCase { /** * Checks that ESS images can manage plugins from the local archive by deploying a plugins config file. */ - public void test025InstallPluginFromArchiveUsingConfigFile() { + public void test024InstallPluginFromArchiveUsingConfigFile() { assumeTrue("Only ESS image has a plugin archive", distribution().packaging == Packaging.DOCKER_CLOUD_ESS); - // The repository plugins have to be present, because (1) they are preinstalled, and (2) they - // are owned by `root` and can't be removed. - final String[] plugins = { "repository-s3", "repository-azure", "repository-gcs", "analysis-icu", "analysis-phonetic" }; - - final StringJoiner pluginsDescriptor = new StringJoiner("\n", "", "\n"); - pluginsDescriptor.add("plugins:"); - for (String plugin : plugins) { - pluginsDescriptor.add(" - id: " + plugin); - } - final String filename = "elasticsearch-plugins.yml"; - append(tempDir.resolve(filename), pluginsDescriptor.toString()); + append(tempDir.resolve(filename), """ + plugins: + - id: analysis-icu + - id: analysis-phonetic + """); // Restart the container. This will sync the plugins automatically. Also // stuff the proxy settings with garbage, so any attempt to go out to the internet would fail. The @@ -309,40 +267,31 @@ public class DockerTests extends PackagingTestCase { // Since ES is doing the installing, give it a chance to complete waitForElasticsearch(installation, "elastic", PASSWORD); - assertThat("List of installed plugins is incorrect", listPlugins(), containsInAnyOrder(plugins)); + assertThat("List of installed plugins is incorrect", listPlugins(), containsInAnyOrder("analysis-icu", "analysis-phonetic")); } /** * Check that when using Elasticsearch's plugins sync capability, it will use a proxy when configured to do so. * This could either be in the plugins config file, or via the standard Java system properties. */ - public void test024SyncPluginsUsingProxy() { + public void test025SyncPluginsUsingProxy() { MockServer.withMockServer(mockServer -> { for (boolean useConfigFile : List.of(true, false)) { mockServer.clearExpectations(); - final StringJoiner config = new StringJoiner("\n", "", "\n"); - config.add("plugins:"); - // The repository plugins have to be present for Cloud images, because (1) they are preinstalled, and (2) they - // are owned by `root` and can't be removed. - if (distribution().packaging == Packaging.DOCKER_CLOUD || distribution().packaging == Packaging.DOCKER_CLOUD_ESS) { - for (String plugin : List.of("repository-s3", "repository-azure", "repository-gcs", "analysis-icu")) { - config.add(" - id: " + plugin); - } - } - // This is the new plugin to install. We don't use an official plugin because then Elasticsearch - // will attempt an SSL connection and that just makes everything more complicated. - config.add(" - id: my-plugin"); - config.add(" location: http://example.com/my-plugin.zip"); - - if (useConfigFile) { - config.add("proxy: mockserver:" + mockServer.getPort()); - } + final String config = """ + plugins: + # This is the new plugin to install. We don't use an official plugin because then Elasticsearch + # will attempt an SSL connection and that just makes everything more complicated. + - id: my-plugin + location: http://example.com/my-plugin.zip + %s + """.formatted(useConfigFile ? "proxy: mockserver:" + mockServer.getPort() : ""); final String filename = "elasticsearch-plugins.yml"; final Path pluginsConfigPath = tempDir.resolve(filename); deleteIfExists(pluginsConfigPath); - append(pluginsConfigPath, config.toString()); + append(pluginsConfigPath, config); final DockerRun builder = builder().volume(pluginsConfigPath, installation.config.resolve(filename)) .extraArgs("--link " + mockServer.getContainerId() + ":mockserver"); @@ -370,6 +319,52 @@ public class DockerTests extends PackagingTestCase { }); } + /** + * Check that attempting to install the repository plugins that have been migrated to modules succeeds, but does nothing. + */ + public void test026InstallBundledRepositoryPlugins() { + assertThat("Expected no plugins to be installed", listPlugins(), is(empty())); + + installation.executables().pluginTool.run("install repository-azure repository-gcs repository-s3"); + + assertThat("Still expected no plugins to be installed", listPlugins(), is(empty())); + + // Removal should also succeed + installation.executables().pluginTool.run("remove repository-azure repository-gcs repository-s3"); + } + + /** + * Check that attempting to install the repository plugins that have been migrated to modules succeeds + * when using a plugins config file but does nothing. + */ + public void test026InstallBundledRepositoryPluginsViaConfigFile() { + final String filename = "elasticsearch-plugins.yml"; + append(tempDir.resolve(filename), """ + plugins: + - id: repository-azure + - id: repository-gcs + - id: repository-s3 + """); + + // Restart the container. This will sync the plugins automatically. Also + // stuff the proxy settings with garbage, so any attempt to go out to the internet would fail. The + // sync shouldn't be doing anything anyway. + runContainer( + distribution(), + builder().volume(tempDir.resolve(filename), installation.config.resolve(filename)) + .envVar("ELASTIC_PASSWORD", PASSWORD) + .envVar( + "ES_JAVA_OPTS", + "-Dhttp.proxyHost=example.org -Dhttp.proxyPort=9999 -Dhttps.proxyHost=example.org -Dhttps.proxyPort=9999" + ) + ); + + // Since ES is doing the installing, give it a chance to complete + waitForElasticsearch(installation, "elastic", PASSWORD); + + assertThat("Expected no plugins to be installed", listPlugins(), is(empty())); + } + /** * Check that the JDK's `cacerts` file is a symlink to the copy provided by the operating system. */ @@ -749,7 +744,7 @@ public class DockerTests extends PackagingTestCase { * Check that environment variables are translated to -E options even for commands invoked under * `docker exec`, where the Docker image's entrypoint is not executed. */ - public void test085EnvironmentVariablesAreRespectedUnderDockerExec() throws Exception { + public void test085EnvironmentVariablesAreRespectedUnderDockerExec() { installation = runContainer(distribution(), builder().envVar("ELASTIC_PASSWORD", "hunter2")); // The tool below requires a keystore, so ensure that ES is fully initialised before proceeding. @@ -996,7 +991,7 @@ public class DockerTests extends PackagingTestCase { waitForElasticsearch(installation, "elastic", PASSWORD); final Result containerLogs = getContainerLogs(); - final List stdout = containerLogs.stdout.lines().collect(Collectors.toList()); + final List stdout = containerLogs.stdout.lines().toList(); // We select to look for a line near the beginning so that we don't stumble upon the stdout printing of auto-configured credentials assertThat("Container logs should be formatted using the stack config", stdout.get(10), matchesPattern("^\\[\\d\\d\\d\\d-.*")); assertThat("[logs/docker-cluster.log] should exist but it doesn't", existsInContainer("logs/docker-cluster.log"), is(true)); @@ -1011,7 +1006,7 @@ public class DockerTests extends PackagingTestCase { waitForElasticsearch(installation, "elastic", PASSWORD); final Result containerLogs = getContainerLogs(); - final List stdout = containerLogs.stdout.lines().collect(Collectors.toList()); + final List stdout = containerLogs.stdout.lines().toList(); // We select to look for a line near the beginning so that we don't stumble upon the stdout printing of auto-configured credentials assertThat("Container logs should be formatted using the docker config", stdout.get(10), startsWith("{\"")); assertThat("[logs/docker-cluster.log] shouldn't exist but it does", existsInContainer("logs/docker-cluster.log"), is(false)); diff --git a/qa/os/src/test/java/org/elasticsearch/packaging/test/PluginCliTests.java b/qa/os/src/test/java/org/elasticsearch/packaging/test/PluginCliTests.java index 104ac3dde95a..552c250d51c5 100644 --- a/qa/os/src/test/java/org/elasticsearch/packaging/test/PluginCliTests.java +++ b/qa/os/src/test/java/org/elasticsearch/packaging/test/PluginCliTests.java @@ -19,10 +19,13 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; +import java.util.List; import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.emptyString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.not; import static org.junit.Assume.assumeFalse; import static org.junit.Assume.assumeTrue; @@ -158,4 +161,40 @@ public class PluginCliTests extends PackagingTestCase { FileUtils.rm(installation.config("elasticsearch-plugins.yml")); } } + + /** + * Check that attempting to install a plugin that has been promoted to a module + * succeeds, but does nothing. + */ + public void test40InstallOfModularizedPluginsSucceedsButDoesNothing() { + for (String pluginId : List.of("repository-azure", "repository-gcs", "repository-s3")) { + String stderr = installation.executables().pluginTool.run("install " + pluginId).stderr; + assertThat( + "Expected plugin installed to warn about migrated plugins", + stderr, + containsString("[" + pluginId + "] is no longer a plugin") + ); + + String pluginList = installation.executables().pluginTool.run("list").stdout; + assertThat(pluginId + " should not appear in the plugin list", pluginList, not(containsString(pluginId))); + } + } + + /** + * Check that attempting to remove a plugin that has been promoted to a module + * succeeds, but does nothing. + */ + public void test41RemovalOfModularizedPluginsSucceedsButDoesNothing() { + String pluginList = installation.executables().pluginTool.run("list").stdout; + assertThat("Expected no plugins to be installed", pluginList.trim(), is(emptyString())); + + for (String pluginId : List.of("repository-azure", "repository-gcs", "repository-s3")) { + String stderr = installation.executables().pluginTool.run("remove " + pluginId).stderr; + assertThat( + "Expected plugin installer to warn about migrated plugins", + stderr, + containsString("[" + pluginId + "] is no longer a plugin") + ); + } + } } diff --git a/server/src/main/java/org/elasticsearch/common/Strings.java b/server/src/main/java/org/elasticsearch/common/Strings.java index 4ee307e27e53..563c118fb2d7 100644 --- a/server/src/main/java/org/elasticsearch/common/Strings.java +++ b/server/src/main/java/org/elasticsearch/common/Strings.java @@ -911,10 +911,29 @@ public class Strings { return str; } + /** + * Checks that the supplied string is neither null nor blank, per {@link #isNullOrBlank(String)}. + * If this check fails, then an {@link IllegalArgumentException} is thrown with the supplied message. + * + * @param str the String to check + * @param message the exception message to use if {@code str} is null or blank + * @return the supplied {@code str} + */ + public static String requireNonBlank(String str, String message) { + if (isNullOrBlank(str)) { + throw new IllegalArgumentException(message); + } + return str; + } + public static boolean isNullOrEmpty(@Nullable String s) { return s == null || s.isEmpty(); } + public static boolean isNullOrBlank(@Nullable String s) { + return s == null || s.isBlank(); + } + public static String coalesceToEmpty(@Nullable String s) { return s == null ? "" : s; } diff --git a/x-pack/plugin/eql/qa/correctness/build.gradle b/x-pack/plugin/eql/qa/correctness/build.gradle index 04a638791a22..681a0acf7148 100644 --- a/x-pack/plugin/eql/qa/correctness/build.gradle +++ b/x-pack/plugin/eql/qa/correctness/build.gradle @@ -31,7 +31,6 @@ if (BuildParams.inFipsJvm){ } testClusters.configureEach { - plugin ':plugins:repository-gcs' if (serviceAccountFile) { keystore 'gcs.client.eql_test.credentials_file', serviceAccountFile } diff --git a/x-pack/plugin/repositories-metering-api/qa/azure/build.gradle b/x-pack/plugin/repositories-metering-api/qa/azure/build.gradle index 66ccc9e2f03b..cf34c5a83bee 100644 --- a/x-pack/plugin/repositories-metering-api/qa/azure/build.gradle +++ b/x-pack/plugin/repositories-metering-api/qa/azure/build.gradle @@ -13,11 +13,9 @@ apply plugin: 'elasticsearch.rest-test' apply plugin: 'elasticsearch.rest-resources' final Project fixture = project(':test:fixtures:azure-fixture') -final Project repositoryPlugin = project(':plugins:repository-azure') dependencies { testImplementation(testArtifact(project(xpackModule('repositories-metering-api')))) - testImplementation repositoryPlugin } restResources { @@ -53,14 +51,12 @@ testClusters.configureEach { } tasks.named("integTest") { - dependsOn ":plugins:repository-azure:bundlePlugin" systemProperty 'test.azure.container', azureContainer nonInputProperties.systemProperty 'test.azure.base_path', azureBasePath + "_repositories_metering_tests_" + BuildParams.testSeed } testClusters.matching { it.name == "integTest" }.configureEach { testDistribution = 'DEFAULT' - plugin ":plugins:repository-azure" keystore 'azure.client.repositories_metering.account', azureAccount if (azureKey != null && azureKey.isEmpty() == false) { diff --git a/x-pack/plugin/repositories-metering-api/qa/gcs/build.gradle b/x-pack/plugin/repositories-metering-api/qa/gcs/build.gradle index 5cb7fb308bf7..0215540597ae 100644 --- a/x-pack/plugin/repositories-metering-api/qa/gcs/build.gradle +++ b/x-pack/plugin/repositories-metering-api/qa/gcs/build.gradle @@ -19,11 +19,9 @@ apply plugin: 'elasticsearch.rest-test' apply plugin: 'elasticsearch.rest-resources' final Project fixture = project(':test:fixtures:gcs-fixture') -final Project repositoryPlugin = project(':plugins:repository-gcs') dependencies { testImplementation(testArtifact(project(xpackModule('repositories-metering-api')))) - testImplementation repositoryPlugin } restResources { @@ -97,7 +95,6 @@ if (useFixture) { } tasks.named("integTest").configure { - dependsOn ":plugins:repository-gcs:bundlePlugin" if (useFixture) { dependsOn "createServiceAccountFile" } @@ -107,7 +104,6 @@ tasks.named("integTest").configure { testClusters.matching { it.name == "integTest" }.configureEach { testDistribution = 'DEFAULT' - plugin repositoryPlugin.bundlePlugin.archiveFile keystore 'gcs.client.repositories_metering.credentials_file', serviceAccountFile, IGNORE_VALUE if (useFixture) { diff --git a/x-pack/plugin/repositories-metering-api/qa/s3/build.gradle b/x-pack/plugin/repositories-metering-api/qa/s3/build.gradle index ed0e0af0d849..826eaed8a9db 100644 --- a/x-pack/plugin/repositories-metering-api/qa/s3/build.gradle +++ b/x-pack/plugin/repositories-metering-api/qa/s3/build.gradle @@ -6,11 +6,9 @@ apply plugin: 'elasticsearch.rest-test' apply plugin: 'elasticsearch.rest-resources' final Project fixture = project(':test:fixtures:s3-fixture') -final Project repositoryPlugin = project(':plugins:repository-s3') dependencies { testImplementation(testArtifact(project(xpackModule('repositories-metering-api')))) - testImplementation repositoryPlugin } restResources { @@ -42,14 +40,12 @@ if (useFixture) { } tasks.named("integTest").configure { - dependsOn ':plugins:repository-s3:bundlePlugin' systemProperty 'test.s3.bucket', s3Bucket nonInputProperties.systemProperty 'test.s3.base_path', s3BasePath ? s3BasePath + "_repositories_metering" + BuildParams.testSeed : 'base_path' } testClusters.matching { it.name == "integTest" }.configureEach { testDistribution = 'DEFAULT' - plugin ':plugins:repository-s3' keystore 's3.client.repositories_metering.access_key', s3AccessKey keystore 's3.client.repositories_metering.secret_key', s3SecretKey diff --git a/x-pack/plugin/repository-encrypted/qa/azure/build.gradle b/x-pack/plugin/repository-encrypted/qa/azure/build.gradle index 9f1cfbd781a9..0ef33b6d1cef 100644 --- a/x-pack/plugin/repository-encrypted/qa/azure/build.gradle +++ b/x-pack/plugin/repository-encrypted/qa/azure/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'elasticsearch.internal-cluster-test' apply plugin: 'elasticsearch.java' dependencies { - internalClusterTestImplementation testArtifact(project(':plugins:repository-azure'), 'internalClusterTest') + internalClusterTestImplementation testArtifact(project(':modules:repository-azure'), 'internalClusterTest') internalClusterTestImplementation testArtifact(project(':x-pack:plugin:repository-encrypted'), 'test') internalClusterTestImplementation project(':server') internalClusterTestImplementation project(':test:framework') diff --git a/x-pack/plugin/repository-encrypted/qa/gcs/build.gradle b/x-pack/plugin/repository-encrypted/qa/gcs/build.gradle index 1653332f4164..4dbc245bac0e 100644 --- a/x-pack/plugin/repository-encrypted/qa/gcs/build.gradle +++ b/x-pack/plugin/repository-encrypted/qa/gcs/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'elasticsearch.internal-cluster-test' apply plugin: 'elasticsearch.java' dependencies { - internalClusterTestImplementation testArtifact(project(':plugins:repository-gcs'), 'internalClusterTest') + internalClusterTestImplementation testArtifact(project(':modules:repository-gcs'), 'internalClusterTest') internalClusterTestImplementation testArtifact(project(':x-pack:plugin:repository-encrypted'), 'test') internalClusterTestImplementation project(':server') internalClusterTestImplementation project(':test:framework') diff --git a/x-pack/plugin/repository-encrypted/qa/s3/build.gradle b/x-pack/plugin/repository-encrypted/qa/s3/build.gradle index b82dc1cf1658..ee806fa55a88 100644 --- a/x-pack/plugin/repository-encrypted/qa/s3/build.gradle +++ b/x-pack/plugin/repository-encrypted/qa/s3/build.gradle @@ -2,7 +2,7 @@ apply plugin: 'elasticsearch.internal-cluster-test' apply plugin: 'elasticsearch.java' dependencies { - internalClusterTestImplementation testArtifact(project(':plugins:repository-s3'), 'internalClusterTest') + internalClusterTestImplementation testArtifact(project(':modules:repository-s3'), 'internalClusterTest') internalClusterTestImplementation testArtifact(project(':x-pack:plugin:repository-encrypted'), 'test') internalClusterTestImplementation project(':server') internalClusterTestImplementation project(':test:framework') diff --git a/x-pack/plugin/searchable-snapshots/qa/azure/build.gradle b/x-pack/plugin/searchable-snapshots/qa/azure/build.gradle index 3046567c4c13..e976586cbde1 100644 --- a/x-pack/plugin/searchable-snapshots/qa/azure/build.gradle +++ b/x-pack/plugin/searchable-snapshots/qa/azure/build.gradle @@ -6,11 +6,9 @@ apply plugin: 'elasticsearch.rest-test' apply plugin: 'elasticsearch.rest-resources' final Project fixture = project(':test:fixtures:azure-fixture') -final Project repositoryPlugin = project(':plugins:repository-azure') dependencies { testImplementation(testArtifact(project(xpackModule('searchable-snapshots')))) - testImplementation repositoryPlugin } restResources { @@ -48,7 +46,6 @@ tasks.named("integTest").configure { testClusters.matching { it.name == "integTest" }.configureEach { testDistribution = 'DEFAULT' - plugin repositoryPlugin.path keystore 'azure.client.searchable_snapshots.account', azureAccount if (azureKey != null && azureKey.isEmpty() == false) { diff --git a/x-pack/plugin/searchable-snapshots/qa/gcs/build.gradle b/x-pack/plugin/searchable-snapshots/qa/gcs/build.gradle index cf3f66fc5b56..4bd2fa0cba94 100644 --- a/x-pack/plugin/searchable-snapshots/qa/gcs/build.gradle +++ b/x-pack/plugin/searchable-snapshots/qa/gcs/build.gradle @@ -12,11 +12,9 @@ apply plugin: 'elasticsearch.rest-test' apply plugin: 'elasticsearch.rest-resources' final Project fixture = project(':test:fixtures:gcs-fixture') -final Project repositoryPlugin = project(':plugins:repository-gcs') dependencies { testImplementation(testArtifact(project(xpackModule('searchable-snapshots')))) - testImplementation repositoryPlugin } restResources { @@ -96,7 +94,6 @@ tasks.named("integTest").configure { testClusters.matching { it.name == "integTest" }.configureEach { testDistribution = 'DEFAULT' - plugin repositoryPlugin.path keystore 'gcs.client.searchable_snapshots.credentials_file', serviceAccountFile, IGNORE_VALUE if (useFixture) { diff --git a/x-pack/plugin/searchable-snapshots/qa/minio/build.gradle b/x-pack/plugin/searchable-snapshots/qa/minio/build.gradle index d3217f791c28..3caf1eb4bac9 100644 --- a/x-pack/plugin/searchable-snapshots/qa/minio/build.gradle +++ b/x-pack/plugin/searchable-snapshots/qa/minio/build.gradle @@ -6,11 +6,9 @@ apply plugin: 'elasticsearch.test.fixtures' apply plugin: 'elasticsearch.rest-resources' final Project fixture = project(':test:fixtures:minio-fixture') -final Project repositoryPlugin = project(':plugins:repository-s3') dependencies { testImplementation(testArtifact(project(xpackModule('searchable-snapshots')))) - testImplementation repositoryPlugin } restResources { @@ -33,7 +31,6 @@ tasks.named("integTest").configure { testClusters.matching { it.name == "integTest" }.configureEach { testDistribution = 'DEFAULT' - plugin repositoryPlugin.path keystore 's3.client.searchable_snapshots.access_key', 's3_test_access_key' keystore 's3.client.searchable_snapshots.secret_key', 's3_test_secret_key' diff --git a/x-pack/plugin/searchable-snapshots/qa/s3/build.gradle b/x-pack/plugin/searchable-snapshots/qa/s3/build.gradle index 723e4a53c82e..2f7fc1cccdbc 100644 --- a/x-pack/plugin/searchable-snapshots/qa/s3/build.gradle +++ b/x-pack/plugin/searchable-snapshots/qa/s3/build.gradle @@ -6,11 +6,9 @@ apply plugin: 'elasticsearch.rest-test' apply plugin: 'elasticsearch.rest-resources' final Project fixture = project(':test:fixtures:s3-fixture') -final Project repositoryPlugin = project(':plugins:repository-s3') dependencies { testImplementation(testArtifact(project(xpackModule('searchable-snapshots')))) - testImplementation repositoryPlugin } restResources { @@ -48,7 +46,6 @@ tasks.named("integTest").configure { testClusters.matching { it.name == "integTest" }.configureEach { testDistribution = 'DEFAULT' - plugin repositoryPlugin.path keystore 's3.client.searchable_snapshots.access_key', s3AccessKey keystore 's3.client.searchable_snapshots.secret_key', s3SecretKey diff --git a/x-pack/plugin/snapshot-based-recoveries/qa/azure/build.gradle b/x-pack/plugin/snapshot-based-recoveries/qa/azure/build.gradle index 908f00f9ad68..5aa716573cbe 100644 --- a/x-pack/plugin/snapshot-based-recoveries/qa/azure/build.gradle +++ b/x-pack/plugin/snapshot-based-recoveries/qa/azure/build.gradle @@ -14,11 +14,9 @@ apply plugin: 'elasticsearch.rest-test' apply plugin: 'elasticsearch.rest-resources' final Project fixture = project(':test:fixtures:azure-fixture') -final Project repositoryPlugin = project(':plugins:repository-azure') dependencies { testImplementation(testArtifact(project(xpackModule('snapshot-based-recoveries')))) - testImplementation repositoryPlugin } restResources { @@ -57,7 +55,6 @@ tasks.named("integTest").configure { testClusters.matching { it.name == "integTest" }.configureEach { testDistribution = 'DEFAULT' numberOfNodes = 3 - plugin repositoryPlugin.path setting 'xpack.license.self_generated.type', 'trial' diff --git a/x-pack/plugin/snapshot-based-recoveries/qa/gcs/build.gradle b/x-pack/plugin/snapshot-based-recoveries/qa/gcs/build.gradle index 47985c19f8c6..f4700d3b66dc 100644 --- a/x-pack/plugin/snapshot-based-recoveries/qa/gcs/build.gradle +++ b/x-pack/plugin/snapshot-based-recoveries/qa/gcs/build.gradle @@ -11,11 +11,9 @@ apply plugin: 'elasticsearch.rest-test' apply plugin: 'elasticsearch.rest-resources' final Project fixture = project(':test:fixtures:gcs-fixture') -final Project repositoryPlugin = project(':plugins:repository-gcs') dependencies { testImplementation(testArtifact(project(xpackModule('snapshot-based-recoveries')))) - testImplementation repositoryPlugin } restResources { @@ -101,7 +99,6 @@ tasks.named("integTest").configure { testClusters.matching { it.name == "integTest" }.configureEach { testDistribution = 'DEFAULT' numberOfNodes = 3 - plugin repositoryPlugin.path setting 'xpack.license.self_generated.type', 'trial' diff --git a/x-pack/plugin/snapshot-based-recoveries/qa/s3/build.gradle b/x-pack/plugin/snapshot-based-recoveries/qa/s3/build.gradle index 3112cbfe7fbb..551dc75b50d8 100644 --- a/x-pack/plugin/snapshot-based-recoveries/qa/s3/build.gradle +++ b/x-pack/plugin/snapshot-based-recoveries/qa/s3/build.gradle @@ -14,11 +14,9 @@ apply plugin: 'elasticsearch.rest-test' apply plugin: 'elasticsearch.rest-resources' final Project fixture = project(':test:fixtures:s3-fixture') -final Project repositoryPlugin = project(':plugins:repository-s3') dependencies { testImplementation(testArtifact(project(xpackModule('snapshot-based-recoveries')))) - testImplementation repositoryPlugin } restResources { @@ -58,7 +56,6 @@ tasks.withType(Test).configureEach { testClusters.matching { it.name == "integTest" }.configureEach { testDistribution = 'DEFAULT' numberOfNodes = 3 - plugin repositoryPlugin.path setting 'xpack.license.self_generated.type', 'trial' diff --git a/x-pack/plugin/snapshot-repo-test-kit/qa/azure/build.gradle b/x-pack/plugin/snapshot-repo-test-kit/qa/azure/build.gradle index 264bd9f0ef6c..01c311831856 100644 --- a/x-pack/plugin/snapshot-repo-test-kit/qa/azure/build.gradle +++ b/x-pack/plugin/snapshot-repo-test-kit/qa/azure/build.gradle @@ -13,11 +13,9 @@ apply plugin: 'elasticsearch.rest-test' apply plugin: 'elasticsearch.rest-resources' final Project fixture = project(':test:fixtures:azure-fixture') -final Project repositoryPlugin = project(':plugins:repository-azure') dependencies { testImplementation testArtifact(project(xpackModule('snapshot-repo-test-kit'))) - testImplementation repositoryPlugin } restResources { @@ -59,7 +57,6 @@ tasks.named("integTest").configure { testClusters.matching { it.name == "integTest" }.configureEach { testDistribution = 'DEFAULT' - plugin repositoryPlugin.path keystore 'azure.client.repository_test_kit.account', azureAccount if (azureKey != null && azureKey.isEmpty() == false) { diff --git a/x-pack/plugin/snapshot-repo-test-kit/qa/gcs/build.gradle b/x-pack/plugin/snapshot-repo-test-kit/qa/gcs/build.gradle index 3a0d42171207..f3ff10a27f3e 100644 --- a/x-pack/plugin/snapshot-repo-test-kit/qa/gcs/build.gradle +++ b/x-pack/plugin/snapshot-repo-test-kit/qa/gcs/build.gradle @@ -18,11 +18,9 @@ apply plugin: 'elasticsearch.rest-test' apply plugin: 'elasticsearch.rest-resources' final Project fixture = project(':test:fixtures:gcs-fixture') -final Project repositoryPlugin = project(':plugins:repository-gcs') dependencies { testImplementation testArtifact(project(xpackModule('snapshot-repo-test-kit'))) - testImplementation repositoryPlugin } restResources { @@ -96,7 +94,6 @@ tasks.named("integTest").configure { testClusters.matching { it.name == "integTest" }.configureEach { testDistribution = 'DEFAULT' - plugin repositoryPlugin.path keystore 'gcs.client.repository_test_kit.credentials_file', serviceAccountFile, IGNORE_VALUE if (useFixture) { diff --git a/x-pack/plugin/snapshot-repo-test-kit/qa/minio/build.gradle b/x-pack/plugin/snapshot-repo-test-kit/qa/minio/build.gradle index f248fd778ddb..d9dd8b698c6f 100644 --- a/x-pack/plugin/snapshot-repo-test-kit/qa/minio/build.gradle +++ b/x-pack/plugin/snapshot-repo-test-kit/qa/minio/build.gradle @@ -13,11 +13,9 @@ apply plugin: 'elasticsearch.test.fixtures' apply plugin: 'elasticsearch.rest-resources' final Project fixture = project(':test:fixtures:minio-fixture') -final Project repositoryPlugin = project(':plugins:repository-s3') dependencies { testImplementation testArtifact(project(xpackModule('snapshot-repo-test-kit'))) - testImplementation repositoryPlugin } restResources { @@ -40,7 +38,6 @@ tasks.named("integTest").configure { testClusters.matching { it.name == "integTest" }.configureEach { testDistribution = 'DEFAULT' - plugin repositoryPlugin.path keystore 's3.client.repository_test_kit.access_key', 's3_test_access_key' keystore 's3.client.repository_test_kit.secret_key', 's3_test_secret_key' diff --git a/x-pack/plugin/snapshot-repo-test-kit/qa/s3/build.gradle b/x-pack/plugin/snapshot-repo-test-kit/qa/s3/build.gradle index 01e6f984cc9f..ae011e5cf46b 100644 --- a/x-pack/plugin/snapshot-repo-test-kit/qa/s3/build.gradle +++ b/x-pack/plugin/snapshot-repo-test-kit/qa/s3/build.gradle @@ -12,11 +12,9 @@ apply plugin: 'elasticsearch.rest-test' apply plugin: 'elasticsearch.rest-resources' final Project fixture = project(':test:fixtures:s3-fixture') -final Project repositoryPlugin = project(':plugins:repository-s3') dependencies { testImplementation testArtifact(project(xpackModule('snapshot-repo-test-kit'))) - testImplementation repositoryPlugin } restResources { @@ -54,7 +52,6 @@ tasks.named("integTest").configure { testClusters.matching { it.name == "integTest" }.configureEach { testDistribution = 'DEFAULT' - plugin repositoryPlugin.path keystore 's3.client.repo_test_kit.access_key', s3AccessKey keystore 's3.client.repo_test_kit.secret_key', s3SecretKey