Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Throw different error when route binding status is delete_failed or delete_in_progess / Treat route binding in status create_failed as non-existent #3469

Conversation

kathap
Copy link
Contributor

@kathap kathap commented Oct 10, 2023

This is a fix as part of #2637. It contains changes for:
POST /v3/service_route_bindings

Two behaviours change with this PR:
1: When a service route binding is in state delete_in_progess or delete_failed, we want an error different from "Route is already bound to the service instance" to be thrown. It will now throw an error with "The binding is getting deleted or its deletion failed". 2: When a service route binding is in state create_failed, it should recreate the binding and not reject the request with "Route is already bound to the service instance".

With regard to point 1: it's important to note that the initial statement may not be entirely accurate, as there's a possibility that orphan mitigation processes may have already removed the binding in question. The Cloud Foundry Command Line Interface (CF CLI) correctly interprets the situation as a success. This is because the message conveyed to the CF CLI indicates that the task it was instructed to perform as already been completed. As a result, if the CF CLI is attempting to create a service route binding but finds that a binding already exists in a state where it's either failed deletion or is pending deletion, the CF CLI will consider this a failure.

…or delete_in_progess

This is a fix as part of cloudfoundry#2637. It contains changes for:
POST /v3/service_route_bindings

Two behaviours change with this PR:
1: When a service route binding is in state delete_in_progess or delete_failed, we want an
error different from "Route is already bound to the service instance" to be thrown. It will now throw an error with "The binding is getting deleted or its deletion failed".
2: When a service route binding is in state create_failed, it should recreate the binding and not reject the request with "Route is already bound to the service instance".

With regard to point 1: it's important to note that the initial statement may not be entirely accurate,
as there's a possibility that orphan mitigation processes may have already removed the binding in question.
The Cloud Foundry Command Line Interface (CF CLI) correctly interprets the situation as a success.
This is because the message conveyed to the CF CLI indicates that the task it was instructed to perform
as already been completed. As a result, if the CF CLI is attempting to create a service route binding but
finds that a binding already exists in a state where it's either failed deletion or is pending deletion,
the CF CLI will consider this a failure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants