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

[sapi] 1.93.0 regression. Unable to update meta-data to a service instance being async provisionned #1848

Closed
gberche-orange opened this issue Sep 11, 2020 · 10 comments
Labels

Comments

@gberche-orange
Copy link
Contributor

Issue

As a cf user

  • in order to attach metadata to a service instance that takes hours to create
  • I need the PATCH /v3/service_instances/guid endpoint to accept update to metadata although the service instance is still in progress

This behavior regressed with capi 1.93.0

Context

This scenario also affects tooling that provision service instances and need to attach metadata to them (this issue was detected through orange-cloudfoundry/osb-cmdb#65 )

Steps to Reproduce

cf cs service async-plan myservice
guid=$(cf s myservice --guid)
CF_TRACE=true cf curl -X PATH /v3/service_instances/${guid} -d '{
    "metadata": {
      "annotations": {
        "note": "detailed information"
      },
      "labels": {
        "key": "value"
      }
    }
  }'

Expected result

HTTP/1.1 200 OK

Current result

starting with 1.93.0 (and likely related support for async brokers at https://www.pivotaltracker.com/n/projects/2105761/stories/171649250 ) this fails with

CF-AsyncServiceInstanceOperationInProgress(60016): An operation for service instance f0a8f886-76a2-49d8-80eb-5f7230e5f8fe is in progress.

Possible Fix

Allow metadata-only update to a service instance (or service binding) despite the status "in progress"

@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/174775179

The labels on this github issue will be updated when the story is started.

@FelisiaM
Copy link
Member

Hi @gberche-orange

This is raised previously here #1781
Does the proposed solution there help your usecase?

Felisia

@gberche-orange
Copy link
Contributor Author

thanks @FelisiaM for your prompt response! Yes, embedding the metadata in the V3 service instance creation will address my use case. Sorry for creating this issue on wrong repo, and missing the existing issue on cc_ng.

@gberche-orange
Copy link
Contributor Author

@FelisiaM what would be the CF CLI UX / workflow to attach metadata to a service instance being provisionned ?

I understand the CF7 create-service-instance does not support specifying metadata as arguments, and that rather a distinct cf7 set-label CLI command is required instead.

As a result, users won't be able to attach metadata to long async service instances until their provisionning completion.

@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/174776441

The labels on this github issue will be updated when the story is started.

@gberche-orange
Copy link
Contributor Author

gberche-orange commented Sep 11, 2020

@FelisiaM

In response to #1781 (comment)

We think that it might be risky to allow several operations to occur on the same SI while we are not sure that it has completed creation.

Have you considered allowing only updates of metadata while there is an operation in progress ?

What risks would there be of allowing metadata updates while an operation is in progress ?

Potential benefits of this approach:

The previously suggested usage of PUT V3/service_instances/guid with service-instance and metadata is hard to apply by the community because:

  • this endpoint is still marked as experimental
  • feedback from usage of this endpoint by CF7 has not yet been gathered
  • client SDKs are not ready, and require significant effort and time to deal with V3 style (e.g. job redirects)

@kirederik kirederik transferred this issue from cloudfoundry/capi-release Sep 15, 2020
@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/174825693

The labels on this github issue will be updated when the story is started.

@kirederik
Copy link

Thanks @gberche-orange!

This issue is now fixed and will be included in the next capi-release. We'll close the issue once it's released

@gberche-orange
Copy link
Contributor Author

gberche-orange commented Sep 18, 2020

Thanks a lot @kirederik for the prompt fix, I'll watch the capi release repo to test it.

@kirederik
Copy link

CAPI 1.99.0 is released and should contain the fix for this!

I'll close it for now but please reopen it if you find any other issues!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants