Bug 1279605 - Rhc app-show --gears output does not clearly show which gears have haproxy cartridges
Summary: Rhc app-show --gears output does not clearly show which gears have haproxy ca...
Keywords:
Status: CLOSED EOL
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 2.2.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: ---
Assignee: Timothy Williams
QA Contact: Wei Sun
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-09 20:35 UTC by Timothy Williams
Modified: 2017-01-13 21:45 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-13 21:45:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Timothy Williams 2015-11-09 20:35:15 UTC
Description of problem:
The output of the `rhc app-show --gears` command does not clearly show which gears have haproxy cartridges and which do not. Currently, the haproxy cartridge is displayed on each gear in the list and highlighted in green for the gears that do have the haproxy cartridge

This is confusing to users. The haproxy cartridge should not be listed for a gear at all if there is no haproxy cartridge present on the gear.

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

How reproducible:
Always

Steps to Reproduce:
1. Create a scalable application
2. Scale it up to at least 2 gears
3. Run `rhc app-show --gears`

Actual results:
Haproxy is shown with every gear, highlighted in green for the gears that do have haproxy:

# rhc app-show scaletest --gears
ID                       State   Cartridges           Size  SSH URL
------------------------ ------- -------------------- ----- ---------------------------------------------------------
564100f01cbe7428cf000001 started haproxy-1.4 ruby-1.9 small 564100f01cbe7428cf000001.rhcloud.com
admin-scaletest-1        started haproxy-1.4 ruby-1.9 small admin-scaletest-1.rhcloud.com

Expected results:
Haproxy is not shown at all on gears that do not actually have an haproxy cartridge:
# rhc app-show scaletest --gears
ID                       State   Cartridges           Size  SSH URL
------------------------ ------- -------------------- ----- ---------------------------------------------------------
564100f01cbe7428cf000001 started haproxy-1.4 ruby-1.9 small 564100f01cbe7428cf000001.rhcloud.com
admin-scaletest-1        started ruby-1.9             small admin-scaletest-1.rhcloud.com

Additional info:

The endpoint used already gives the necessary information to determine which gears do and do not have haproxy cartridges, so only changes in the rhc codebase should be necessary:

]$ curl -Lk http://localhost/broker/rest/application/564100f01cbe7428cf000001/gear-groups?include=endpoints --user admin:redhat | python -m json.tool
{
    "api_version": 1.7,
    "data": [
        {
            "additional_gear_storage": 0,
            "base_gear_storage": 1,
            "cartridges": [
                {
                    "display_name": "Web Load Balancer",
                    "name": "haproxy-1.4",
                    "tags": [
                        "web_proxy",
                        "scales",
                        "embedded"
                    ]
                },
                {
                    "display_name": "Ruby 1.9",
                    "name": "ruby-1.9",
                    "tags": [
                        "service",
                        "ruby",
                        "web_framework"
                    ]
                }
            ],
            "gear_profile": "small",
            "gears": [
                {
                    "endpoints": [
                        {
                            "cartridge_name": "ruby-1.9",
                            "external_address": "52.71.251.0",
                            "external_port": "38036",
                            "internal_address": "127.1.244.129",
                            "internal_port": "8080",
                            "mappings": [
                                {
                                    "backend": "",
                                    "frontend": ""
                                },
                                {
                                    "backend": "",
                                    "frontend": "/health"
                                }
                            ],
                            "protocols": [
                                "http",
                                "ws"
                            ],
                            "types": [
                                "web_framework"
                            ]
                        },
                        {
                            "cartridge_name": "haproxy-1.4",
                            "external_address": "52.71.251.0",
                            "external_port": "38037",
                            "internal_address": "127.1.244.130",
                            "internal_port": "8080",
                            "mappings": [
                                {
                                    "backend": "",
                                    "frontend": ""
                                },
                                {
                                    "backend": "/configuration/health",
                                    "frontend": "/health"
                                }
                            ],
                            "protocols": [
                                "http",
                                "ws"
                            ],
                            "types": [
                                "load_balancer"
                            ]
                        }
                    ],
                    "id": "564100f01cbe7428cf000001",
                    "region": null,
                    "ssh_url": "ssh://564100f01cbe7428cf000001.rhcloud.com",
                    "state": "started",
                    "zone": null
                },
                {
                    "endpoints": [
                        {
                            "cartridge_name": "ruby-1.9",
                            "external_address": "52.71.251.0",
                            "external_port": "38041",
                            "internal_address": "127.1.245.1",
                            "internal_port": "8080",
                            "mappings": [
                                {
                                    "backend": "",
                                    "frontend": ""
                                },
                                {
                                    "backend": "",
                                    "frontend": "/health"
                                }
                            ],
                            "protocols": [
                                "http",
                                "ws"
                            ],
                            "types": [
                                "web_framework"
                            ]
                        }
                    ],
                    "id": "admin-scaletest-1",
                    "region": null,
                    "ssh_url": "ssh://admin-scaletest-1.rhcloud.com",
                    "state": "started",
                    "zone": null
                }
            ],
            "id": "564100f01cbe7428cf000003",
            "name": "564100f01cbe7428cf000003",
            "scales_from": 2,
            "scales_to": -1
        }
    ],
    "messages": [
        {
            "exit_code": 0,
            "field": null,
            "index": null,
            "severity": "info",
            "text": "Showing gear groups for application 'scaletest' with domain 'admin'"
        },
        {
            "exit_code": 0,
            "field": null,
            "index": null,
            "severity": "result",
            "text": "started\nstarted\n"
        }
    ],
    "status": "ok",
    "supported_api_versions": [
        1.0,
        1.1000000000000001,
        1.2,
        1.3,
        1.3999999999999999,
        1.5,
        1.6000000000000001,
        1.7
    ],
    "type": "gear_groups",
    "version": "1.7"
}

Comment 4 Rory Thrasher 2017-01-13 21:45:42 UTC
OpenShift Enterprise v2 has officially reached EoL.  This product is no longer supported and bugs will be closed.

Please look into the replacement enterprise-grade container option, OpenShift Container Platform v3.  https://www.openshift.com/container-platform/

More information can be found here: https://access.redhat.com/support/policy/updates/openshift/


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