Open ph opened 7 years ago
I've fixed the installation issue by marking the installed dependencies as unlockable, I have an integration suite ready but it fails because of #8207. The logstash-plugin list
command that I used to verify if the plugin is correctly installed refuses to run. The main Logstash command works.
Workaround:
Remove stud in the dependencies folder and recreate the zip.
I tested this recently on the latest release of Logstash at the time - version 5.6.3 and hit the same issues.
Vanilla install of Logstash shows the logstash-input-tcp
plugin at version 4.2.4:
./logstash-plugin list --installed --verbose | grep logstash-input-tcp
logstash-input-tcp (4.2.4)
Downloading the gem file for the latest release (5.0.2) and attempting to install it locally as a ZIP file fails:
wget https://rubygems.org/downloads/logstash-input-tcp-5.0.2-java.gem
zip damian.zip *.gem
./logstash-plugin install file:////Users/damianpfister/ElasticTest/logstash/logstash-5.6.3/bin/damian.zip
Installing file: //Users/damianpfister/ElasticTest/logstash/logstash-5.6.3/bin/damian.zip
ERROR: An error occured when installing the: file:////Users/damianpfister/ElasticTest/logstash/logstash-5.6.3/bin/damian.zip, to have more information about the error add a DEBUG=1 before running the command., message: You have requested:
logstash-input-tcp = 5.0.2
The bundle currently has logstash-input-tcp locked at 4.2.4.
Try running `bundle update logstash-input-tcp`
No updates available:
./logstash-plugin update logstash-input-tcp
Updating logstash-input-tcp
No plugin updated
Attempts to remove the plugin failed due to dependancies:
./logstash-plugin remove logstash-input-tcp
Failed to remove "logstash-input-tcp" because the following plugins or libraries depend on it:
* logstash-input-graphite
Removing the dependancy and plugin before another manual local file update worked:
./logstash-plugin remove logstash-input-graphite
Successfully removed logstash-input-graphite
/logstash-plugin remove logstash-input-tcp
Successfully removed logstash-input-tcp
/logstash-plugin install file:////Users/damianpfister/ElasticTest/logstash/logstash-5.6.3/bin/damian.zip
Installing file: //Users/damianpfister/ElasticTest/logstash/logstash-5.6.3/bin/damian.zip
Install successful
./logstash-plugin list --installed --verbose | grep logstash-input-tcp
logstash-input-tcp (5.0.2)
For offline installations this appears to be a somewhat cumbersome approach though. Are there any alternatives?
Installing a pack to upgrade existing plugins or a pack that come with an already installed dependency will fails.
Scenario
logstash-input-mongodb
stud
Debug message
Solution
The problem is when we add the new dependencies to the Bundler's gem definition we never mark the gem as unlockable.