codelibs / elasticsearch-cluster-runner

Elasticsearch Cluster Launcher on One JVM Instance
Other
66 stars 17 forks source link

confPath is ignored for plugins #28

Open avlukanin opened 5 years ago

avlukanin commented 5 years ago

This directory is only used for generating Settings, but not Environment

                final Settings settings = buildNodeSettings(i + 1);
                final Node node = new ClusterRunnerNode(settings, pluginList);

It should be this instead to preserve the custom config directory:

                final Environment environment = buildNodeSettings(i + 1);
                final Node node = new ClusterRunnerNode(environment, pluginList);
avlukanin commented 5 years ago

I have this problem with version 6.8.0.0

avlukanin commented 5 years ago

Actually, I have changed it to

                final Environment environment = buildNodeEnvironment(i + 1);
                final Node node = new ClusterRunnerNode(
                            InternalSettingsPreparer.prepareEnvironment(environment.settings(), null,
                                        Collections.emptyMap(), environment.configFile()), pluginList);
                node.start();
                nodeList.add(node);
                settingsList.add(environment.settings());

to combine elasticsearch.yml settings and the settings, passed to onBuild.