Coder Social home page Coder Social logo

Comments (8)

barryib avatar barryib commented on September 24, 2024 1

@martinb3 I think the term "idempotency" is misleading us. We don't want to install idempotently plugins (as you mentioned it, Elasticsearch can't do that), but we wanted to run idempotently our ansible tasks.

Indeed, we can do that with "hacking" (by using shell, conditions, loop, etc.) or we can do it properly in an ansible style (with module already included since ansible 2.0).

For the point you're referring to:

version no None
Version of the plugin to be installed. If plugin exists with previous version, it will NOT be updated

Yes, right now the module wont update, but it wont break anything and can be run as many time you want (that is idempotency for ansible task)

Furthermore, I've submitted this PR to let user decided if he wanted to force install a plugin.

from ansible-elasticsearch.

jakommo avatar jakommo commented on September 24, 2024

Thanks for reporting @marji . As a temporary workaround, at least for elastic provided plugins, you can set es_plugins_reinstall: true, which will cause a reinstall of all plugins on the second run.
The issue is caused by the role currently not checking which plugins are already installed.

@gingerwizard I think you already looked into a solution to something like this. Any ideas?

from ansible-elasticsearch.

barryib avatar barryib commented on September 24, 2024

So far my workaround for this issue is to explicitly tell the task to don't fail when plugins exist. See the PR #113 .

The great way would be to don't try to re-install plugins if they exist without an es_plugins_reinstall: true, but I went into plugins names issue. Where some plugins have a different name (short one) when they are installed. Ex: mobz/elasticsearch-head become head when installed. fixed with #113

A second solution could be elactisearch_plugin module

from ansible-elasticsearch.

gingerwizard avatar gingerwizard commented on September 24, 2024

@barryib agreed lets use the plugin module.

from ansible-elasticsearch.

barryib avatar barryib commented on September 24, 2024

Can be addressed with #125

from ansible-elasticsearch.

martinb3 avatar martinb3 commented on September 24, 2024

@barryib Since Elasticsearch itself can't idempotently install plugins, I'm not sure how different Ansible modules would solve the problem. From the docs to the module you linked:

version no None
Version of the plugin to be installed. If plugin exists with previous version, it will NOT be updated

That to me sounds like not idempotent either, if giving a version and it won't actually be installed in every case.

For what it's worth, we have the same problem in the Chef cookbook for Elasticseach. :/

from ansible-elasticsearch.

martinb3 avatar martinb3 commented on September 24, 2024

Thank you for clarifying that -- I guess if the module doesn't do anything, it would technically be idempotent. Usually I think of idempotency in configuration management as "run it as many times as you want, and it will always bring the system into the same state, or do nothing if the system is already in the desired state." Anyway, yeah -- I wish we could do more with Elasticsearch's plugin system :)

from ansible-elasticsearch.

gingerwizard avatar gingerwizard commented on September 24, 2024

I'll tested this a while back and i believe its resolved. It should be tested under #43 which i will try to include shortly.

from ansible-elasticsearch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.