Bug 857493

Summary: [REST API] the broker is reporting "gear_profile": null"for applications that were created before gear profiles were introduced
Product: OKD Reporter: Andre Dietisheim <adietish>
Component: PodAssignee: Dan McPherson <dmcphers>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: low Docs Contact:
Priority: high    
Version: 1.xCC: pruan
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-11-06 18:47:57 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 Andre Dietisheim 2012-09-14 15:26:58 UTC
Description of problem:
When listing an application, old applications that were created before gear profiles existed, gets reported with a "gear_profile": null.

Chat with dmcphers on the 14th of September 2012:
<snip>
(05:00:24 PM) dmcphers: adietish: is that an older app?
(05:00:42 PM) dmcphers: yeah I see it is
(05:01:05 PM) dmcphers: it was before we had gear size
(05:01:30 PM) dmcphers: can open a bug
</snip>

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

How reproducible:
1. ASSERT: make sure you have an application, that was created before gear profiles were introduced.
2. EXEC: list this application:
curl -k -H "Accept: application/json" --user "<USER>:<PASS>" https://openshift.redhat.com/broker/rest/domains/<DOMAINNAME>/applications/<APPLICATIONNAME>

Result:
{
    "data": {
        "aliases": [], 
        "app_url": "http://dfdf-man.rhcloud.com/", 
        "creation_time": "2012-01-26T13:07:43-05:00", 
        "domain_id": "man", 
        "embedded": {
            "mysql-5.1": {
                "info": "Connection URL: mysql://127.3.163.129:3306/\n"
            }, 
            "phpmyadmin-3.4": {
                "info": "URL: https://dfdf-man.rhcloud.com/phpmyadmin/\n"
            }
        }, 
        "framework": "jbossas-7", 
        "gear_count": 1, 
        "gear_profile": null, 

Expected results:
The broker should report the default gear this application is running on, not null. The openshift-java-client could assume a default gear here, but this is IHMO backend logic that should not pulled into the client. The broker should report what's the default gear it is running on.

Comment 1 JBoss JIRA Server 2012-09-14 16:06:33 UTC
Andre Dietisheim <adietish> made a comment on jira JBIDE-12622

committed to master on github: https://github.com/adietish/openshift-java-client/commit/70dd901c0a26cb3af2d051d173f61428002f6193

Comment 2 JBoss JIRA Server 2012-09-14 16:08:15 UTC
Andre Dietisheim <adietish> made a comment on jira JBIDE-12622

committed to master on https://github.com/openshift/openshift-java-client/commit/70dd901c0a26cb3af2d051d173f61428002f6193

Comment 3 JBoss JIRA Server 2012-09-14 16:09:58 UTC
Andre Dietisheim <adietish> made a comment on jira JBIDE-12622

committed to TRUNK (JBT)

Comment 4 JBoss JIRA Server 2012-09-14 16:10:32 UTC
Andre Dietisheim <adietish> updated the status of jira JBIDE-12622 to Resolved

Comment 5 Peter Ruan 2012-10-05 23:52:15 UTC
verified with devenv_2288

"gear_count": 1,
"embedded": { },
"gear_profile": "small",  <---

Comment 6 JBoss JIRA Server 2012-10-10 14:47:37 UTC
Stefan Bunciak <sbunciak> updated the status of jira JBIDE-12622 to Closed

Comment 7 JBoss JIRA Server 2012-10-10 14:47:37 UTC
Stefan Bunciak <sbunciak> made a comment on jira JBIDE-12622

Verified in JBoss Tools 4.0.0.Alpha2