Bug 789786

Summary: [REST API] Deleting a specific key returns an error 500
Product: OKD Reporter: Clayton Coleman <ccoleman>
Component: PodAssignee: Lili Nader <lnader>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: bmeng, mfisher, rmillner, rpenta
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-13 18:34:57 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 Clayton Coleman 2012-02-12 23:36:46 UTC
Attempting to delete a specific user key by name fails, and instead returns 500.  Key was created via rest api with name "test132908931999df51".

Broker logs:

Started DELETE "/broker/rest/user/keys/test132908931999df51.json" for 66.57.94.244 at Sun Feb 12 18:28:43 -0500 2012
  Processing by KeysController#destroy as JSON
  Parameters: {"id"=>"test132908931999df51"}
MongoDataStore.find(CloudUser, test1+132908931999df51, test1+132908931999df51)

ERROR: Can't remove all ssh keys for user test1+132908931999df51
Completed 500 Internal Server Error in 71ms (Views: 15.7ms)

Comment 1 Ravi Sankar 2012-02-16 01:31:40 UTC
Approach-1:
step-1: create at least one ssh key so that any user application is accessible
step-2: create an application

Approach-2:
step-1: create an application
step-2: Add new ssh key to access the application.

Currently, we are following Approach-1, where we expect at least one ssh key to
be associated with the user or domain so that user can access current and
future created applications.

I prefer approach-2 where user has flexibility to remove/add keys any time.
Anyway we are planning to segregate user/domain (US1876), as part of this user
story we can remove this limitation.

Comment 2 Clayton Coleman 2012-02-16 05:41:36 UTC
Prefer approach 2 as well.

Comment 3 Clayton Coleman 2012-03-23 23:08:21 UTC
Yay!

Comment 4 Meng Bo 2012-03-26 09:10:48 UTC
check on devenv_1672,
this issue has been fixed.