Bug 838441 - The output of listing the removed default key by "rhc-sshkey list" is confusing
Summary: The output of listing the removed default key by "rhc-sshkey list" is confusing
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: oc
Version: 2.x
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: John (J5) Palmieri
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-09 06:11 UTC by shjiang
Modified: 2015-05-15 01:59 UTC (History)
5 users (show)

Fixed In Version: fork_ami_US2597_US2599_US2813_US2817_US2872_US2816_US2814_209
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-11-06 18:49:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description shjiang 2012-07-09 06:11:59 UTC
Description of problem:
The output of listing the removed default key by "rhc-sshkey list" is confused.
I have already removed the default key. but when i list it, the fingerprint prompt is "the key type is not recognized". I cannot figure out if the key is null or someone added wrong type sshkey.


Version-Release number of selected component (if applicable):
devenv_1879
rhc-0.95.8


How reproducible:
always

Steps to Reproduce:
1.add a ssh  with default key name
2.remove the default key  in step 1
3.check the output of rhc sshkey list

Actual results:
c:\Users\window7\.ssh>rhc-sshkey  remove -i default
Password: ******
Success

c:\Users\window7\.ssh>rhc-sshkey list
Password: ***

SSH keys
========
       Name: default
       Type:
Fingerprint: Key type is not recognized.  Please check this key is valid.


Expected results:
The Fingerprint:The default key is null.

Additional info:

Comment 1 Clayton Coleman 2012-07-10 03:17:44 UTC
We should be filtering the empty key out as long as we are using the old API.  However, given the eventual refactoring of this command to the rest api (which does not expose a default key) we may not fix it this way.

Comment 2 John (J5) Palmieri 2012-10-09 16:46:09 UTC
please test against refactor

Comment 3 joycezhang 2012-10-10 02:08:13 UTC
This bug has been verified and fixed. Please refer to the details as below:

Verified build:
rhc client built from fork_ami_US2597_US2599_US2813_US2817_US2872_US2816_US2814_209
devenv_2303

Verified steps:
1.Add a ssh key with default key name
# rhc sshkey add default ~/.ssh/id_rsa.pub 
Password: *


**********

RESULT:
SSH key /root/.ssh/id_rsa.pub has been added as 'default'

# rhc sshkey list

RESULT:
Password: *


**********
       Name: default
       Type: ssh-rsa
Fingerprint: 12:ee:39:ee:ce:f5:8b:76:aa:16:ef:81:f1:73:11:27


Confusing message "Key type is not recognized.  Please check this key is valid." is not shown. So mark it as Verified. Thanks.


2. Remove default key which added in step1
# rhc sshkey remove default
Password: *


**********

RESULT:
SSH key 'default' has been removed

3. Check sshkey list
# rhc sshkey list

RESULT:
Password: *


**********


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