-
Notifications
You must be signed in to change notification settings - Fork 4
Description
The shared-redis broker issues connection details which use the IP address of the redis-broker VM.
VCAP_SERVICES: {
"p-redis": [
{
"binding_name": null,
"credentials": {
"host": "192.168.0.10",
"password": "some-long-uuid-style-password",
"port": 37715
},
"instance_name": "my-redis-service",
"label": "p-redis",
"name": "my-redis-service",
"plan": "shared-vm",
We've been doing daily backups our redis deployments for a long time. We recently performed a 'restore test' to validate that we'd been backing up everything correctly and discovered that we have an issue around redis service. During the test we did 'bosh delete-deployment cf-redis', then redeployed it and restored the data. When BOSH deployed the new VM it did not have the same IP address as the destroyed one. Therefore, even after restoring all of the data redis clients were unable to connect as their service_instances all referenced the old IP address from the deleted deployment.
A simple solution would be to use a DNS name instead of IP address when issuing the service credentials. Setting up a suitable DNS name in bosh-dns is trivial, but it appears that currently there isn't the ability to pass a manifest property for the hostname into the job.
In jobs/cf-redis-broker/templates/broker.yml.erb
we can see that the 'host' parameter is using spec.ip
redis:
service_name: <%= p('redis.broker.service_name') %>
service_id: <%= p('redis.broker.service_id') %>
shared_vm_plan_id: <%= p('redis.broker.shared_vm_plan_id') %>
host: <%= spec.ip %>
I'd like to request the ability to use a DNS name as an alternative to the current 'spec.ip' - This will make backup/restore operations simpler.