Cannot create a space on the default organization as admin user on new CF
When you target a new CF, which has no organizations nor spaces, the CLI currently prompts you (helpfully) to create a space. It fails to create a space on the default organization.
That's a good point. However you would have to be an admin user to even be able to create a new org. Maybe we should instead show a helpful message to the user on how to proceed?
Reproduction of scenario on a fresh CF using admin credentials:
$ cf target api.drniccloud.com
Setting target to http://api.drniccloud.com... OK
target: http://api.drniccloud.com
$ cf login
target: http://api.drniccloud.com
Email> admin
Password> ****************
Authenticating... FAILED
Password> ********
Authenticating... OK
There are no spaces. You may want to create one with create-space.
$ cf create-space
Name> foobar
Creating space foobar... OK
Adding you as a manager... FAILED
CFoundry::InvalidRelation: 1002: Invalid relation: 0f11652d-2447-4b21-8b27-e0528406c5a0
For more information, see ~/.cf/crash
$ cf orgs
Getting organizations... OK
name spaces domains
drniccloud foobar none
$ cf org
drniccloud:
domains: none
spaces: foobar
So it looks like I do have an org, and it is selected, but I get the error above when creating a space.
Updated ticket title/description
I have the same error message and it is really confusing because the spaces is actually created
@drnic - We have had similar experiences and we are pinging the @tlang to see what the current thinking about a fix is.
@aramprice / @jfoley