Bug 861346 - namespace name is recognized as ssh-key type when creating reserved domain with rhc-admin-ctl-domain
Summary: namespace name is recognized as ssh-key type when creating reserved domain wi...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Abhishek Gupta
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-28 09:41 UTC by Meng Bo
Modified: 2015-05-15 02:05 UTC (History)
1 user (show)

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


Attachments (Terms of Use)

Description Meng Bo 2012-09-28 09:41:46 UTC
Description of problem:
Create reserved domain with broker side command rhc-ctl-admin-domain, the namespace name specified with -n option will be recognized as ssh-key type and saved in mongodb.

Version-Release number of selected component (if applicable):
devenv_2250

How reproducible:
always

Steps to Reproduce:
1.Login to the instance and create reserved domain for non-existing user.
#rhc-admin-ctl-domain -c create -l bmeng+1 -n bmeng1dev -s xxx -t ssh-rsa -k default
2.Check the user info in mongodb
3.
  
Actual results:

{
   "_id": "bmeng+1",
   "login": "bmeng+1",
   "max_gears": 3,
   "uuid": "40051635c5074502a552935d2361c1b6",
   "ssh_keys": {
     "default": {
       "type": "bmeng1dev",
       "key": "xxx"
    }
  },
   "parent_user_login": null,
   "consumed_gears": 0,
   "capabilities": {
     "gear_sizes": {
       "0": "small"
    }
  }
}


Expected results:
The type under ssh_keys section should be ssh-rsa.

Additional info:

Comment 1 John Poelstra 2012-09-28 18:53:13 UTC
expect to this to be fixed as part of the model refactor

Comment 2 John Poelstra 2012-10-04 17:05:10 UTC
will look at today

Comment 3 Abhishek Gupta 2012-10-04 19:01:55 UTC
https://github.com/openshift/crankcase/pull/600

Comment 4 Xiaoli Tian 2012-10-08 03:36:15 UTC
(In reply to comment #3)
> https://github.com/openshift/crankcase/pull/600

https://github.com/openshift/origin-server/pull/600 has been merged , move it to ON_QA to verify.

Comment 5 Meng Bo 2012-10-08 08:01:51 UTC
Checked on devenv_2296, issue has been fixed.

[root@ip-xx bin]# oo-admin-ctl-domain -l bmeng+1 -n bmeng1dev -c create -s xxx -k key1 -t ssh-rsa
Successfully created user.
Successfully created domain.

Check in mongodb:


   "domains": {
     "0": {
       "namespace": "bmeng1dev",
       "uuid": "309514ffe4194deda65ff1669c099243"
    }
  },
   "login": "bmeng+1",
   "max_gears": 3,
   "parent_user_login": null,
   "ssh_keys": {
     "key1": {
       "key": "xxx",
       "type": "ssh-rsa"
    }
  },


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