Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugins should be removed before installed #2

Open
pySilver opened this issue Jun 18, 2019 · 3 comments
Open

Plugins should be removed before installed #2

pySilver opened this issue Jun 18, 2019 · 3 comments

Comments

@pySilver
Copy link

Its a part of #1

If you have any plugins defined in ES_PLUGINS_INSTALL it will be installed at first but subsequent image stop/start will cause errors like this:

elasticsearch_1  | -> Downloading pl.allegro.tech.elasticsearch.plugin:elasticsearch-analysis-morfologik:6.8.0 from maven central
elasticsearch_1  | Warning: sha512 not found, falling back to sha1. This behavior is deprecated and will be removed in a future release. Please update the plugin to use a sha512 checksum.
elasticsearch_1  | ERROR: plugin directory [/usr/share/elasticsearch/plugins/analysis-morfologik] already exists; if you need to update the plugin, uninstall it first using command 'remove analysis-morfologik'
mybazecom_elasticsearch_1 exited with code 1

We should attempt to remove plugin first as described here: https://www.elastic.co/guide/en/elasticsearch/plugins/current/listing-removing-updating.html

sudo bin/elasticsearch-plugin remove [pluginname]
sudo bin/elasticsearch-plugin install [pluginname]

Use case:
ES_PLUGINS_INSTALL: pl.allegro.tech.elasticsearch.plugin:elasticsearch-analysis-morfologik:6.8.0,analysis-icu

@pySilver pySilver changed the title Plugins should be checked before installed Plugins should be removed before installed Jun 18, 2019
@pySilver
Copy link
Author

The reason why your check here (https://github.com/wodby/elasticsearch/blob/master/bin/docker-entrypoint.sh#L17) fails is because plugins are identified differently than their installation names. For the plugins mentioned in original message list would output the following

/usr/share/elasticsearch # bin/elasticsearch-plugin list
analysis-icu
analysis-morfologik

@csandanov
Copy link
Member

What's the point in removing and then installing a plugin, wouldn't it be the same version? You know we all images rebuilt when a new ES version gets released, right?

you specified

ES_PLUGINS_INSTALL=pl.allegro.tech.elasticsearch.plugin:elasticsearch-analysis-morfologik:6.8.0,analysis-icu

to install plugins (separated by command):

pl.allegro.tech.elasticsearch.plugin:elasticsearch-analysis-morfologik:6.8.0
analysis-icu

I guess the first plugin isn't exactly analysis-morfologik and probably contrib

@pySilver
Copy link
Author

Yeah, problem is that is a contrib so list gives a different name. I'm not sure how elastic names it's contribs, if thats :: then we can try to parse this format. I just realize that uninstall would need a real module name too, so it wont work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants