Bug 1586005
Summary: | [ASB]Cannot get the job state of servicebinding when enable the async | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Jian Zhang <jiazha> |
Component: | Service Broker | Assignee: | Jesus M. Rodriguez <jesusr> |
Status: | CLOSED ERRATA | QA Contact: | Jian Zhang <jiazha> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 3.10.0 | CC: | aos-bugs, jmatthew, mhrivnak |
Target Milestone: | --- | ||
Target Release: | 3.10.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | No Doc Update | |
Doc Text: |
undefined
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2018-07-30 19:17:19 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jian Zhang
2018-06-05 09:49:56 UTC
Your last_operation script is incorrect. The OSB spec defines the last_operation url for BINDINGS to be: /v2/service_instances/$INSTANCE_ID/service_bindings/$BINDING_ID/last_operation?operation=... ### OSB spec regarding async binds https://github.com/mattmcneeney/servicebroker/blob/43ba40883f07f0cc6841b5539a06ed51788d725e/spec.md#route-2 ### last_operation.sh script changes you need a second argument which should be the binding id, the same one passed to bind.sh. The url needs to have the service_bindings/ in it. BINDING_ID=$2 .... "https://asb-1338-openshift-ansible-service-broker.apps.0604-gke.qe.rhcloud.com/ansible-service-broker/v2/service_instances/$INSTANCE_ID/service_bindings/$BINDING_ID/last_operation?operation=$OPERATION_ID&service_id=$SERVICE_UUID&plan_id=$PLAN_UUID" ### using correct url in the script results in finding the jobstate $ ./last_operation.sh c9660714-cc45-4413-aebf-f2f52b4666da e8926ce5-1d5f-46f1-b678-f1e1d2864764 HTTP/1.1 200 OK Content-Type: application/json Date: Tue, 05 Jun 2018 20:37:57 GMT Content-Length: 66 Set-Cookie: 89a6d633054ded194d4e1360cdc1fbef=19d7735c752d40bedc1b0307fbbf73e0; path=/; HttpOnly; Secure Cache-control: private { "state": "succeeded", "description": "bind job completed" } Please retest by doing the following: 1) copy your last_operation.sh to binding_last_operation.sh 2) use the correct url in binding_last_operation.sh 3) perform the steps you did above, except use the new binding_last_operation.sh script to monitor async binding jobs Here's one I've used in the past: https://github.com/openshift/ansible-service-broker/blob/master/test/last_operation_bind.sh I do not think the `oc describe` is a bug with the broker. That would most likely be a bug with oc command. Jesus, Thank you for your clarification! It works well, verify it. I will new a bug for the `oc describe` issue. Thanks! [jzhang@localhost ~]$ ./bind.sh bc56461c-5a9a-49ba-8bbc-24b494bfd998 binding ID: bc56461c-5a9a-49ba-8bbc-24b494bfd998 HTTP/1.1 202 Accepted Content-Type: application/json Date: Wed, 06 Jun 2018 02:20:15 GMT Content-Length: 58 Set-Cookie: 89a6d633054ded194d4e1360cdc1fbef=0f001a834304cdacf8138c84a8b240cc; path=/; HttpOnly; Secure { "operation": "d6a0a5ea-0849-47de-8108-aed4acfc910c" } [jzhang@localhost ~]$ ./last_operation.sh d6a0a5ea-0849-47de-8108-aed4acfc910c bc56461c-5a9a-49ba-8bbc-24b494bfd998 HTTP/1.1 200 OK Content-Type: application/json Date: Wed, 06 Jun 2018 02:20:33 GMT Content-Length: 66 Set-Cookie: 89a6d633054ded194d4e1360cdc1fbef=0f001a834304cdacf8138c84a8b240cc; path=/; HttpOnly; Secure Cache-control: private { "state": "succeeded", "description": "bind job completed" } 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/RHBA-2018:1816 |