Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1649076

Summary: RFE: add rate limiter to the broker's API handler
Product: OpenShift Container Platform Reporter: Jesus M. Rodriguez <jesusr>
Component: Service BrokerAssignee: Jesus M. Rodriguez <jesusr>
Status: CLOSED WONTFIX QA Contact: Zhang Cheng <chezhang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.1.0CC: aos-bugs, jmatthew, rszumski
Target Milestone: ---   
Target Release: 4.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-17 21:23:18 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 Jesus M. Rodriguez 2018-11-12 21:18:55 UTC
## Feature:
There are times that APIs are getting called for what seems like forever. For example, a provision fails which will cause the service catalog to issue a deprovision. If the deprovision fails, this cycle can continue forever. Normally the broker is configured to save failed APB pods so that they may be debugged later. At the moment we save ALL APB pods which can create a lot of unwanted namespaces. 

There are 2 parts to this feature:

1) look into only saving the latest failed APB pod. For example, if a deprovision call fails, and a subsequent one fails with the same parameters, then we should delete the older pod and keep the newer one

2) rate limit the API, such that after a certain period of time we don't spawn new pods at all for the API and just return that it failed always. Basically becoming a no-op.

Comment 1 Jesus M. Rodriguez 2018-11-12 21:20:12 UTC
Upstream issue: https://github.com/openshift/ansible-service-broker/issues/1098

There are several bugs around multiple namespaces created during failed provisions, etc. There are also other times where we will get an API hit a ton and have no way to limit its effect on the broker.

Comment 2 Jesus M. Rodriguez 2018-11-12 21:22:02 UTC
Related upstream issues that I believe a rate limiter type solution will fix:

https://github.com/openshift/ansible-service-broker/issues/1010
https://github.com/openshift/ansible-service-broker/issues/614

Comment 3 Jesus M. Rodriguez 2018-11-16 14:36:30 UTC
Proposal https://github.com/openshift/ansible-service-broker/pull/1130

Comment 4 Jesus M. Rodriguez 2019-02-06 19:42:41 UTC
Moving this to 4.1 as there is no time for this in 4.0.

Comment 5 Jesus M. Rodriguez 2019-02-12 16:48:25 UTC
Moving this to 4.2

Comment 6 Shawn Hurley 2019-03-25 13:28:36 UTC
*** Bug 1627473 has been marked as a duplicate of this bug. ***

Comment 7 Rob Szumski 2019-06-17 21:23:18 UTC
Thank for you for the detailed proposal. Due to reduced investment in Service Brokers/Ansible Service Broker, this feature request will not move forward at this time.