plugin installation does not have upgrade ability
cywjackson opened this issue · comments
not_if do
Dir.entries("#{node.elasticsearch[:dir]}/elasticsearch-#{node.elasticsearch[:version]}/plugins/").any? do |plugin|
next if plugin =~ /^\./
name.include? plugin
end rescue false
end
From above, even when i have a new version of a plugin, the installation would still fail as it would detect the plugin has already been installed (with a diff version)
http://stackoverflow.com/questions/19997559/update-of-elasticsearch-plugin <-- seems suggest you can't install another version (without removing the old one)
so what should be the logic here?
if not installed, install it;
if installed with a prev version, remove and install;
if installed with the same version as define in attribute, do nothing?
@cywjackson Do you know how to determine the version of an existing plugin? As far as I can tell, there's no way to figure this out based on a copy of it. The only check we could do is compatible lucene version. /CC #330
Additionally, as far as I can tell, there's actually no way using the commandline tools to safely upgrade the plugin either. The plugin
command only does --remove
and --install
.
I'm going to close this, based on that. Let us know if you find anything differently than what I've said here, and we'll figure out how to translate the procedure into chef :)
Hi @martinb3,
I've stumbled on this issue and there is a way to know the versions of the installed plugins:
curl localhost:9200/_cat/plugins?v\&pretty
name component version type url
Ghost Dancer delete-by-query 2.3.4 j
@adagios Hello! Unfortunately, we can't assume Elasticsearch is running or that what's loaded into memory reflects what is currently on disk.
The following can be interrogated to check plugin version without elasticsearch being up:
/usr/share/elasticsearch/bin/elasticsearch-plugin list --verbose