Bug 1463798 - Stale APBs present in ASB after bootstrap
Summary: Stale APBs present in ASB after bootstrap
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Service Broker
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.7.0
Assignee: Shawn Hurley
QA Contact: weiwei jiang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-21 19:25 UTC by cchase
Modified: 2018-07-19 02:55 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-28 21:58:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:3188 0 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Container Platform 3.7 security, bug, and enhancement update 2017-11-29 02:34:54 UTC

Description cchase 2017-06-21 19:25:15 UTC
Description of problem:
Ansible Playbook Bundles (APB) that have been removed from their container catalog still appear in Ansible Service Broker (ASB) as valid options even after "bootstrap" is performed.

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


How reproducible:
100%

Steps to Reproduce:
1.  Start cluster with service-catalog and ASB using container catalog with available APBs.
2.  Bootstrap ASB if not already complete
3.  Delete an APB from the container catalog
4.  Bootstrap ASB

Actual results:
The deleted APB still appears as a usable option for provisioning even though it has been deleted.

Expected results:
The deleted APB is not visible, selectable, or not able to be provisioned.

Additional info:
ASB is not deleting the persisted APB specs from it's etcd storage.  Service-catalog only polls every 5 minutes, so a user would need to wait 5 minutes to make sure the test fails/passes.

Comment 1 Shawn Hurley 2017-06-23 13:20:04 UTC
Bug fixed with PR: https://github.com/openshift/ansible-service-broker/pull/221

Comment 3 DeShuai Ma 2017-07-06 06:06:00 UTC
Verified
Steps to verfiy:
1. Configure ansible-service-broker with reigstry='dockerhub' & org='ocpqe', then invoke bootstrap
# curl -H 'X-Broker-API-Version: 2.9' -X POST -v http://172.30.55.244:1338/v2/bootstrap
* About to connect() to 172.30.55.244 port 1338 (#0)
*   Trying 172.30.55.244...
* Connected to 172.30.55.244 (172.30.55.244) port 1338 (#0)
> POST /v2/bootstrap HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 172.30.55.244:1338
> Accept: */*
> X-Broker-API-Version: 2.9
> 
< HTTP/1.1 200 OK
< Content-Type: application/json
< Date: Thu, 06 Jul 2017 05:59:19 GMT
< Content-Length: 42
< 
{
  "spec_count": 1,
  "image_count": 1
}
* Connection #0 to host 172.30.55.244 left intact

2. Get catalog
# curl http://172.30.55.244:1338/v2/catalog
{
  "services": [
    {
      "name": "mediawiki123-apb",
      "id": "55c53a5d-65a6-4c27-88fc-e027410b1337",
      "description": "Mediawiki123 apb implementation",
      "bindable": false,
      "metadata": {
        "console.openshift.io/iconClass": "icon-mediawiki",
        "displayName": "Mediawiki (APB)",
        "documentationUrl": "https://www.mediawiki.org/wiki/Documentation",
        "longDescription": "An apb that deploys Mediawiki 1.23",
        "parameters": [
          {
            "mediawiki_db_schema": {
              "title": "Mediawiki DB Schema",
              "type": "string",
              "default": "mediawiki"
            }
          },
          {
            "mediawiki_site_name": {
              "title": "Mediawiki Site Name",
              "type": "string",
              "default": "MediaWiki"
            }
          },
          {
            "mediawiki_site_lang": {
              "title": "Mediawiki Site Language",
              "type": "string",
              "default": "en"
            }
          },
          {
            "mediawiki_admin_user": {
              "title": "Mediawiki Admin User",
              "type": "string",
              "default": "admin"
            }
          },
          {
            "mediawiki_admin_pass": {
              "title": "Mediawiki Admin User Password",
              "type": "string"
            }
          }
        ]
      },
      "plans": [
        {
          "id": "4c10ff42-be89-420a-9bab-27a9bef9aed8",
          "name": "default",
          "description": "Default plan",
          "free": true,
          "schemas": {
            "service_instance": {
              "create": {
                "parameters": {
                  "$schema": "http://json-schema.org/draft-04/schema",
                  "additionalProperties": false,
                  "properties": {
                    "mediawiki_admin_pass": {
                      "title": "Mediawiki Admin User Password",
                      "type": "string"
                    },
                    "mediawiki_admin_user": {
                      "default": "admin",
                      "title": "Mediawiki Admin User",
                      "type": "string"
                    },
                    "mediawiki_db_schema": {
                      "default": "mediawiki",
                      "title": "Mediawiki DB Schema",
                      "type": "string"
                    },
                    "mediawiki_site_lang": {
                      "default": "en",
                      "title": "Mediawiki Site Language",
                      "type": "string"
                    },
                    "mediawiki_site_name": {
                      "default": "MediaWiki",
                      "title": "Mediawiki Site Name",
                      "type": "string"
                    }
                  },
                  "required": [
                    "mediawiki_db_schema",
                    "mediawiki_site_name",
                    "mediawiki_site_lang",
                    "mediawiki_admin_user",
                    "mediawiki_admin_pass"
                  ],
                  "type": "object"
                }
              },
              "update": {}
            },
            "service_binding": {
              "create": {
                "parameters": {
                  "$schema": "http://json-schema.org/draft-04/schema",
                  "additionalProperties": false,
                  "properties": {
                    "mediawiki_admin_pass": {
                      "title": "Mediawiki Admin User Password",
                      "type": "string"
                    },
                    "mediawiki_admin_user": {
                      "default": "admin",
                      "title": "Mediawiki Admin User",
                      "type": "string"
                    },
                    "mediawiki_db_schema": {
                      "default": "mediawiki",
                      "title": "Mediawiki DB Schema",
                      "type": "string"
                    },
                    "mediawiki_site_lang": {
                      "default": "en",
                      "title": "Mediawiki Site Language",
                      "type": "string"
                    },
                    "mediawiki_site_name": {
                      "default": "MediaWiki",
                      "title": "Mediawiki Site Name",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        }
      ]
    }
  ]
}

3. Delete the image on dockerhub org 'ocpqe' then invoke bootstrap again.
# curl -H 'X-Broker-API-Version: 2.9' -X POST -v http://172.30.55.244:1338/v2/bootstrap
* About to connect() to 172.30.55.244 port 1338 (#0)
*   Trying 172.30.55.244...
* Connected to 172.30.55.244 (172.30.55.244) port 1338 (#0)
> POST /v2/bootstrap HTTP/1.1
> User-Agent: curl/7.29.0
> Host: 172.30.55.244:1338
> Accept: */*
> X-Broker-API-Version: 2.9
> 
< HTTP/1.1 200 OK
< Content-Type: application/json
< Date: Thu, 06 Jul 2017 06:01:09 GMT
< Content-Length: 42
< 
{
  "spec_count": 0,
  "image_count": 0
}
* Connection #0 to host 172.30.55.244 left intact

4. Get catalog again and confirm old apb image spec is removed from asb.
# curl http://172.30.55.244:1338/v2/catalog
{
  "services": []
}

Comment 7 errata-xmlrpc 2017-11-28 21:58:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:3188

Comment 8 Zhang Cheng 2018-07-19 02:55:57 UTC
Remove "NeedTestCase" keyword since the issue have been covered by TC https://polarion.engineering.redhat.com/polarion/#/project/OSE/workitem?id=OCP-15607


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