Bug 1091071 - rhc shows haproxy cartridge in every framework gear
Summary: rhc shows haproxy cartridge in every framework gear
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: oc
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Fabiano Franz
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks: 1109382
TreeView+ depends on / blocked
 
Reported: 2014-04-24 19:16 UTC by Luke Meyer
Modified: 2015-05-15 02:28 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-10 00:47:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
response from /application/id/gear_groups?include=endpoints (11.56 KB, text/plain)
2014-07-08 17:59 UTC, Lili Nader
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 965013 0 medium CLOSED Scaled-up gears will be listed with haproxy together when trying to show app gears via --gears 2021-02-22 00:41:40 UTC

Internal Links: 965013

Description Luke Meyer 2014-04-24 19:16:43 UTC
Description of problem:
When requesting per-gear status from a scaled app, the haproxy cartridge is shown as present in all framework gears, though it is not. Given we can set an app HA and have a >1 subset of the gears have this cartridge, it would be nice if rhc didn't misrepresent this.

Steps to Reproduce:
1. rhc app create foos php-5.4 mysql-5.5 -s
2. rhc cartridge scale -a foos php-5.4 --min 5
3. rhc app show -a foos --gears

Actual results:
ID                       State   Cartridges          Size  SSH URL
------------------------ ------- ------------------- ----- ------------------------------------------------------------------
535914dc6892dfc495000007 started haproxy-1.4 php-5.4 small 535914dc6892dfc495000007.com
5359152c6892dfc495000027 started haproxy-1.4 php-5.4 small 5359152c6892dfc495000027.com
5359152c6892dfc495000028 started haproxy-1.4 php-5.4 small 5359152c6892dfc495000028.com
5359152c6892dfc495000029 started haproxy-1.4 php-5.4 small 5359152c6892dfc495000029.com
5359152c6892dfc49500002a started haproxy-1.4 php-5.4 small 5359152c6892dfc49500002a.com
53591af76892dfc49500005b started mysql-5.5           small 53591af76892dfc49500005b.com


Expected results:
ID                       State   Cartridges          Size  SSH URL
------------------------ ------- ------------------- ----- ------------------------------------------------------------------
535914dc6892dfc495000007 started haproxy-1.4 php-5.4 small 535914dc6892dfc495000007.com
5359152c6892dfc495000027 started php-5.4             small 5359152c6892dfc495000027.com
5359152c6892dfc495000028 started php-5.4             small 5359152c6892dfc495000028.com
5359152c6892dfc495000029 started php-5.4             small 5359152c6892dfc495000029.com
5359152c6892dfc49500002a started php-5.4             small 5359152c6892dfc49500002a.com
53591af76892dfc49500005b started mysql-5.5           small 53591af76892dfc49500005b.com


Additional info:
In this case rhc is basically passing on what it gets from the API, which lists haproxy and php in a single gear group, and all the gears in that gear group in an array, without differentiating which of the gears actually has both cartridges. Perhaps for a sparse cartridge there should be some indicator in the API of which gears actually have it?

Comment 1 Fabiano Franz 2014-05-02 19:26:13 UTC
Reassigning to check if we can fix this in the broker. The REST API call involved is:

/broker/rest/application/<id>/gear-groups

Comment 2 Lili Nader 2014-05-05 18:30:29 UTC
So this API returns gear groups and not gears.  Using the above steps to reproduce 2 gear groups are returned:

First groups contains one gear and one cartridge.

Second groups contains 5 gears and two cartridges (php and haproxy)


So the API returns correct information but it is lacking the granularity that the client tools need which is per gear info.

Comment 3 Luke Meyer 2014-07-03 18:39:51 UTC
I believe the necessary granularity is actually present if the "include=endpoints" option is added at the gear-groups endpoint. This indicates per-gear which cartridge is present.

Comment 4 Lili Nader 2014-07-08 17:59:41 UTC
Created attachment 916514 [details]
response from /application/id/gear_groups?include=endpoints

Comment 5 Lili Nader 2014-07-08 18:01:53 UTC
Verified that include=endpoints will return the additional information required to show which gears have the haproxy cartridge and which gears have only the php cartridge (see attachment). Assigning back to client tools team to make the changes on rhc.

Comment 6 Fabiano Franz 2014-07-24 17:48:58 UTC
Fixed in https://github.com/openshift/rhc/pull/632

Comment 7 openshift-github-bot 2014-07-24 23:09:47 UTC
Commit pushed to master at https://github.com/openshift/rhc

https://github.com/openshift/rhc/commit/d858baefbad9d0d85ee46fa05a8642d169cad039
Bug 1091071 - properly displays haproxy on app gears

Comment 8 weiwei jiang 2014-07-28 03:10:14 UTC
Checked on devenv_5011 with rhc-1.28.3, and the result is as expected result now, so verify this issue.


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