Set <host> in cinder.conf to rbd:<pool> for RBD backend

Cinder volume can only be managed by a cinder-volume process that has <host>
configuration variable value matching <os-vol-host-attr:host> attribute of the
volume.

By default, host of a cinder-volume service is set to its hostname, which means
that if one controller is lost, none of its volumes can be managed by
cinder-volume processes on other controllers. This makes sense for Cinder LVM,
but not for RBD or other shared backends.

This commit sets <host> to the same value on all controllers when RBD backend
is enabled, so that any controller can manage RBD backed volumes created by any
other controller.

Change-Id: I47161796dbb817eab026402760799bee24371863
Partial-Bug: #1371328
This commit is contained in:
Dmitry Borodaenko 2014-09-19 18:33:08 -07:00
parent ac4e608e25
commit 17989b1632

View File

@ -71,6 +71,7 @@ define cinder::backend::rbd (
"${name}/rbd_pool": value => $rbd_pool;
"${name}/rbd_max_clone_depth": value => $rbd_max_clone_depth;
"${name}/rbd_flatten_volume_from_snapshot": value => $rbd_flatten_volume_from_snapshot;
"${name}/host": value => "rbd:${rbd_pool}";
}
if $rbd_secret_uuid {