Via the REST API I can add haproxy-1.4 to a non-scaled application, and it will be embedded with php-5.3. This should report an error back to the user along the lines of "haproxy-1.4 cannot be added to existing applications. It is automatically added when you create a scaling application." This applies to create app and add cartridge. As an alternative, during create if the user doesn't pass the scaling parameter but DOES pass haproxy-1.4 as an additional cartridge, having the REST API accept that as scaling=true would be internally consistent with how we model this call. I.e. POST /apps {cartridges: [php-5.3, haproxy-1.4]} would be the same as POST /apps {cartridges: [php-5.3], scaling: true}
*** Bug 807560 has been marked as a duplicate of this bug. ***
https://github.com/openshift/origin-server/pull/1159
Verified that haproxy cannot be added to non-scalable application on devenv_2686. But when I try to create an application with {cartridges: [php-5.3, haproxy-1.4]}, I get this msg "haproxy-1.4 cannot be added to existing applications. It is automatically added when you create a scaling application" Is this the expected response or should this have the same response as POST /apps {cartridges: [php-5.3], scaling: true} as mentioned in the bug description chandrikagole$ curl -3 -k -H 'Accept: application/xml' --user 'cgole:foo' https://ec2-50-19-30-239.compute-1.amazonaws.com/broker/rest/domains/cgole6/applications -X POST -d name=a1 -d cartridges[]=php-5.3 -d cartridges[]=haproxy-1.4 <?xml version="1.0" encoding="UTF-8"?> <response> <status>unprocessable_entity</status> <type nil="true"></type> <data> <datum nil="true"></datum> </data> <messages> <message> <severity>error</severity> <text>haproxy-1.4 cannot be added to existing applications. It is automatically added when you create a scaling application.</text> <exit-code>109</exit-code> <field nil="true"></field> </message> </messages> <version>1.3</version> <supported-api-versions> <supported-api-version>1.0</supported-api-version> <supported-api-version>1.1</supported-api-version> <supported-api-version>1.2</supported-api-version> <supported-api-version>1.3</supported-api-version> </supported-api-versions> </response>
This sounds expected. Did this used to work differently or was this a new test?
Checked on devenv_2688, for both normal app and scalable app, embedding haproxy-1.4 to app will return error message. Normal app: <text>haproxy-1.4 cannot be added to existing applications. It is automatically added when you create a scaling application.</text> Scalable one: <text>haproxy-1.4 already embedded in 'php1s'</text>