Bug 799375 - Command 'rhc domain destroy' and a non-existing domain: return code 0
Command 'rhc domain destroy' and a non-existing domain: return code 0
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Abhishek Gupta
libra bugs
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-02 10:36 EST by Attila Nagy
Modified: 2015-05-14 21:47 EDT (History)
3 users (show)

See Also:
Fixed In Version: rhc-0.87.8-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-03-05 12:54:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Attila Nagy 2012-03-02 10:36:30 EST
Description of problem: When I try to destroy a domain with command 'rhc domain destroy' and the domain dosn't exist, the command reports error however the return code is 0.

$ rhc domain destroy -n NONEXISTING $U
Problem reported from server. Response code was 400.
Re-run with -d for more information.

RESULT:
Cannot alter or remove namespace NONEXISTING. Namspace does not exist.

$ echo $?
0


Version-Release number of selected component (if applicable): rhc-0.87.7-1.el6_2.noarch


How reproducible: Always


Steps to Reproduce:
1. rhc domain destroy -n NONEXISTING 
2. echo $?


Actual results: Error is reported, but the return code is 0


Expected results: Return code must be different than 0


Additional info:
Comment 1 Abhishek Gupta 2012-03-02 15:43:24 EST
This has now been fixed.
Comment 2 Linqing Lu 2012-03-05 02:19:35 EST
tested on stage and devenv_1652
still returns 0.

--------------------------------

[root@localhost ~]# rhc domain destroy -n aaaaaaa
Password: 
Problem reported from server. Response code was 400.
Re-run with -d for more information.

RESULT:
Cannot alter or remove namespace aaaaaaa. Namspace does not exist.

[root@localhost ~]# echo $?
0
Comment 3 Linqing Lu 2012-03-05 03:01:01 EST
(In reply to comment #2)
> tested on stage and devenv_1652
> still returns 0.
> 
> --------------------------------
> 
> [root@localhost ~]# rhc domain destroy -n aaaaaaa
> Password: 
> Problem reported from server. Response code was 400.
> Re-run with -d for more information.
> 
> RESULT:
> Cannot alter or remove namespace aaaaaaa. Namspace does not exist.
> 
> [root@localhost ~]# echo $?
> 0

correction: it returns 1 on devenv_1652, still returns 0 on stage.
Comment 4 Linqing Lu 2012-03-05 03:08:10 EST
verified on devenv_1652
it returns 1 now.

Note You need to log in before you can comment on or make changes to this bug.