v2 Services API: A service instance for the selected plan cannot be created in this organization

844 views
Skip to first unread message

Hector Castro

unread,
Nov 11, 2013, 11:51:09 AM11/11/13
to vcap...@cloudfoundry.org
Hi,

Apologies in advance if this is an obvious issue for those more familiar with deploying Cloud Foundry.

I'm working on a v2 Service Broker for Riak [0] and have run into the following CF error when I attempt to create an instance of the service:

```
$ cf create-service
1: riak , via
2: user-provided , via
What kind?> 1

Name?> riak-5fce8

1: bitcask: A bucket using the Bitcask backend.
2: leveldb: A bucket using the LevelDB backend.
Which plan?> 1

Creating service riak-5fce8... FAILED
CFoundry::APIError: 60010: A service instance for the selected plan cannot be created in this organization. The plan is visible because another organization you belong to has access to it.
```

It may be important to note that I'm not seeing a PUT request against the service broker before or after this error message. This leads me to believe that something is missing from my catalog or I need to open up access to this service from my organization somehow.

I've been working against the specifications in the v2 Service API Google Doc [1] and on the docs.cloudfoundry.com site [2].

--
Hector

jde...@gopivotal.com

unread,
Nov 11, 2013, 12:08:37 PM11/11/13
to vcap...@cloudfoundry.org
I ran into the same thing and was advised as follows:

v2 service plans are created private by default. You need to make the plan public, or make it available to your org.
flip the bit in ccdb table service_plans or use cf curl:
cf curl POST /v2/service_plans/:guid -b '{"public":"true"}'
With the go cli, we don't make plans visible unless you can create them.

--Jens

Hector Castro

unread,
Nov 11, 2013, 1:49:46 PM11/11/13
to vcap...@cloudfoundry.org, jde...@gopivotal.com
Just in case anyone else hits this issue, I was able to make the service plan public with `cf curl` using the following command:

$ cf curl PUT /v2/service_plans/:guid -b '{"public":true}'

Subtle notes:

- HTTP verb is PUT instead of POST
- Value for `public` is true instead of the string "true"

Thanks, Jens.

--
Hector

James Bayer

unread,
Nov 11, 2013, 2:02:04 PM11/11/13
to vcap...@cloudfoundry.org, Jens Deppe
thanks for confirming what worked for you hector. we should get some instructions into the docs.



which will migrate to the docs when the Service Broker API v2  is completely finalized.

To unsubscribe from this group and stop receiving emails from it, send an email to vcap-dev+u...@cloudfoundry.org.



--
Thank you,

James Bayer

Dr Nic Williams

unread,
Nov 11, 2013, 2:09:32 PM11/11/13
to vcap...@cloudfoundry.org, jde...@gopivotal.com
Thanks Hector for following up. Definitely going to help someone (read: me) one day soon.

Nic

Shannon Coen

unread,
Nov 11, 2013, 9:10:34 PM11/11/13
to vcap...@cloudfoundry.org, jde...@gopivotal.com
I've been meaning to add a doc page for management of service ACLs. I'll prioritize that story. 

This will get easier when we get to the CLI stories for managing ACLs; you won't have to run curls to manage public/private and service_plan_visibilities. The pain I feel managing these controls every day with curl is a good forcing function. 

azwi...@gopivotal.com

unread,
Nov 15, 2013, 6:24:27 PM11/15/13
to vcap...@cloudfoundry.org, jde...@gopivotal.com
When I attempt this work around I get an auth token error.  I'm not sure if this is complaining about auth to the service broker or the auth to CF.  Any guidance?

cf curl PUT /v2/service_plans/:3101b971-1044-4816-a7ac-9ded2e028079 -b '{"public":true}'

{

  "code": 1000,

  "description": "Invalid Auth Token",

  "error_code": "CF-InvalidAuthToken",

  "types": [

    "InvalidAuthToken",

    "Error"

  ],

Shannon Coen

unread,
Nov 15, 2013, 7:29:45 PM11/15/13
to vcap...@cloudfoundry.org, Jens Deppe
This just means you need to log in again. IIRC, cf curl doesn't use a refresh token so if your access token has expired you need to log in to get another. Basically, when using cf curl you have to log in every 10m or so. When using other cf commands, you wouldn't have this problem.

Shannon Coen
Product Manager, Cloud Foundry
Pivotal, Inc.
mobile: 415.640.0272
skype: shannoncoen

Shannon Coen

unread,
Nov 22, 2013, 2:43:17 PM11/22/13
to vcap...@cloudfoundry.org, Jens Deppe
Hello,

I've just added a bit of documentation for how to add your broker to cloud controller and make plans public. We've got a CLI command coming for controlling publicity, and better docs for catalog lifecycle management. In the meantime, hope this helps.


Best,
Shannon 

Dr Nic Williams

unread,
Nov 25, 2013, 10:23:58 AM11/25/13
to vcap...@cloudfoundry.org, Jens Deppe
Thanks Shannon!

张婕

unread,
May 27, 2014, 9:54:11 PM5/27/14
to vcap...@cloudfoundry.org, jde...@gopivotal.com
/v2/service_plans/:guid,how can I get the guid?

在 2013年11月16日星期六UTC+8上午7时24分27秒,Adam Zwickey写道:

Wiz

unread,
May 27, 2014, 11:02:49 PM5/27/14
to vcap...@cloudfoundry.org
😄 I looked at it in ccdb

--------------------------------------------
May the Force be with you!
陈星宇 Wiz
--
You received this message because you are subscribed to the Google Groups "Cloud Foundry Developers" group.
To view this discussion on the web visit https://groups.google.com/a/cloudfoundry.org/d/msgid/vcap-dev/7d01fc94-678a-401b-9be0-26c8e5295286%40cloudfoundry.org.

Shannon Coen

unread,
May 28, 2014, 10:39:41 AM5/28/14
to vcap...@cloudfoundry.org, jde...@gopivotal.com
'cf curl /v2/service_plans' will give you all plans and their guids. 
--
You received this message because you are subscribed to a topic in the Google Groups "Cloud Foundry Developers" group.
Reply all
Reply to author
Forward
0 new messages