mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-25 22:36:20 +00:00
Introduce plugin-specific env scripts
With plugins of a meta-plugin now loaded in separate classloaders, we should not be loading all classes in all plugins of a meta-plugin when executing scripts. This is particularly problematic in the case of security extensions where the install plugin extension command would be running with the classpath of all plugins. However, if there is JAR hell in this classpath, installation would fail. This is not realistic though since the plugins are run in separate classloaders. To fix this, for the scripts of a plugin, we only set the classpath to include the JARs for that plugin and the JARs of core. This leads us to the introduction of plugin-specific env scripts. Relates elastic/x-pack-elasticsearch#3649 Original commit: elastic/x-pack-elasticsearch@543df37eed
This commit is contained in:
parent
51c53710d7
commit
50864eabce
@ -5,8 +5,3 @@
|
||||
# you may not use this file except in compliance with the Elastic License.
|
||||
|
||||
ES_CLASSPATH="$ES_CLASSPATH:$ES_HOME/plugins/x-pack/x-pack-core/*"
|
||||
ES_CLASSPATH="$ES_CLASSPATH:$ES_HOME/plugins/x-pack/x-pack-logstash/*"
|
||||
ES_CLASSPATH="$ES_CLASSPATH:$ES_HOME/plugins/x-pack/x-pack-ml/*"
|
||||
ES_CLASSPATH="$ES_CLASSPATH:$ES_HOME/plugins/x-pack/x-pack-monitoring/*"
|
||||
ES_CLASSPATH="$ES_CLASSPATH:$ES_HOME/plugins/x-pack/x-pack-security/*"
|
||||
ES_CLASSPATH="$ES_CLASSPATH:$ES_HOME/plugins/x-pack/x-pack-watcher/*"
|
||||
|
Binary file not shown.
@ -6,7 +6,7 @@
|
||||
|
||||
source "`dirname "$0"`"/../elasticsearch-env
|
||||
|
||||
source "`dirname "$0"`"/x-pack-env
|
||||
source "`dirname "$0"`"/x-pack-security-env
|
||||
|
||||
exec \
|
||||
"$JAVA" \
|
||||
|
Binary file not shown.
@ -6,7 +6,7 @@
|
||||
|
||||
source "`dirname "$0"`"/../elasticsearch-env
|
||||
|
||||
source "`dirname "$0"`"/x-pack-env
|
||||
source "`dirname "$0"`"/x-pack-security-env
|
||||
|
||||
exec \
|
||||
"$JAVA" \
|
||||
|
Binary file not shown.
@ -6,7 +6,7 @@
|
||||
|
||||
source "`dirname "$0"`"/../elasticsearch-env
|
||||
|
||||
source "`dirname "$0"`"/x-pack-env
|
||||
source "`dirname "$0"`"/x-pack-security-env
|
||||
|
||||
exec \
|
||||
"$JAVA" \
|
Binary file not shown.
@ -6,7 +6,7 @@
|
||||
|
||||
source "`dirname "$0"`"/../elasticsearch-env
|
||||
|
||||
source "`dirname "$0"`"/x-pack-env
|
||||
source "`dirname "$0"`"/x-pack-security-env
|
||||
|
||||
exec \
|
||||
"$JAVA" \
|
||||
|
Binary file not shown.
@ -6,7 +6,7 @@
|
||||
|
||||
source "`dirname "$0"`"/../elasticsearch-env
|
||||
|
||||
source "`dirname "$0"`"/x-pack-env
|
||||
source "`dirname "$0"`"/x-pack-security-env
|
||||
|
||||
exec \
|
||||
"$JAVA" \
|
||||
|
Binary file not shown.
@ -6,7 +6,7 @@
|
||||
|
||||
source "`dirname "$0"`"/../elasticsearch-env
|
||||
|
||||
source "`dirname "$0"`"/x-pack-env
|
||||
source "`dirname "$0"`"/x-pack-security-env
|
||||
|
||||
exec \
|
||||
"$JAVA" \
|
||||
|
Binary file not shown.
@ -6,7 +6,7 @@
|
||||
|
||||
source "`dirname "$0"`"/../elasticsearch-env
|
||||
|
||||
source "`dirname "$0"`"/x-pack-env
|
||||
source "`dirname "$0"`"/x-pack-security-env
|
||||
|
||||
exec \
|
||||
"$JAVA" \
|
||||
|
Binary file not shown.
10
plugin/security/src/main/bin/x-pack-security-env
Normal file
10
plugin/security/src/main/bin/x-pack-security-env
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
# or more contributor license agreements. Licensed under the Elastic License;
|
||||
# you may not use this file except in compliance with the Elastic License.
|
||||
|
||||
source "`dirname "$0"`"/x-pack-env
|
||||
|
||||
# include x-pack-security jars in classpath
|
||||
ES_CLASSPATH="$ES_CLASSPATH:$ES_HOME/plugins/x-pack/x-pack-security/*"
|
BIN
plugin/security/src/main/bin/x-pack-security-env.bat
Normal file
BIN
plugin/security/src/main/bin/x-pack-security-env.bat
Normal file
Binary file not shown.
@ -6,7 +6,7 @@
|
||||
|
||||
source "`dirname "$0"`"/../elasticsearch-env
|
||||
|
||||
source "`dirname "$0"`"/x-pack-env
|
||||
source "`dirname "$0"`"/x-pack-watcher-env
|
||||
|
||||
exec \
|
||||
"$JAVA" \
|
||||
|
Binary file not shown.
10
plugin/watcher/src/main/bin/x-pack-watcher-env
Normal file
10
plugin/watcher/src/main/bin/x-pack-watcher-env
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
# or more contributor license agreements. Licensed under the Elastic License;
|
||||
# you may not use this file except in compliance with the Elastic License.
|
||||
|
||||
source "`dirname "$0"`"/x-pack-env
|
||||
|
||||
# include x-pack-security jars in classpath
|
||||
ES_CLASSPATH="$ES_CLASSPATH:$ES_HOME/plugins/x-pack/x-pack-watcher/*"
|
BIN
plugin/watcher/src/main/bin/x-pack-watcher-env.bat
Normal file
BIN
plugin/watcher/src/main/bin/x-pack-watcher-env.bat
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user