Bug 1535955 - [ASB] Can NOT enable async bind in ASB
Summary: [ASB] Can NOT enable async bind in ASB
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Service Broker
Version: 3.9.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.9.0
Assignee: Michael Hrivnak
QA Contact: Jian Zhang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-18 10:28 UTC by Jian Zhang
Modified: 2018-02-06 14:32 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-06 14:32:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 1 Michael Hrivnak 2018-01-24 16:37:31 UTC
Could you provide the full broker config as it looks after performing step 2?

How exactly are you restarting the pod in step 3?

Comment 2 Jesus M. Rodriguez 2018-01-25 16:22:14 UTC
The warning message means the bind operation was called with accepts_incomplete=false AND launch_apb_on_bind: false.

That means that the broker is NOT configured to launch apb on bind.

Here is what I would do. 

# edit the configmap named broker-config
oc edit configmap broker-config

# get the pods in the ansible-service-broker to get the broker pod name
oc get pods

# delete the broker pod name
oc delete pod asb-1-4k2np 

# this deletion will cause openshift to create a new broker pod and redeploy using the new configuration values.

Comment 3 Jian Zhang 2018-01-26 06:56:09 UTC
Michael,

1, Sorry for that, I forget to save the full broker configuration at the time. And worse, I even could NOT reproduce that now, it is weird! I'm sure I encounter this issue at the time, maybe the issue related to the full broker configuration. One of my colleagues also stuck this issue, I will sync with her once she's come back.

2, I used the "#oc rollout latest dc/asb" to trigger the ASB pod's updating.

3, Now, I followed the above steps and encounter a new issue(as below) when creating a binding. 
In my understanding, the "accepts_incomplete" is controlled by the service catalog. Correct me if I'm wrong. But, I indeed enabled the ASYNC in service catalog by config its controller-manager, as below:
[root@host-172-16-120-121 ~]# oc edit daemonset controller-manager -n kube-service-catalog
      containers:
      - args:
        - controller-manager
        - -v
        - "5"
        - --leader-election-namespace
        - kube-service-catalog
        - --broker-relist-interval
        - 5m
        - --feature-gates
        - OriginatingIdentity=true
        - --feature-gates
        - AsyncBindingOperations=true

The controller-manager pod was recreated.
[root@host-172-16-120-121 ~]# oc get pods -n kube-service-catalog
NAME                       READY     STATUS    RESTARTS   AGE
apiserver-vcgvc            1/1       Running   1          1d
controller-manager-ngr4t   1/1       Running   0          1h

But, from the ASB logs(WARNING info below), the ASYNC of service-catalog was disabled! Or I misunderstanding?

[2018-01-26T06:32:43.719Z] [DEBUG] - provision bind creds: map[DB_HOST:postgresql DB_NAME:admin DB_PASSWORD:test DB_PORT:5432 DB_TYPE:postgres DB_USER:admin]
10.129.0.8 - - [26/Jan/2018:06:32:33 +0000] "PUT /ansible-service-broker/v2/service_instances/550c4447-7a8e-4206-8ad2-3cd9f3ef8947/service_bindings/461c9a32-d4e4-4405-8256-1f58310cf3bc HTTP/1.1" 201 180
[2018-01-26T06:32:44.8Z] [WARNING] - launch_apb_on_bind is enabled, but accepts_incomplete is false, binding may fail
[2018-01-26T06:32:44.807Z] [DEBUG] - Injecting PlanID as parameter: { _apb_plan_id: dev }
[2018-01-26T06:32:44.807Z] [DEBUG] - Injecting ServiceClassID as parameter: { _apb_service_class_id: d5915e05b253df421efe6e41fb6a66ba }
[2018-01-26T06:32:44.807Z] [DEBUG] - Injecting ServiceInstanceID as parameter: { _apb_service_instance_id: 550c4447-7a8e-4206-8ad2-3cd9f3ef8947 }
[2018-01-26T06:32:44.808Z] [DEBUG] - already have this binding instance, returning 200
[2018-01-26T06:32:44.808Z] [DEBUG] - provision bind creds: map[DB_USER:admin DB_HOST:postgresql DB_NAME:admin DB_PASSWORD:test DB_PORT:5432 DB_TYPE:postgres]


Jesus,

Yes, I know, I found the ASB logs NOT match after enabled these switches(accepts_incomplete, launch_apb_on_bind). Hence, I opened this bug. Thanks anyway.

Comment 4 Michael Hrivnak 2018-01-26 14:16:14 UTC
Jian, thanks for the update! I've been testing the async behavior myself extensively, so I've gone through the same procedure you are of changing the broker config and re-deploying. I haven't seen the problem you described, but if you can create a reproducible issue, please let us know. We can leave this issue open for now and follow up next week. I'll set the NEEDSINFO back on you to follow up with reproducer steps if possible.

---

To comment 3, it sounds like a separate issue that would be in the catalog. If the catalog (or any client) is setting accepts_incomplete=true as a query parameter, you will see it in the broker log. Here is an example I just reproduced:

172.17.0.1 - - [26/Jan/2018:14:03:47 +0000] "PUT /ansible-service-broker/v2/service_instances/2dad1ad0-d378-4089-8e72-b61ef88cf8df/service_bindings/29e91fc8-13bc-447c-9a78-827506b63230?accepts_incomplete=true HTTP/1.1" 202 58

Comment 5 Jian Zhang 2018-01-29 07:25:35 UTC
Michael,

Thanks! For this bug, I will keep an eye on it. For comment 3, I agree that it may be a catalog issue, and opened a new bug for tracking this. Here: https://bugzilla.redhat.com/show_bug.cgi?id=1539542

Comment 6 Michael Hrivnak 2018-02-06 14:32:27 UTC
Ok. I'll close this for now then, but feel free to re-open if you are able to reproduce it.


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