Bug 822020 - Need info in gear_groups indicating which gear_group the ha_proxy controls
Need info in gear_groups indicating which gear_group the ha_proxy controls
Status: CLOSED NOTABUG
Product: OpenShift Origin
Classification: Red Hat
Component: Master (Show other bugs)
2.x
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Abhishek Gupta
libra bugs
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-16 01:48 EDT by Clayton Coleman
Modified: 2015-05-14 20:51 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-19 10:08:23 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Clayton Coleman 2012-05-16 01:48:29 EDT
In order to properly indicate scaling in the UI, we need to be able to unequivocally determine from gear_groups that the comp-web and comp-proxy components are related.  Using cart name feels not future safe:

example of scaled app

  "data": [
    {
      "gears": [{
          "id": "6d5f993faffa47cf81ea4b9b99453ce1",
          "state": "started"
        }],
      "cartridges": [{"name": "php-5.3"}],
      "name": "@@app/comp-web/cart-php-5.3"
    },
    {
      "gears": [{
          "id": "c04ecc1c06a64692baf4110e0adb362a",
          "state": "started"
        }],
      "cartridges": [{"name": "haproxy-1.4"}, {"name": "php-5.3"}],
      "name": "@@app/comp-proxy/cart-php-5.3"
    },
    {
      "gears": [{
          "id": "05795073f4f2426e9e8aea1d858f05fa",
          "state": "unknown"
        }],
      "cartridges": [{"name": "mysql-5.1"}],
      "name": "@@app/comp-proxy/cart-mysql-5.1/group-mysql"
    }
  ]

What the UI has to represent based on this info is:

Cart: [PHP 5.3] - 2 Small gears - is scaled
Cart: [MySQL] - 1 Small gear - is not scaled

Using the example above, a caller could assume that because the 'php-5.3' cart is colocated with the ha-proxy, that 'php-5.3' is being scaled and so the two gear groups are related.  However, if we ever add a separate ha-proxy that relationship breaks and so a caller would be broken.  Will we ever have a more complicated topology than 1 haproxy and X instances of a web cart?

If not, I would prefer to establish a clear relationship - possibly something like:

    {
      "gears": [{
          "id": "6d5f993faffa47cf81ea4b9b99453ce1",
          "state": "started"
        }],
      "cartridges": [{"name": "php-5.3"}],
      "name": "@@app/comp-web/cart-php-5.3"
    },
    {
      "gears": [{
          "id": "c04ecc1c06a64692baf4110e0adb362a",
          "state": "started"
        }],
      "cartridges": [{"name": "haproxy-1.4", "scales": "php-5.3", "scales_with": "@@app/comp-web/cart-php-5.3"}, {"name": "php-5.3"}],
      "name": "@@app/comp-proxy/cart-php-5.3"
    },

We can talk tomorrow, but I want to get closure on this before i implement something hackish.
Comment 1 Abhishek Gupta 2012-05-29 19:05:01 EDT
This does not affect users and is only required by the site at the moment. Also, based on email conversation between Krishna and Clayton, this is not required by the site till the next sprint.
Comment 2 Clayton Coleman 2012-06-05 02:02:37 EDT
Need this for scaling UI this sprint.  Also need the current scale multiplier.  Currently we have to infer it from the other groups (find out which is scaling, add up gears), but most clients are going to want to read something simple to find this out.

Client wants to get:
  whether app is scaling
  what current scale multiplier for a particular web cart (or cart in general) is
  the minimum and maximum scale parameters (I thought this was implemented last sprint but don't see it)

For now if gear group with haproxy includes a number indicating the current scale out that would be enough for us to complete US2339
Comment 3 Clayton Coleman 2012-06-08 14:49:57 EDT
Further revision - all of this is some ugly complexity.  I don't mind gear groups exposing it, but application also needs to expose it.  The :embedded field object is kind of hackish - it really needs to be something clean like:

{
  name: "appfoo"
  ...
  scales: {
    'php-5.3': {with: "haproxy-1.4", min: 1, max: 5, times: 3}
  }
}
Comment 4 Clayton Coleman 2012-06-19 10:08:23 EDT
Opened a story for this as a feature - US2445.

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