Bug 773176 - unexpected exit code when remove ssh key with non-existing key name
Summary: unexpected exit code when remove ssh key with non-existing key name
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 1.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Ravi Sankar
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-11 06:35 UTC by Meng Bo
Modified: 2012-01-30 04:59 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-30 04:59:25 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Meng Bo 2012-01-11 06:35:15 UTC
Description of problem:
"rhc-ctl-domain -r $keyname" will return exit code 0 with operation successfully, whatever the key name is, even non-existing one.

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

How reproducible:
always

Steps to Reproduce:
1.create a domain with exist ssh key pair.
2.generate another ssh key via ssh-keygen
3.add the new ssh key to the domain
# rhc-ctl-domain -a newkey1 -k ~/.ssh/libra_id_rsa_new.pub
4.try to remove the ssh key with non-exist key name
# rhc-ctl-domain -r testtest

  
Actual results:
it will return a success with exit code 0, and nothing removed.

Expected results:
it should be prompt some error message like 'key name does not exist' and return operation failed.


Additional info:
keytest is a non-exist ssh key name.

[root@localhost .ssh]# rhc-ctl-domain --remove-ssh-key keytest -d
Password: 
Submitting form:
action: remove-key
key_name: keytest
rhlogin: bmeng+1
Contacting https://ec2-107-21-79-175.compute-1.amazonaws.com
Response from server:
DEBUG:


Exit Code: 0
broker_c: namespacerhloginsshapp_uuiddebugaltercartridgecart_typeactionapp_nameapi
api_c: placeholder
API version:    1.1.1
Broker version: 1.1.1
Success

Comment 1 Ravi Sankar 2012-01-11 17:55:01 UTC
Fixed

Comment 2 Meng Bo 2012-01-12 04:49:27 UTC
verified with rhc-0.84.11-1.el6_2.noarch,on devenv-stage_112
bug fixed.


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