Bug 1026161 - Some old scalable apps' 'protocols' and 'types' endpoints are not migrated on STG
Some old scalable apps' 'protocols' and 'types' endpoints are not migrated on...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Kubernetes (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Rajat Chopra
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-04 00:20 EST by Jianwei Hou
Modified: 2015-05-14 20:22 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-23 22:28:35 EST
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 Jianwei Hou 2013-11-04 00:20:49 EST
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@redhat.com: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@py27s-jhou.stg.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 04:51:18 EST
Providing another app as infomation
 curl -s -k -H 'Accept: application/json' --user jhou+6@redhat.com: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@sslapps-jhou6.stg.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@5236bc432587c819ca000301-jhou6.stg.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@521743902587c8d5160000ba-jhou6.stg.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 14:09:23 EST
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-04 21:56:02 EST
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 09:42:13 EST
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-05 20:59:36 EST
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@sslapps-jhou6.stg.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@5236bc432587c819ca000301-jhou6.stg.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@521743902587c8d5160000ba-jhou6.stg.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.