-
Notifications
You must be signed in to change notification settings - Fork 368
Description
Issue
After an instance creation/update/deletion the cloud controller polls for the last operation. If the polling request fails for connection issues the creation/update/deletion fails, even if everything is fine on service broker side. It seems that this behavior changed between v2 and v3.
Context
When I look at the source code it seems that the v2 last operation polling handles http request errors:
| rescue HttpRequestError, HttpResponseError, Sequel::Error => e |
while the v3 last operation polling sets the instance to failed on every error that occurs:
cloud_controller_ng/app/actions/v3/service_instance_create_managed.rb
Lines 94 to 97 in 4a23a41
| rescue => e | |
| save_failed_state(instance, e) | |
| raise e | |
| end |
At least in my understanding this is a regression and the cloud controller should continue polling at least for status code 502, 503, and tcp connection errors (or just for all http errors).
Steps to Reproduce
- Create and register a service broker
- Create a service instance
- Let the service broker fail one of the last operation requests on tcp/http layer (while all other requests are fine)
Expected result
I would expect that the instance state stays "in progress"
Current result
The instance state switches to failed
Possible Fix
Catch and handle http request errors during last operation polling and just continue the polling