Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

plugin guard not working #480

Open
danhiris opened this issue Jul 5, 2017 · 3 comments
Open

plugin guard not working #480

danhiris opened this issue Jul 5, 2017 · 3 comments
Labels

Comments

@danhiris
Copy link

danhiris commented Jul 5, 2017

The plugin install executes on every chef run. I assume the guard isn't correct.

  • execute bin/plugin install logstash-input-s3
  • logstash_plugins[logstash-output-loggly] action create (up to date)
  • execute[bin/plugin install logstash-output-loggly] action run
    [execute] Validating logstash-output-loggly
    Installing logstash-output-loggly
    Installation successful
@danhiris danhiris changed the title config guard not working plugin guard not working Jul 5, 2017
@martinb3
Copy link
Collaborator

martinb3 commented Jul 6, 2017

Could you let us know which versions of logstash and which plugin versions you're installing? There's a lot of cleanup needed on this project, and it would save a lot of time if you had those handy :)

@martinb3 martinb3 added the bug label Jul 6, 2017
@danhiris
Copy link
Author

danhiris commented Jul 6, 2017

Appears that it keeps running the plugin install on all versions on any type of plugins.
I used logstash 1.x, 2.x, 5.x, and logstash-input-s3, logstash-output-loggy, ... in different versions.

    ex = execute "bin/plugin install #{ls_name}" do
...
      not_if { ::File.exist?("#{ls_instance_dir}/#{ls_install_check}") }

Not quite sure what the following code does, but this is where that ls_install_check comes from.
If I look in the instance dir, I don't see any files that would be indicative of a plugin having been installed.

@install_check = new_resource.install_check || Logstash.get_attribute_or_default(node, @instance, 'plugins_check_if_installed')

@nikhilo
Copy link

nikhilo commented Aug 16, 2017

Looks like the only place it can/should check, is here:

root@logstash:~# find /opt/logstash/agent/ -type d -name "logstash-filter-alter*"
/opt/logstash/agent/vendor/bundle/jruby/1.9/gems/logstash-filter-alter-3.0.2

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

No branches or pull requests

3 participants