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

plugin script does not exit with exit code != 0 on error #3463

Closed
sol opened this Issue Aug 8, 2013 · 2 comments

Comments

Projects
None yet
2 participants
@sol
Copy link

commented Aug 8, 2013

Steps to reproduce:

$ sudo /usr/share/elasticsearch/bin/plugin -install foo
-> Installing foo...
Failed to install foo, reason: failed to download out of all possible locations..., use -verbose to get detailed information
$ echo $?
0

Expected result: The exit code should be != 0

Actual result: The exit code is 0

@ghost ghost assigned s1monw Aug 8, 2013

@s1monw

This comment has been minimized.

Copy link
Contributor

commented Aug 8, 2013

the output with the patch is:

$ ./bin/plugin -install foo
-> Installing foo...
Failed to install foo, reason: failed to download out of all possible locations..., use -verbose to get detailed information
$ echo $?
74

s1monw added a commit to s1monw/elasticsearch that referenced this issue Aug 8, 2013

Use nonzero status code to signal abnormal termination
We currently return with status code 0 when an IOException occurs.
The plugin manager should in any case return a nonzero status if
the operation was not successful. Now the PluginManager uses the
following reponse codes based on 'sysexists.sh':
 * '0' on success
 * '64' command line usage error
 * '70' internal software error
 * '74' input/output

Closes elastic#3463

@s1monw s1monw closed this in 2ed87b5 Aug 8, 2013

@sol

This comment has been minimized.

Copy link
Author

commented Aug 8, 2013

Awesome, thanks a lot!

s1monw added a commit that referenced this issue Aug 9, 2013

Use nonzero status code to signal abnormal termination
We currently return with status code 0 when an IOException occurs.
The plugin manager should in any case return a nonzero status if
the operation was not successful. Now the PluginManager uses the
following reponse codes based on 'sysexists.sh':
 * '0' on success
 * '64' command line usage error
 * '70' internal software error
 * '74' input/output

Closes #3463

dadoonet added a commit to dadoonet/elasticsearch that referenced this issue Sep 9, 2013

Plugin Manager: add silent mode.
Now with have proper exit codes for elasticsearch plugin manager (see elastic#3463), we can add a silent mode to plugin manager.

```sh
bin/plugin --install karmi/elasticsearch-paramedic --silent
```

Closes elastic#3628.

dadoonet added a commit that referenced this issue Sep 10, 2013

Plugin Manager: add silent mode.
Now with have proper exit codes for elasticsearch plugin manager (see #3463), we can add a silent mode to plugin manager.

```sh
bin/plugin --install karmi/elasticsearch-paramedic --silent
```

Closes #3628.

dadoonet added a commit that referenced this issue Sep 10, 2013

Plugin Manager: add silent mode.
Now with have proper exit codes for elasticsearch plugin manager (see #3463), we can add a silent mode to plugin manager.

```sh
bin/plugin --install karmi/elasticsearch-paramedic --silent
```

Closes #3628.

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015

Use nonzero status code to signal abnormal termination
We currently return with status code 0 when an IOException occurs.
The plugin manager should in any case return a nonzero status if
the operation was not successful. Now the PluginManager uses the
following reponse codes based on 'sysexists.sh':
 * '0' on success
 * '64' command line usage error
 * '70' internal software error
 * '74' input/output

Closes elastic#3463

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015

Plugin Manager: add silent mode.
Now with have proper exit codes for elasticsearch plugin manager (see elastic#3463), we can add a silent mode to plugin manager.

```sh
bin/plugin --install karmi/elasticsearch-paramedic --silent
```

Closes elastic#3628.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.