Apply changes failed on running errand smoke tests for scheduler PCF with error: "Invalid service plan. Ensure that the service plan exists, is available, and you have access to it."
search cancel

Apply changes failed on running errand smoke tests for scheduler PCF with error: "Invalid service plan. Ensure that the service plan exists, is available, and you have access to it."

book

Article ID: 406597

calendar_today

Updated On:

Products

VMware Tanzu Platform - Cloud Foundry VMware Tanzu Application Service

Issue/Introduction

You Apply Changes via Opsmanager UI and it fails running errand smoke tests for 'scheduler-for-pcf' with error: "Invalid service plan. Ensure that the service plan exists, is available, and you have access to it."  Find example below:

Creating service instance scheduler in org scheduler-smoke-test-123abc45 / space run-job as admin...  
           Invalid service plan. Ensure that the service plan exists, is available, and you have access to it.  
           FAILED  
           'cf create-service scheduler-for-pcf standard scheduler' (attempt 2 of 3)  
           Creating service instance scheduler in org scheduler-smoke-test-123abc45 / space run-job as admin...  
           Invalid service plan. Ensure that the service plan exists, is available, and you have access to it.  
           FAILED  
           'cf create-service scheduler-for-pcf standard scheduler' (attempt 3 of 3)  
           Creating service instance scheduler in org scheduler-smoke-test-123abc45 / space run-job as admin...  
           Invalid service plan. Ensure that the service plan exists, is available, and you have access to it.  
           FAILED  

Cause

Scheduler service access is "limited" to predefined list of orgs. Smoke test creates random orgs names, since test orgs are random and dynamic it fails due to services defined/resticted access.

To confirm you are hitting this issue, the user can check the "access" of the service in question with the 'cf service-access' command, as illustrated below:

\Users\abc12345>cf service-access -e scheduler-for-pcf
Getting service access for service offering scheduler-for-pcf as abc12345...

broker: scheduler-for-pcf
offering: scheduler-for-pcf
plan: standard
access: limited
orgs: system,p-spring-cloud-services, APP12345, APP56789, p-dataflow

* Take notice that the plans 'access' is 'limited', which means the 'scheduler-for-pcf' service plan is available only to users within the 'orgs' listed.

Resolution

Enable access to 'scheduler-for-pcf ' Service Plan. Admins can use the 'cf enable-service-access' command to give users access to service plans. The command grants access at the org level or across all orgs. See example command below:

cf enable-service-access -e scheduler-for-pcf

https://techdocs.broadcom.com/us/en/vmware-tanzu/platform-services/tile-developer-guide/3-0/tile-dev-tanzu/access-control.html#:~:text=Enabling%20access%20to%20Service%20Plans