[
https://issues.apache.org/jira/browse/GEODE-2971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16109759#comment-16109759
]
ASF subversion and git services commented on GEODE-2971:
--------------------------------------------------------
Commit 9db5c8e58ac6c53ce21a6c0dca3f8c64555f6cfc in geode's branch
refs/heads/feature/GEODE-3299 from [~prhomberg]
[ https://git-wip-us.apache.org/repos/asf?p=geode.git;h=9db5c8e ]
GEODE-2971: Introduce ExitCode to resolve inconsistency of shell exit values.
* this closes #652
* Corrected inconsistency of error handling and subsequent exit status in
member status commands
* 'gfsh help' now returns 0 exit code as base behavior (previously returned 1).
> Inconsistency in gfsh status command
> ------------------------------------
>
> Key: GEODE-2971
> URL: https://issues.apache.org/jira/browse/GEODE-2971
> Project: Geode
> Issue Type: Bug
> Components: gfsh
> Reporter: Patrick Rhomberg
>
> There is a general inconsistency in gfsh's exit status to the shell. This
> makes scripting rather difficult. For instance:
> * Locator & Server Online (+)
> ** --pid: exit code {{0}} for both, all good.
> ** --name: exit code {{0}} for both, all good.
> ** --dir: exit code {{0}} for both, all good.
> * Locator Online, Server Offline (-)
> ** --pid: exit code is {{0}} for both. Nevertheless, the return string when
> executing the command for the server returns a {{null}} within the message
> (where the ip and port should be). As an example: {{Server in
> /path/to/server/directory on null is currently not responding}}.
> ** --name: exit code is {{0}} for the locator, {{1}} for the server because
> there's no online member with the specified name... which raises the
> question: there wasn't any exceptions during the execution, shouldn't we
> return {{0}}?.
> ** --dir: exit code is {{0}} for both. Nevertheless, the return string when
> executing the command for the server returns a {{null}} within the message
> (where the ip and port should be). As an example: {{Server in
> /path/to/server/directory on null is currently not responding}}.
> * Locator & Server Offline (-)
> ** --pid: exit code for locator is {{1}}, and the return string only contains
> {{null}}. The exit code for server is {{0}}, but the return string contains a
> {{null}} within the message (where the ip and port should be). As an example:
> {{Server in /path/to/server/directory on null is currently not responding}}.
> ** --name: both return {{1}}, which is expected since there's no jmx manager
> running and this option requires gfsh to be connected.
> ** --dir: exit code for locator is {{1}}, and the return string only contains
> {{null}}. The exit code for server is {{0}}, but the return string contains a
> {{null}} within the message (where the ip and port should be). As an example:
> {{Server in /path/to/server/directory on null is currently not responding}}.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)