[ 
https://issues.apache.org/jira/browse/GEODE-2971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16031551#comment-16031551
 ] 

ASF GitHub Bot commented on GEODE-2971:
---------------------------------------

Github user jaredjstewart commented on a diff in the pull request:

    https://github.com/apache/geode/pull/551#discussion_r119419341
  
    --- Diff: 
geode-core/src/main/java/org/apache/geode/internal/ShellExitCode.java ---
    @@ -0,0 +1,40 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
    + * agreements. See the NOTICE file distributed with this work for 
additional information regarding
    + * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
    + * "License"); you may not use this file except in compliance with the 
License. You may obtain a
    + * copy of the License at
    + *
    + * http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software 
distributed under the License
    + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF 
ANY KIND, either express
    + * or implied. See the License for the specific language governing 
permissions and limitations under
    + * the License.
    + */
    +package org.apache.geode.internal;
    +
    +public class ShellExitCode {
    --- End diff --
    
    This should be an `enum` rather than a `class`.  


> 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.3.15#6346)

Reply via email to