You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by Jinmei Liao <ji...@pivotal.io> on 2017/11/08 21:48:03 UTC

[DISCUSS] consistency of command result status

We noticed some discrepancies of result status when executing commands that
involves looking for a member/region/entry/gateway receiver/sender, namely
any entities. If the command failed to find the entity specified by the
command, it will output some messages like "xxx not found", but some
command would report this message as ERROR result and others would report
this as OK result. For example:

gfsh>describe region --name=notExist

Region : /notExist not found


gfsh>describe member --name=notExist

Member "notExist" not found

The first command will show as ERROR status (in red), while the second
command shows up as OK status (in black). We would like to propose changing
these kind of "not found" messages as all ERROR (user error) status. This
would involve some test changes as well.

comments/suggestions?

-- 
Cheers

Jinmei

Re: [DISCUSS] consistency of command result status

Posted by Patrick Rhomberg <pr...@pivotal.io>.
I definitely favor consistency along (what seems to me to be) common-sense
divisions.  I personally feel like an OK status should only occur when the
command hits no hiccups that it can't resolve.

We introduced the ExitCode class this past summer with the intent of
unifying command exit status.  It was beyond the scope of the ticket at the
time and may well be beyond the scope of the issue here, but it could also
be worth discussing if this style of "third party member unreachable"
deserves its own exit code beyond NORMAL(0) and FATAL(1).

On Wed, Nov 8, 2017 at 1:48 PM, Jinmei Liao <ji...@pivotal.io> wrote:

> We noticed some discrepancies of result status when executing commands that
> involves looking for a member/region/entry/gateway receiver/sender, namely
> any entities. If the command failed to find the entity specified by the
> command, it will output some messages like "xxx not found", but some
> command would report this message as ERROR result and others would report
> this as OK result. For example:
>
> gfsh>describe region --name=notExist
>
> Region : /notExist not found
>
>
> gfsh>describe member --name=notExist
>
> Member "notExist" not found
>
> The first command will show as ERROR status (in red), while the second
> command shows up as OK status (in black). We would like to propose changing
> these kind of "not found" messages as all ERROR (user error) status. This
> would involve some test changes as well.
>
> comments/suggestions?
>
> --
> Cheers
>
> Jinmei
>