Open
Description
For in-place upgrades, we have written a method for plugin removal when installed plugins do not match the version of ES specified by the version attribute prior to installing new plugins that align with that version:
node['elasticsearch']['plugin'].each
do |plugin_name, plugin_value|
properties = ElasticSearchWrapper::PropertyFile.parse("#{node['elasticsearch']['install']['dir']}/elasticsearch/plugins/#{plugin_name}/plugin-descriptor.properties")
elasticsearch_plugin plugin_name do
send('action', 'remove')
not_if { properties[:'elasticsearch.version'].nil? || (properties[:'elasticsearch.version'] == node['elasticsearch']['install']['version']) }
end
end
This method worked with cookbook version 3.x and ES 5.x, but no longer uninstalls the plugins for cookbook version 4.x and ES 6.x. The plugin removal resource is being executed without error for the client run, but the plugin is not being removed.