Skip to content

Polling on last operation fails in v3 on http request errors #2354

@steinri

Description

@steinri

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:

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

  1. Create and register a service broker
  2. Create a service instance
  3. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions