Skip to content

Commit

Permalink
Remove fallback for controller location (#47104)
Browse files Browse the repository at this point in the history
This change removes the temporary controller
location fallback introduced in #47013.

Relates elastic/ml-cpp#593
  • Loading branch information
droberts195 authored Oct 4, 2019
1 parent 3a7ad13 commit e036ac4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 25 deletions.
8 changes: 2 additions & 6 deletions server/src/main/java/org/elasticsearch/bootstrap/Spawner.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,9 @@ void spawnNativeControllers(final Environment environment) throws IOException {
List<Path> paths = PluginsService.findPluginDirs(environment.modulesFile());
for (final Path modules : paths) {
final PluginInfo info = PluginInfo.readFromProperties(modules);
Path spawnPath = Platforms.nativeControllerPath(modules);
final Path spawnPath = Platforms.nativeControllerPath(modules);
if (!Files.isRegularFile(spawnPath)) {
// TODO: remove before release and just continue if the controller is not in the standard place
spawnPath = Platforms.fallbackNativeControllerPath(modules);
if (spawnPath == null || Files.isRegularFile(spawnPath) == false) {
continue;
}
continue;
}
if (!info.hasNativeController()) {
final String message = String.format(
Expand Down
19 changes: 0 additions & 19 deletions server/src/main/java/org/elasticsearch/plugins/Platforms.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,25 +54,6 @@ public static Path nativeControllerPath(Path plugin) {
.resolve(PROGRAM_NAME);
}

/**
* The fallback path to the native controller for a plugin with native
* components to be used if no program is found using the standard path.
* This is a temporary measure to allow developers not working on this
* functionality to continue to work with C++ bundles from before or
* after the change. This code should never be in a supported release.
* TODO: remove this method before release
*/
public static Path fallbackNativeControllerPath(Path plugin) {
if (Constants.MAC_OS_X) {
return plugin
.resolve("platform")
.resolve(PLATFORM_NAME)
.resolve("bin")
.resolve(PROGRAM_NAME);
}
return null;
}

/**
* Return the platform name based on the OS name and architecture, for example:
* - darwin-x86_64
Expand Down

0 comments on commit e036ac4

Please sign in to comment.