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

Fix marketplace provisioning for asynchronous services #3086

Closed
1 of 6 tasks
forbushbl opened this issue Sep 28, 2018 · 1 comment
Closed
1 of 6 tasks

Fix marketplace provisioning for asynchronous services #3086

forbushbl opened this issue Sep 28, 2018 · 1 comment
Labels
community Community Raised Issue

Comments

@forbushbl
Copy link
Contributor

Frontend Deployment type

  • Cloud Foundry Application (cf push)
  • Kubernetes, using a helm chart
  • Docker, using docker compose
  • Docker, single container deploying all components
  • npm run start
  • Other (please specify below)

Expected behaviour

I expect to be able to provision services provided by any asynchronous broker (Example: AWS Service Broker) in the Stratos Marketplace

Actual behaviour

Provisioning fails. As I look at the OSBAPI spec, it seems like this might be because Stratos is not passing the correct parameter to the Cloud Controller. (See spec)

screen shot 2018-09-28 at 4 57 43 pm

Steps to reproduce the behavior

  1. Register any Open Service Broker API service which uses asynchronous operations (See spec) with Cloud Foundry
  2. Login to Stratos and attempt to provision that service
  3. Notice how provisioning fails with a message similar to the one in the screenshot above.

Log output covering before error and any error statements

   2018-09-28T17:33:14.80-0600 [APP/PROC/WEB/0] OUT WARN[Fri Sep 28 23:33:14 UTC 2018] Passthrough response: URL: https://api.[REDACTED]/v2/service_instances, Status Code: 400, Status: 400 Bad Request, Content Type: application/json;charset=utf-8, Length: 323
   2018-09-28T17:33:14.80-0600 [APP/PROC/WEB/0] OUT WARN[Fri Sep 28 23:33:14 UTC 2018] {
   2018-09-28T17:33:14.80-0600 [APP/PROC/WEB/0] OUT   "description": "This service plan requires client support for asynchronous service operations.",
   2018-09-28T17:33:14.80-0600 [APP/PROC/WEB/0] OUT   "error_code": "CF-AsyncRequired",
   2018-09-28T17:33:14.80-0600 [APP/PROC/WEB/0] OUT   "code": 10001,
   2018-09-28T17:33:14.80-0600 [APP/PROC/WEB/0] OUT   "http": {
   2018-09-28T17:33:14.80-0600 [APP/PROC/WEB/0] OUT     "uri": "https://[REDACTED]/v2/service_instances/b2c5919b-3f24-4443-b72e-be71c9d74217",
   2018-09-28T17:33:14.80-0600 [APP/PROC/WEB/0] OUT     "method": "PUT",
   2018-09-28T17:33:14.80-0600 [APP/PROC/WEB/0] OUT     "status": 422
   2018-09-28T17:33:14.80-0600 [APP/PROC/WEB/0] OUT   }
   2018-09-28T17:33:14.80-0600 [APP/PROC/WEB/0] OUT }
   2018-09-28T17:33:14.80-0600 [APP/PROC/WEB/0] OUT Request: [2018-09-28T23:33:14Z] Remote-IP:"10.254.16.68, 10.96.250.6" Method:"POST" Path:"/pp/v1/proxy/v2/service_instances" Status:200 Latency:1.425451536s Bytes-In:185 Bytes-Out:389
@forbushbl
Copy link
Contributor Author

FYI, I've confirmed that this error is due to the missing "accepts_incomplete=true" parameter on the request.

cf curl without accepts_incomplete=true fails

▶ cf curl /v2/service_instances -d '{"name":"my-async-svc","space_guid":"5a2029d2-61d1-4cbe-bec0-b7e870394c9c","service_plan_guid":"c93197f5-65be-4dfc-b2bf-c074421ea0e8"}'
{
   "description": "This service plan requires client support for asynchronous service operations.",
   "error_code": "CF-AsyncRequired",
   "code": 10001,
   "http": {
      "uri": "https://[REDACTED]/v2/service_instances/e133897a-dec8-437e-b703-ee6e41450e4f",
      "method": "PUT",
      "status": 422
   }
}

cf curl with accepts_incomplete=true succeeds!

~
▶ cf curl /v2/service_instances?accepts_incomplete=true -d '{"name":"my-async-svc","space_guid":"5a2029d2-61d1-4cbe-bec0-b7e870394c9c","service_plan_guid":"c93197f5-65be-4dfc-b2bf-c074421ea0e8"}'
{
   "metadata": {
      "guid": "0e14d1a3-63fc-4f6d-a68a-e71844057e56",
      "url": "/v2/service_instances/0e14d1a3-63fc-4f6d-a68a-e71844057e56",
      "created_at": "2018-10-01T16:13:25Z",
      "updated_at": "2018-10-01T16:13:25Z"
   },
   "entity": {
      "name": "my-async-svc",
      "credentials": {},
      "service_plan_guid": "c93197f5-65be-4dfc-b2bf-c074421ea0e8",
      "space_guid": "5a2029d2-61d1-4cbe-bec0-b7e870394c9c",
      "gateway_data": null,
      "dashboard_url": null,
      "type": "managed_service_instance",
      "last_operation": {
         "type": "create",
         "state": "in progress",
         "description": "",
         "updated_at": "2018-10-01T16:13:25Z",
         "created_at": "2018-10-01T16:13:25Z"
      },
      "tags": [],
      "service_guid": "66b6b0f8-35e8-48f1-9b51-e6cfd0334037",
      "space_url": "/v2/spaces/5a2029d2-61d1-4cbe-bec0-b7e870394c9c",
      "service_plan_url": "/v2/service_plans/c93197f5-65be-4dfc-b2bf-c074421ea0e8",
      "service_bindings_url": "/v2/service_instances/0e14d1a3-63fc-4f6d-a68a-e71844057e56/service_bindings",
      "service_keys_url": "/v2/service_instances/0e14d1a3-63fc-4f6d-a68a-e71844057e56/service_keys",
      "routes_url": "/v2/service_instances/0e14d1a3-63fc-4f6d-a68a-e71844057e56/routes",
      "service_url": "/v2/services/66b6b0f8-35e8-48f1-9b51-e6cfd0334037",
      "shared_from_url": "/v2/service_instances/0e14d1a3-63fc-4f6d-a68a-e71844057e56/shared_from",
      "shared_to_url": "/v2/service_instances/0e14d1a3-63fc-4f6d-a68a-e71844057e56/shared_to",
      "service_instance_parameters_url": "/v2/service_instances/0e14d1a3-63fc-4f6d-a68a-e71844057e56/parameters"
   }
}

@richard-cox richard-cox added the community Community Raised Issue label Oct 24, 2018
KlapTrap added a commit that referenced this issue Dec 21, 2018
* v2-master:
  Unit test fixes
  Added focus to first steps, ensure forms are common width
  Merge upstream changes properly
  wip
  General improvements - Fixed appFocus directive - Set focus of confirm dialog to cancel instead of confirm - Add/Edit App name - Add more space between async name taken check spinner and input field - Tidied up imports - Removed unused `AppEventDetailDialogComponentComponent`. Looks like a bad merge remnent - Fixed `newNonnAngularInterval` typo
  Add accepts_incomplete param via options.params
  Improves fix for #3086
  Fixes #3086
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community Raised Issue
Projects
None yet
Development

No branches or pull requests

2 participants