Deleting on-demand service tile fails with error "Can not remove brokers that have associated service instances"
search cancel

Deleting on-demand service tile fails with error "Can not remove brokers that have associated service instances"

book

Article ID: 376613

calendar_today

Updated On:

Products

Operations Manager

Issue/Introduction

When attempting to delete some on-demand service tile through Ops Manager web UI, "Apply Changes" might fail at deleting service broker as shown in below example.

Task 3830368 | 21:38:42 | Running errand: delete-errand/98569b88-####-####-####-a5cbf20d1b94 (0) (00:00:02)
Task 3830368 | 21:38:44 | Fetching logs for delete-errand/98569b88-####-####-####-a5cbf20d1b94 (0): Finding and packing log files (00:00:01)
Task 3830368 Started  Thu Sep  5 21:36:55 UTC 2024
Task 3830368 Finished Thu Sep  5 21:38:45 UTC 2024
Task 3830368 Duration 00:01:50
Task 3830368 done
Errand 'delete-errand' completed with error (exit code 1)
Exit code 1
Instance   delete-errand/98569b88-####-####-####-a5cbf20d1b94  
Exit Code  1  
Stdout     Setting api endpoint to https://api.example.com...  
          OK  
            
          api endpoint:   https://api.example.com
          api version:    2.239.0  
          Not logged in. Use 'cf login' to log in.  
          API endpoint: https://api.example.com  
          Authenticating...  
          OK  
            
          Use 'cf target' to view or set your target org and space.  
          api endpoint:   https://api.example.com  
          api version:    2.239.0  
          user:           system_services  
          org:            system  
          space:          iaas-brokers  
          Deleting service broker aws-services-broker as system_services...  
          FAILED  
          Server error, status code: 400, error code: 270010, message: Can not remove brokers that have associated service instances: aws-services-broker  

Cause

The issue is because there are existing service instances still associated with the service broker to be removed. 

Resolution

In order to delete the service broker, you need to find out all existing service instances still associating with the broker. In most cases you can utilise the script mentioned in this KB article to locate the service instances. 

Once you identifies the service instances, delete them either with cf delete-service CLI or through Apps Manager web UI. Then try to remove the on-demand service tile from Ops Manager installation dashboard.

If the aforementioned approach doesn't work, reach out to Tanzu support for further assistance.