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 not being removed when using elasticsearch_plugin remove resource #712

Open
Daren-J-Smith opened this issue Apr 17, 2019 · 2 comments
Assignees
Labels
Bug Something isn't working

Comments

@Daren-J-Smith
Copy link

Daren-J-Smith commented Apr 17, 2019

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.

@martinb3
Copy link
Contributor

I think we'd need some more information about what the not_if { ... } is resolving to. If you can confirm it resolves to something falsey, and the elasticsearch_plugin resource is even having an action execute, we can investigate further.

@damacus damacus self-assigned this Mar 16, 2023
@damacus damacus added the Bug Something isn't working label Mar 16, 2023
@damacus
Copy link
Member

damacus commented Mar 16, 2023

Resolving as part of #767

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants