Bug 1502044 - Ansible Service Broker should report created on deprovision request
Summary: Ansible Service Broker should report created on deprovision request
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Service Broker
Version: unspecified
Hardware: All
OS: All
unspecified
medium
Target Milestone: ---
: 3.7.0
Assignee: David Zager
QA Contact: Weihua Meng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-13 19:47 UTC by David Zager
Modified: 2017-11-28 22:17 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 22:17:21 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 David Zager 2017-10-13 19:47:09 UTC
Description of problem:

Currently, the ansible service broker returns http.StatusOK(200) when the deprovision request is received instead of http.StatusAccepted(202).

Version-Release number of selected component (if applicable): N/A


How reproducible: Always


Steps to Reproduce:
1. Create an openshift cluster with service catalog + ansible service broker
2. Provision an apb, for example hello-world-apb
3. Deprovision apb
4. Examine ansible-service-broker logs

Actual results:

[2017-10-13T18:50:45.22Z] [NOTICE] ============================================================
[2017-10-13T18:50:45.22Z] [NOTICE]                       DEPROVISIONING
[2017-10-13T18:50:45.22Z] [NOTICE] ============================================================
[2017-10-13T18:50:45.22Z] [NOTICE] ServiceInstance.Id: 2fce0fd03e452dc89d96ad14001197f1
[2017-10-13T18:50:45.22Z] [NOTICE] ServiceInstance.Name: dh-rhscl-mysql-apb
[2017-10-13T18:50:45.22Z] [NOTICE] ServiceInstance.Image: docker.io/ansibleplaybookbundle/rhscl-mysql-apb:latest
[2017-10-13T18:50:45.22Z] [NOTICE] ServiceInstance.Description: Software Collections MySQL APB
[2017-10-13T18:50:45.22Z] [NOTICE] ============================================================
[2017-10-13T18:50:45.22Z] [DEBUG] ExecutingApb:
[2017-10-13T18:50:45.22Z] [DEBUG] name:[ dh-rhscl-mysql-apb ]
[2017-10-13T18:50:45.22Z] [DEBUG] image:[ docker.io/ansibleplaybookbundle/rhscl-mysql-apb:latest ]
[2017-10-13T18:50:45.22Z] [DEBUG] action:[ deprovision ]
[2017-10-13T18:50:45.22Z] [DEBUG] pullPolciy:[ IfNotPresent ]
[2017-10-13T18:50:45.22Z] [DEBUG] role:[ edit ]
172.17.0.2 - - [13/Oct/2017:18:50:45 +0000] "DELETE /ansible-service-broker/v2/service_instances/ab6064c9-b437-4660-92d8-42942470055a?accepts_incomplete=true&plan_id=f318937f8bfd021f2137dda6a3c21723&service_id=2fce0fd03e452dc89d96ad14001197f1 HTTP/1.1" 200 58


Expected results: Should return 202 (accepted)

Comment 1 Erik Nelson 2017-10-13 21:06:37 UTC
Confirmed async deprovision requests should return 202s. 200 is reserved for synchronous deletion.

Comment 5 Weihua Meng 2017-10-27 09:55:26 UTC
Will verify when following bug fixed. https://bugzilla.redhat.com/show_bug.cgi?id=1506551

Comment 6 Weihua Meng 2017-10-27 11:38:34 UTC
Fixed.
ansible-service-broker-1.0.11-1.el7.x86_64

10.129.0.1 - - [27/Oct/2017:11:33:50 +0000] "DELETE /ansible-service-broker/v2/service_instances/81c55247-8c6a-4c91-bbb0-e8f6ff18b5e7?accepts_incomplete=true&plan_id=f318937f8bfd021f2137dda6a3c21723&service_id=2fce0fd03e452dc89d96ad14001197f1 HTTP/1.1" 202 58



[2017-10-27T11:33:50.313Z] [NOTICE] ============================================================
[2017-10-27T11:33:50.313Z] [NOTICE]                       DEPROVISIONING                        
[2017-10-27T11:33:50.313Z] [NOTICE] ============================================================
[2017-10-27T11:33:50.313Z] [NOTICE] ServiceInstance.Id: 2fce0fd03e452dc89d96ad14001197f1
[2017-10-27T11:33:50.313Z] [NOTICE] ServiceInstance.Name: dh-rhscl-mysql-apb
[2017-10-27T11:33:50.313Z] [NOTICE] ServiceInstance.Image: docker.io/ansibleplaybookbundle/rhscl-mysql-apb:latest
[2017-10-27T11:33:50.313Z] [NOTICE] ServiceInstance.Description: Software Collections MySQL APB
[2017-10-27T11:33:50.313Z] [NOTICE] ============================================================
[2017-10-27T11:33:50.313Z] [DEBUG] ExecutingApb:
[2017-10-27T11:33:50.313Z] [DEBUG] name:[ dh-rhscl-mysql-apb ]
[2017-10-27T11:33:50.314Z] [DEBUG] image:[ docker.io/ansibleplaybookbundle/rhscl-mysql-apb:latest ]
[2017-10-27T11:33:50.314Z] [DEBUG] action:[ deprovision ]
[2017-10-27T11:33:50.314Z] [DEBUG] pullPolciy:[ IfNotPresent ]
[2017-10-27T11:33:50.314Z] [DEBUG] role:[ edit ]
10.129.0.1 - - [27/Oct/2017:11:33:50 +0000] "DELETE /ansible-service-broker/v2/service_instances/81c55247-8c6a-4c91-bbb0-e8f6ff18b5e7?accepts_incomplete=true&plan_id=f318937f8bfd021f2137dda6a3c21723&service_id=2fce0fd03e452dc89d96ad14001197f1 HTTP/1.1" 202 58

Comment 9 errata-xmlrpc 2017-11-28 22:17:21 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.