Bug 773209

Summary: will add ssh key directly when try to update ssh key with non-existing key name
Product: OKD Reporter: Meng Bo <bmeng>
Component: ContainersAssignee: Ravi Sankar <rpenta>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.xCC: dmcphers
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-30 04:59:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Meng Bo 2012-01-11 09:18:14 UTC
Description of problem:
when using rhc-ctl-domain -u to update non-existing ssh key name, it will add the ssh key name to this domain

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

How reproducible:
always

Steps to Reproduce:
1.generate secondary ssh key via ssh-keygen
2.update ssh key with non-existing key name
# rhc-ctl-domain -r ethkeyname -k ~/.ssh/libra_id_rsa_new.pub
3.
  
Actual results:
the non-existing key name will be added to the domain directly.

Expected results:
should fail and error message should inform user the corrective action


Additional info:

[root@localhost .ssh]# rhc-ctl-domain -u keynonexist -k libra_id_rsa_2.pub -d
Password: 
Submitting form:
ssh: AAAAB3NzaC1yc2EAAAABIwAAAQEAp4c3Wz5tRToKRtCYYmSQhnUo/SlW05b7UBiEY8KHqfI6OhuSLaX3zZd0YEuVSKaRC5z3t7lyzo8XjrjAquu3EV1cMVexODQJKONqz+voBU5+Bsi3104IoswJzmttlVeEp6tTClDOtXM/S2/8N6pdFICyrwExIyABJ3DFRb4K7hzTmp21Ci90YsAw+vQW9Vl7vMqzKaVomkNXDh8Ya8UeoUiA/0aC5GdADNAWjgIVmxxUDQL47rB2nFmxBzFLSvkM+svBTuZ+dx05DcYBQ95kpryj6UTSW3xwbfECqeJ4ph3GKh26evC6ugyPAcYEp5s4MBVC7hFkNqS40RP3LYUv8Q==
action: update-key
key_name: keynonexist
key_type: ssh-rsa
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 Dan McPherson 2012-01-11 15:36:37 UTC
I'm not sure if this is a client or server issue.  Please evaluate and transfer if needed.

Comment 2 Ravi Sankar 2012-01-11 17:54:19 UTC
Fixed

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