Bug 1026161 - Some old scalable apps' 'protocols' and 'types' endpoints are not migrated on STG
Summary: Some old scalable apps' 'protocols' and 'types' endpoints are not migrated on...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Pod
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Rajat Chopra
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-04 05:20 UTC by Jianwei Hou
Modified: 2015-05-15 00:22 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-24 03:28:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jianwei Hou 2013-11-04 05:20:49 UTC
Description of problem:
After stage migration, retrieve a scalable app's port interfaces via RESTAPI, the 'protocols' and 'types' fields has no values.
Further investigation shows that not all of the scalable apps have such problem, seems only some apps created at Sep 2013 are affected.

Version-Release number of selected component (if applicable):
On STG(devenv-stage_549)

How reproducible:
Always

Steps to Reproduce:
1. Prepare applications on STG
2. After STG upgrade and migration, verify that the port_interfaces of scalable applications are migrated, and the 'protocols' and 'types' fields have proper values
curl -s -k -H 'Accept: application/json' --user jhou:XXX 'https://stg.openshift.redhat.com/broker/rest/domains/jhou/applications/py27s/gear_groups?include=endpoints'

Actual results:
Both 'protocols' and 'types' fields have no values.
"gears": [
                {
                    "id": "5237bf48dbd93cdbd0000135",
                    "state": "idle",
                    "ssh_url": "ssh://5237bf48dbd93cdbd0000135.rhcloud.com",
                    "endpoints": [
                        {
                            "cartridge_name": "python-2.7",
                            "external_address": "54.234.56.174",
                            "external_port": "55951",
                            "internal_address": "127.8.244.1",
                            "internal_port": "8080",
                            "protocols": [

                            ],
                            "types": [

                            ],
                            "mappings": [

                            ]
                        }
                    ]
                },


Expected results:
The fields should be updated with corresponding values.

Additional info:

Comment 1 Jianwei Hou 2013-11-04 09:51:18 UTC
Providing another app as infomation
 curl -s -k -H 'Accept: application/json' --user jhou+6:XX 'https://stg.openshift.redhat.com/broker/rest/domains/jhou6/applications/sslapps/gear_groups?include=endpoints'


{
  "api_version": 1.6,
  "data": [
    {
      "additional_gear_storage": 0,
      "base_gear_storage": 1,
      "cartridges": [
        {
          "name": "python-2.6",
          "display_name": "Python 2.6",
          "tags": [
            "service",
            "python",
            "web_framework"
          ]
        },
        {
          "name": "haproxy-1.4",
          "display_name": "Web Load Balancer",
          "tags": [
            "web_proxy",
            "scales",
            "embedded"
          ]
        }
      ],
      "gear_profile": "small",
      "gears": [
        {
          "id": "5215c3512587c87b73000392",
          "state": "started",
          "ssh_url": "ssh://5215c3512587c87b73000392.rhcloud.com",
          "endpoints": [
            {
              "cartridge_name": "python-2.6",
              "external_address": "23.22.197.142",
              "external_port": "54136",
              "internal_address": "127.8.62.129",
              "internal_port": "8080",
              "protocols": [

              ],
              "types": [

              ],
              "mappings": [

              ]
            }
          ]
        },
        {
          "id": "5236bc432587c819ca000301",
          "state": "started",
          "ssh_url": "ssh://5236bc432587c819ca000301.rhcloud.com",
          "endpoints": [
            {
              "cartridge_name": "python-2.6",
              "external_address": "50.17.134.211",
              "external_port": "52971",
              "internal_address": "127.7.202.1",
              "internal_port": "8080",
              "protocols": [

              ],
              "types": [

              ],
              "mappings": [

              ]
            }
          ]
        }
      ],
      "id": "5215c3512587c87b7300039d",
      "name": "5215c3512587c87b7300039d",
      "scales_from": 2,
      "scales_to": -1
    },
    {
      "additional_gear_storage": 0,
      "base_gear_storage": 1,
      "cartridges": [
        {
          "connection_url": "postgresql://$OPENSHIFT_POSTGRESQL_DB_HOST:$OPENSHIFT_POSTGRESQL_DB_PORT",
          "username": "adminbthveah",
          "password": "u7vx_8tGujUr",
          "database_name": "sslapps",
          "name": "postgresql-8.4",
          "display_name": "PostgreSQL 8.4",
          "tags": [
            "service",
            "database",
            "embedded"
          ]
        }
      ],
      "gear_profile": "small",
      "gears": [
        {
          "id": "521743902587c8d5160000ba",
          "state": "started",
          "ssh_url": "ssh://521743902587c8d5160000ba.rhcloud.com",
          "endpoints": [
            {
              "cartridge_name": "postgresql-8.4",
              "external_address": "50.17.134.211",
              "external_port": "55196",
              "internal_address": "127.8.168.129",
              "internal_port": "5432",
              "protocols": [

              ],
              "types": [

              ],
              "mappings": [

              ]
            }
          ]
        }
      ],
      "id": "521743902587c8d5160000c3",
      "name": "521743902587c8d5160000c3",
      "scales_from": 1,
      "scales_to": 1
    }
  ],
  "messages": [
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "info",
      "text": "Showing gear groups for application 'sslapps' with domain 'jhou6'"
    },
    {
      "exit_code": 0,
      "field": null,
      "index": null,
      "severity": "result",
      "text": "started\nstarted\nstarted\n"
    }
  ],
  "status": "ok",
  "supported_api_versions": [
    1.0,
    1.1,
    1.2,
    1.3,
    1.4,
    1.5,
    1.6
  ],
  "type": "gear_groups",
  "version": "1.6"
}

Comment 2 Rajat Chopra 2013-11-04 19:09:23 UTC
This is due to apps created when the carts did not have the protocols. Then, the model started supporting it but the migration was never carried out.

Fix with https://github.com/openshift/li/pull/2088

Comment 3 Jianwei Hou 2013-11-05 02:56:02 UTC
Tested on STG but get the same result as before, above fields are still displayed as empty arrays

Comment 4 Adam Miller 2013-11-05 14:42:13 UTC
The fix went into the code base and was deployed, but we (the release team) didn't re-upgrade any applications because we weren't aware they needed to be.

Comment 6 Jianwei Hou 2013-11-06 01:59:36 UTC
Thanks, checked again and this is fixed.

{
    "api_version": 1.6,
    "data": [
        {
            "additional_gear_storage": 0,
            "base_gear_storage": 1,
            "cartridges": [
                {
                    "name": "python-2.6",
                    "display_name": "Python 2.6",
                    "tags": [
                        "service",
                        "python",
                        "web_framework"
                    ]
                },
                {
                    "name": "haproxy-1.4",
                    "display_name": "Web Load Balancer",
                    "tags": [
                        "web_proxy",
                        "scales",
                        "embedded"
                    ]
                }
            ],
            "gear_profile": "small",
            "gears": [
                {
                    "id": "5215c3512587c87b73000392",
                    "state": "idle",
                    "ssh_url": "ssh://5215c3512587c87b73000392.rhcloud.com",
                    "endpoints": [
                        {
                            "cartridge_name": "haproxy-1.4",
                            "external_address": "23.22.197.142",
                            "external_port": "54137",
                            "internal_address": "127.8.62.130",
                            "internal_port": "8080",
                            "protocols": [
                                "http",
                                "ws"
                            ],
                            "types": [
                                "load_balancer"
                            ],
                            "mappings": [
                                {
                                    "frontend": "",
                                    "backend": ""
                                },
                                {
                                    "frontend": "/health",
                                    "backend": "/configuration/health"
                                }
                            ]
                        },
                        {
                            "cartridge_name": "python-2.6",
                            "external_address": "23.22.197.142",
                            "external_port": "54136",
                            "internal_address": "127.8.62.129",
                            "internal_port": "8080",
                            "protocols": [
                                "http",
                                "ws"
                            ],
                            "types": [
                                "web_framework"
                            ],
                            "mappings": [
                                {
                                    "frontend": "",
                                    "backend": ""
                                },
                                {
                                    "frontend": "/health",
                                    "backend": ""
                                }
                            ]
                        }
                    ]
                },
                {
                    "id": "5236bc432587c819ca000301",
                    "state": "started",
                    "ssh_url": "ssh://5236bc432587c819ca000301.rhcloud.com",
                    "endpoints": [
                        {
                            "cartridge_name": "python-2.6",
                            "external_address": "50.19.129.28",
                            "external_port": "52971",
                            "internal_address": "127.7.202.1",
                            "internal_port": "8080",
                            "protocols": [
                                "http",
                                "ws"
                            ],
                            "types": [
                                "web_framework"
                            ],
                            "mappings": [
                                {
                                    "frontend": "",
                                    "backend": ""
                                },
                                {
                                    "frontend": "/health",
                                    "backend": ""
                                }
                            ]
                        }
                    ]
                }
            ],
            "id": "5215c3512587c87b7300039d",
            "name": "5215c3512587c87b7300039d",
            "scales_from": 2,
            "scales_to": -1
        },
        {
            "additional_gear_storage": 0,
            "base_gear_storage": 1,
            "cartridges": [
                {
                    "connection_url": "postgresql://$OPENSHIFT_POSTGRESQL_DB_HOST:$OPENSHIFT_POSTGRESQL_DB_PORT",
                    "username": "adminbthveah",
                    "password": "u7vx_8tGujUr",
                    "database_name": "sslapps",
                    "name": "postgresql-8.4",
                    "display_name": "PostgreSQL 8.4",
                    "tags": [
                        "service",
                        "database",
                        "embedded"
                    ]
                }
            ],
            "gear_profile": "small",
            "gears": [
                {
                    "id": "521743902587c8d5160000ba",
                    "state": "started",
                    "ssh_url": "ssh://521743902587c8d5160000ba.rhcloud.com",
                    "endpoints": [
                        {
                            "cartridge_name": "postgresql-8.4",
                            "external_address": "50.19.129.28",
                            "external_port": "55196",
                            "internal_address": "127.8.168.129",
                            "internal_port": "5432",
                            "protocols": [
                                "postgresql"
                            ],
                            "types": [
                                "database"
                            ],
                            "mappings": [

                            ]
                        }
                    ]
                }
            ],
            "id": "521743902587c8d5160000c3",
            "name": "521743902587c8d5160000c3",
            "scales_from": 1,
            "scales_to": 1
        }
    ],
    "messages": [
        {
            "exit_code": 0,
            "field": null,
            "index": null,
            "severity": "info",
            "text": "Showing gear groups for application 'sslapps' with domain 'jhou6'"
        },
        {
            "exit_code": 0,
            "field": null,
            "index": null,
            "severity": "result",
            "text": "idle\nstarted\nstarted\n"
        }
    ],
    "status": "ok",
    "supported_api_versions": [
        1.0,
        1.1,
        1.2,
        1.3,
        1.4,
        1.5,
        1.6
    ],
    "type": "gear_groups",
    "version": "1.6"
}


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