Bug 1024165

Summary: Unable to set keep_deployments if an app has been deployed without code change
Product: OpenShift Online Reporter: Jianwei Hou <jhou>
Component: PodAssignee: Abhishek Gupta <abhgupta>
Status: CLOSED DUPLICATE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: lnader
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: 2013-10-29 17:53:51 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:
Attachments:
Description Flags
Broker development.log none

Description Jianwei Hou 2013-10-29 03:28:14 UTC
Created attachment 816959 [details]
Broker development.log

Description of problem:
Deploy an application without pushing any code change, the app is deployed with an id. Then set the keep_deployments of the app, an error will occur "Unable to complete the requested operation due to: undefined method `each' for nil:NilClass.\nReference ID: 6c2c177669d583fb7b9db4433e942cf0"

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

How reproducible:
Always

Steps to Reproduce:
1. Create a diy application
2. Don't do anything, and deploy the app directly
3. Set the keep_deployments of the app via RESTAPI
curl -s -k -H 'Content-Type: Application/json' --user jhou:x https://ec2-50-19-142-185.compute-1.amazonaws.com/broker/rest/domain/jhou/application/d1 -X PUT -d '{"keep_deployments": 5}'


Actual results:
After step 3:
{
    "api_version": 1.6,
    "data": null,
    "messages": [
        {
            "exit_code": 1,
            "field": null,
            "index": null,
            "severity": "error",
            "text": "Unable to complete the requested operation due to: undefined method `each' for nil:NilClass.\nReference ID: 6c2c177669d583fb7b9db4433e942cf0"
        }
    ],
    "status": "internal_server_error",
    "supported_api_versions": [
        1.0,
        1.1,
        1.2,
        1.3,
        1.4,
        1.5,
        1.6
    ],
    "type": null,
    "version": "1.6"
}


Expected results:
The application should be updated successfully.

Additional info:

Comment 1 Abhishek Gupta 2013-10-29 17:13:49 UTC
This should be fixed with --> https://github.com/openshift/origin-server/pull/4026
(Image: devenv_3961)

Comment 2 Lili Nader 2013-10-29 17:53:51 UTC

*** This bug has been marked as a duplicate of bug 1023304 ***