Pivotal Cloud Foundry® (PCF) Redis All Versions
A shared Redis instance that was de-provisioned is still accessible. When running a 'ps aux | grep redis-serve[r]' on the 'cf-redis-broker' virtual machine (VM), it would list an additional Redis instance that failed to de-provision despite performing the method successfully. When the user ran 'cf delete-service servicename'. 'cf services', it does not report the service instance. This issue is not common.
The problem occurs when the process that performs the de-provision (DP) races with the Redis process watcher (RPW). RPW performs a periodic check to ensure Redis instances are healthy and resurrects them if it finds them down.
When a de-provision is requested, DP places a lock in the instance’s data directory to notify RPW that the instance is about to be deleted. It is possible that the DP starts immediately after the RPW starts. In the rare occasion that the RPW takes a while, it might end up picking up some of the effects of the de-provision. It will thus declare the instance unhealthy and resurrect it, canceling out the de-provision.
- SSH onto the OpsManager VM
- 'bosh ssh' onto the cf-redis-broker VM
- Change to root by running 'sudo su'
- Run 'monit stop all'
- Change to the pidfile directory 'cd /var/vcap/sys/run/shared-instance-pidfiles' and delete any pidfiles located inside (may be empty)
- Change to the broker directory 'cd /var/vcap/store/cf-redis-broker/redis-data' and delete the directory that matches the GUID of the Redis instance that should have been de-provisioned. See below if unsure what the GUID is.
- Run 'monit start all'
Obtaining the Globally Unique Identifier (GUID):
If you are not sure what the GUID of the instance being de-provisioned is, you will have to get a list of all the GUIDs related to your Redis service instances. Running 'cf services' will give you a list of all the services. For each 'shared-vm redis' service, run 'cf the-service-name --guid' to obtain the GUID of the instance. Compare the list of GUIDs to those on the disks to see the GUID that does not have a matching service instance.