Bug 1572470 - [ASB] Async binding failed
Summary: [ASB] Async binding failed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Service Broker
Version: 3.10.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.10.0
Assignee: Jesus M. Rodriguez
QA Contact: Jian Zhang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-27 05:56 UTC by Jian Zhang
Modified: 2018-07-30 19:14 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
This bug was caused by our recent move to Custom Resource Definitions (CRDs) which will be released for the first time in 3.10. Therefore, previous customers should not have seen this error.
Clone Of:
Environment:
Last Closed: 2018-07-30 19:14:14 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:1816 None None None 2018-07-30 19:14:34 UTC

Description Jian Zhang 2018-04-27 05:56:06 UTC
version-Release number of selected component (if applicable):
The ASB version: 1.2.7
The Service catalog version: v3.10.0-0.30.0;Upstream:v0.1.13

How reproducible:
Always


Steps to Reproduce:
1. In 3.10, the Service catalog enable the async feature by default, and then enable the ASB async feature, and specify the registry that stored APB which support async. Like below:
#oc edit cm broker-config
...
    registry:
      - type: dockerhub
        name: dh
        url:  registry.hub.docker.com
        org:  mhrivnak
        tag:  latest
        white_list: [.*-apb$]
    broker:
      launch_apb_on_bind: true

2.Provision the APB(PostgreSQL) on Web, and then click "create binding" button.

Actual results:
Create binding failed.
ServiceBroker returned failure; bind operation will not be retried: Status: 400; ErrorMessage: <nil>; Description: jobstates.automationbroker.io "3c420da7-aa36-4651-ad15-146961860efb" already exists; ResponseError: <nil>

The ASB logs:

[2018-04-27T05:47:13.945Z] [DEBUG] - JobStateSubscriber Notify : msg state {3c420da7-aa36-4651-ad15-146961860efb in progress  bind  action started} 
[2018-04-27T05:47:13.945Z] [DEBUG] - set job state for instance: 6f6372cb-49de-11e8-be27-0a580a800004 token: 3c420da7-aa36-4651-ad15-146961860efb
[2018-04-27T05:47:13.968Z] [ERROR] - unable to create the job state - jobstates.automationbroker.io "3c420da7-aa36-4651-ad15-146961860efb" already exists
[2018-04-27T05:47:13.968Z] [ERROR] - failed to set initial jobstate for 3c420da7-aa36-4651-ad15-146961860efb, jobstates.automationbroker.io "3c420da7-aa36-4651-ad15-146961860efb" already exists
10.128.0.1 - - [27/Apr/2018:05:47:13 +0000] "PUT /ansible-service-broker/v2/service_instances/285ab30a-49cb-11e8-be27-0a580a800004/service_bindings/6f6372cb-49de-11e8-be27-0a580a800004?accepts_incomplete=true HTTP/1.1" 400 109


jobstate and servicebinding info:

[root@host-172-16-120-53 ~]# oc describe jobstates 3c420da7-aa36-4651-ad15-146961860efb
Name:         3c420da7-aa36-4651-ad15-146961860efb
Namespace:    openshift-ansible-service-broker
Labels:       instanceId=6f6372cb-49de-11e8-be27-0a580a800004
              state=succeeded
Annotations:  <none>
API Version:  automationbroker.io/v1
Kind:         JobState
Metadata:
  Cluster Name:        
  Creation Timestamp:  2018-04-27T05:47:13Z
  Generation:          1
  Resource Version:    28107
  Self Link:           /apis/automationbroker.io/v1/namespaces/openshift-ansible-service-broker/jobstates/3c420da7-aa36-4651-ad15-146961860efb
  UID:                 6f9b1378-49de-11e8-bf75-fa163edea140
Spec:
  Description:  bind job completed
  Error:        
  Method:       bind
  Pod Name:     
  State:        succeeded
Events:         <none>

[root@host-172-16-120-53 ~]# oc describe servicebinding 6f6372cb-49de-11e8-be27-0a580a800004
Name:         6f6372cb-49de-11e8-be27-0a580a800004
Namespace:    openshift-ansible-service-broker
Labels:       <none>
Annotations:  <none>
API Version:  automationbroker.io/v1
Kind:         ServiceBinding
Metadata:
  Cluster Name:        
  Creation Timestamp:  2018-04-27T05:47:13Z
  Generation:          1
  Resource Version:    28031
  Self Link:           /apis/automationbroker.io/v1/namespaces/openshift-ansible-service-broker/servicebindings/6f6372cb-49de-11e8-be27-0a580a800004
  UID:                 6f983d14-49de-11e8-bf75-fa163edea140
Spec:
  Job Token:            
  Parameters:           {"_apb_last_requesting_user":"jiazha","_apb_plan_id":"dev","_apb_service_binding_id":"6f6372cb-49de-11e8-be27-0a580a800004","_apb_service_class_id":"1dda1477cace09730bd8ed7a6505607e","_apb_service_instance_id":"285ab30a-49cb-11e8-be27-0a580a800004"}
  Service Instance ID:  285ab30a-49cb-11e8-be27-0a580a800004
Events:                 <none>

Expected results:
create async binding success.

Additional info:
[root@host-172-16-120-53 ~]# uname -a
Linux host-172-16-120-53 3.10.0-862.el7.x86_64 #1 SMP Wed Mar 21 18:14:51 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux
[root@host-172-16-120-53 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.5 (Maipo)

Comment 1 Jesus M. Rodriguez 2018-04-30 20:35:46 UTC
Fixed by PR 898
https://github.com/openshift/ansible-service-broker/pull/898

Comment 2 Jesus M. Rodriguez 2018-05-03 13:49:00 UTC
(In reply to Jesus M. Rodriguez from comment #1)
> Fixed by PR 898
> https://github.com/openshift/ansible-service-broker/pull/898

Changes to CRDs occurred after PR #898, I re-fixed the async problems in PR #924
 https://github.com/openshift/ansible-service-broker/pull/924

Comment 4 Jian Zhang 2018-05-14 05:19:11 UTC
It works well now, verify it.

Sevice catalog version: v0.1.16
ASB version: 1.2.10

Comment 6 errata-xmlrpc 2018-07-30 19:14:14 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/RHBA-2018:1816


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