Bug 839421

Summary: Application Descriptors Return BSON::OrderedHash for some items
Product: OKD Reporter: Fotios Lindiakos <fotios>
Component: MasterAssignee: Krishna Raman <kraman>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: bmeng, jkeck, kraman, mfisher, rmillner
Target Milestone: ---Keywords: FutureFeature, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-07 20:43:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Fotios Lindiakos 2012-07-11 22:55:56 UTC
Description of problem:
When retrieving an application's descriptor, the YAML data contains BSON::OrderedHash objects


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


How reproducible:
Always


Steps to Reproduce:
1. Create application
2. Retrieve descriptor via REST API:
     http://$broker/broker/rest/domains/$domain/applications/$app/descriptor
3.
  
Actual results:
<?xml version="1.0" encoding="UTF-8"?>
<response>
<data>--- 
Scaling: 
  Max: -1
  Min: 1
Vendor: unknown
Description: &quot;&quot;
Cart-Data: !map:BSON::OrderedHash {}

Architecture: noarch
Requires: 
- ruby-1.9
License: unknown
Categories: 
- cartridge
Version: &quot;0.0&quot;
Display-Name: railsapp-0.0-noarch
Name: railsapp
Help-Topics: !map:BSON::OrderedHash {}

Website: &quot;&quot;
License-Url: &quot;&quot;</data>
<type>descriptor</type>
<supported-api-versions>
<supported-api-version>1.0</supported-api-version>
</supported-api-versions>
<status>ok</status>
<messages/>
<version>1.0</version>
</response>


Expected results:
Data should look like:
--- 
Name: railsapp
Description: ""
Cart-Data: {}

Display-Name: railsapp-0.0-noarch
Help-Topics: {}

...


Additional info:
This doesn't break any current features, but will definitely be an issue. We are currently working around it in the template creation scripts.

Comment 1 Krishna Raman 2012-07-24 17:10:43 UTC
https://github.com/openshift/crankcase/pull/260

Comment 2 Meng Bo 2012-07-25 02:17:36 UTC
Checked on devenv_1910. when using REST api get the app descriptor, no such object names contained.

=============
[root@ip-10-28-102-203 ~]# curl -k -H 'Accept: application/xml' --user bmeng:123123 https://localhost/broker/rest/domains/bmengdev/applications/php1/descriptor -XGET
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <type>descriptor</type>
  <data>--- 
Requires: 
- php-5.3
Name: php1
Display-Name: php1-0.0-noarch
</data>
  <version>1.1</version>
  <supported-api-versions>
    <supported-api-version>1.0</supported-api-version>
    <supported-api-version>1.1</supported-api-version>
  </supported-api-versions>
  <status>ok</status>
  <messages/>
</response>