[recreate-all-service-instances] 2023/04/27 02:12:55.295274 operation type: recreate failed for service instance 2edf2a70-9ba7-481d-bf14-3edd4378c632: unexpected status code: 500. description: Could not recreate deployment service-instance_2edf2a70-9ba7-481d-bf14-3edd4378c632: Changing state: Director responded with non-successful status code '404' response '{"code":70000,"description":"Deployment 'service-instance_2edf2a70-9ba7-481d-bf14-3edd4378c632' doesn't exist"}'
In order to delete or purge the service instance, you need to know which org/space it exists.
Bosh SSH into the TAS MySQL VM
bosh -d cf-xxxx ssh mysql/0
Connect to DB
sudo mysql --defaults-file=/var/vcap/jobs/pxc-mysql/config/mylogin.cnf
Use the same service instance GUID (2edf2a70-9ba7-481d-bf14-3edd4378c632) from the error message to query the DB
mysql> select name,space_id from ccdb.service_instances where guid = '2edf2a70-9ba7-481d-bf14-3edd4378c632'; +------------------------+----------+ | name | space_id | +------------------------+----------+ | scheduler-broker-mysql | 17 | +------------------------+----------+ 1 row in set (0.00 sec)
Use the space_id value to get the Org
mysql> select name, organization_id from ccdb.spaces where id = 17; +-----------+-----------------+ | name | organization_id | +-----------+-----------------+ | scheduler | 1 | +-----------+-----------------+ 1 row in set (0.00 sec)
mysql> select name from ccdb.organizations where id = 1; +--------+ | name | +--------+ | system | +--------+ 1 row in set (0.00 sec)
Once you know the org/space you can target the org/space.
cf target -o system -s scheduler
Then use 'cf delete-service' or 'cf purge-service-instance' to remove the service instance.