Bug 895269 - I can embed haproxy-1.4 into an existing application
Summary: I can embed haproxy-1.4 into an existing application
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: Dan McPherson
QA Contact: libra bugs
URL:
Whiteboard:
: 807560 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-14 23:12 UTC by Clayton Coleman
Modified: 2015-05-15 02:12 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-02-14 00:41:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Clayton Coleman 2013-01-14 23:12:22 UTC
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}

Comment 1 Rob Millner 2013-01-16 22:53:59 UTC
*** Bug 807560 has been marked as a duplicate of this bug. ***

Comment 2 Dan McPherson 2013-01-17 14:31:20 UTC
https://github.com/openshift/origin-server/pull/1159

Comment 3 Chandrika Gole 2013-01-17 23:03:53 UTC
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>

Comment 4 Dan McPherson 2013-01-18 03:24:18 UTC
This sounds expected.  Did this used to work differently or was this a new test?

Comment 5 Meng Bo 2013-01-18 09:58:36 UTC
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>


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