Purpose
Starting with PCF v1.8, a quota has been put in place for service key creation, which is set by default at zero; this is intended to prevent accidental creation of service instance resources. For example, when attempting to create a circuit breaker service instance in Spring Cloud Services (SCS), a failure may occur when the value for "service keys" is set to zero. This KB describes how to set the value of service keys to -1 (unlimited), which should enable the service instance to be created.
Symptoms
The most common and general symptom is an error such as this:
Server error, status code: 400, error code: 360002, message: The service key is invalid: quota service_keys_quota_exceeded
The following error may also be seen in the smoke test logs:
Last Operation Status: create failed Message: Error creating service instance: org.springframework.web.client.HttpClientErrorException: 400 Bad Request Started: 2018-03-25T00:18:36Z Updated: 2018-03-25T00:18:38Z cf service test-p-circuit-breaker-dashboard-1521937116
Procedure
1. Verified that "total_service_keys": 0
CF_TRACE=true cf quota
for example...
CF_TRACE=true cf quota p-spring-cloud-services
....
},
"entity": {
"name": "p-spring-cloud-services",
"non_basic_services_allowed": true,
"total_services": -1,
"total_routes": 1000,
"total_private_domains": 0,
"memory_limit": 153600,
"trial_db_allowed": false,
"instance_memory_limit": -1,
"app_instance_limit": -1,
"app_task_limit": -1,
"total_service_keys": 0,
"total_reserved_route_ports": 0
}
.....
2. Update the service keys
cf curl -X PUT /v2/quota_definitions/<guid from URL in step 1, above> -d '{"total_service_keys": -1}'