Bug 1470860 - Ansible Service Broker: Do not create a project if it does not exist. [NEEDINFO]
Summary: Ansible Service Broker: Do not create a project if it does not exist.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Service Broker
Version: 3.6.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.7.0
Assignee: Erik Nelson
QA Contact: weiwei jiang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-13 20:49 UTC by John Matthews
Modified: 2017-11-28 22:01 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-28 22:01:28 UTC
Target Upstream Version:
Embargoed:
jmatthew: needinfo? (wjiang)


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 John Matthews 2017-07-13 20:49:19 UTC
Description of problem:

The Ansible Service Broker should __not__ create a project if it does not exist.

We want to return a clear error message that the request is failing because project does not exist.

Comment 3 weiwei jiang 2017-07-25 03:16:54 UTC
Checked with:
#asbd --version
0.9.9

and project not existed will not be created, and come out error message in ansible-service-broker pod logs.

The ansible-service-broker pod log is:
[2017-07-25T03:07:31.295Z] [INFO] ASYNC provisioning in progress
[2017-07-25T03:07:31.296Z] [NOTICE] ============================================================
[2017-07-25T03:07:31.296Z] [NOTICE]                        PROVISIONING                         
[2017-07-25T03:07:31.296Z] [NOTICE] ============================================================
[2017-07-25T03:07:31.296Z] [NOTICE] Spec.Id: e1bcd4a8-ce02-4585-9f4c-18abd56d76f2
[2017-07-25T03:07:31.296Z] [NOTICE] Spec.Name: postgresql-apb
[2017-07-25T03:07:31.296Z] [NOTICE] Spec.Image: openshift3/postgresql-apb
[2017-07-25T03:07:31.296Z] [NOTICE] Spec.Description: SCL PostgreSQL apb implementation
[2017-07-25T03:07:31.296Z] [NOTICE] ============================================================
[2017-07-25T03:07:31.296Z] [INFO] Checking if project psql-project exists...
10.128.0.1 - - [25/Jul/2017:03:07:31 +0000] "PUT /v2/service_instances/1554c27c-6073-4dff-9fd8-0e4509e11413?accepts_incomplete=true HTTP/1.1" 202 58
[2017-07-25T03:07:31.573Z] [INFO] Container not up yet, retrying 64 of 150 on pod apb-c1ffa138-8c39-4f97-9ca5-94ee9a39e63f
[2017-07-25T03:07:31.658Z] [ERROR] Project psql-project does NOT exist! Cannot provision requested postgresql-apb
[2017-07-25T03:07:31.658Z] [ERROR] broker::Provision error occurred.
[2017-07-25T03:07:31.658Z] [ERROR] Project psql-project does not exist




The request script is:
#!/bin/bash -e

instanceUUID="1554c27c-6073-4dff-9fd8-0e4509e11413"
planUUID="4c10ff42-be89-420a-9bab-27a9bef9aed8"
serviceUUID="e1bcd4a8-ce02-4585-9f4c-18abd56d76f2"

req="{
  \"plan_id\": \"$planUUID\",
  \"service_id\": \"$serviceUUID\",
  \"context\": {
    \"platform\": \"openshift\",
    \"namespace\": \"psql-project\"
  },
  \"parameters\": {
    \"postgresql_database\": \"admin\",
    \"postgresql_password\": \"admin123\",
    \"postgresql_user\": \"admin\",
    \"postgresql_version\": \"9.5\"
  }
}"

curl \
  -X PUT \
  -H 'X-Broker-API-Version: 2.9' \
  -H 'Content-Type: application/json' \
  -d "$req" \
  -v \
  "http://asb-1338-openshift-ansible-service-broker.0725-di6.qe.rhcloud.com/v2/service_instances/$instanceUUID"

Comment 8 errata-xmlrpc 2017-11-28 22:01:28 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


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