Skip to content

'st2 login' exits with "success" 0 on failure #4338

@arm4b

Description

@arm4b

Auth failure for st2 login command results in "success" exit code 0.

Example:

# st2 login 123 -p 123
Failed to log in as 123: 401 Client Error: Unauthorized
MESSAGE: Invalid or missing credentials for url: http://quoting-rabbit-st2auth-enterprise:9100/tokens

root@quoting-rabbit-st2client-enterprise-7ccdb7d457-xcp87:/opt/stackstorm# echo $?
0

Same applies if for example st2 login can't reach the st2api server, - the command fails with error message, but exit status is 0.
There could be some other similar issues with st2 login as well that needs a closer look and overhaul.

I however see the correct rc behavior from st2 auth CLI.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions