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

Install plugin failure does not stop script execution #124

Closed
CloCkWeRX opened this issue Aug 20, 2013 · 2 comments
Closed

Install plugin failure does not stop script execution #124

CloCkWeRX opened this issue Aug 20, 2013 · 2 comments

Comments

@CloCkWeRX
Copy link

If you install_plugin something invalid, and it fails, the ruby block does not check the exit code and fail properly.

This leads to silent failures if your plugin does not install.

CloCkWeRX pushed a commit to CloCkWeRX/cookbook-elasticsearch that referenced this issue Aug 20, 2013
@karmi
Copy link
Contributor

karmi commented Aug 22, 2013

Thanks, valid concern. I've merged your commit, but the problem is that the plugin script does not return correct exit status on failure:

vagrant@precise64:~$ /usr/local/bin/plugin --install FOOBAR
-> Installing FOOBAR...

Failed to install FOOBAR, reason: plugin directory /usr/local/elasticsearch-0.90.3/plugins is read only
vagrant@precise64:~$ echo $?
0

# -----

vagrant@precise64:~$ sudo /usr/local/bin/plugin --install FOOBAR
-> Installing FOOBAR...
Failed to install FOOBAR, reason: failed to download out of all possible locations..., use -verbose to get detailed information
vagrant@precise64:~$ echo $?
0

Related: elastic/elasticsearch#3556

@karmi
Copy link
Contributor

karmi commented Aug 22, 2013

Update, solved in elastic/elasticsearch#3463 already, will be part of the next release.

@karmi karmi closed this as completed Aug 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants