]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rbd-mirror: Improve data pool selection when creating images
authorAdam Wolfe Gordon <awg@digitalocean.com>
Tue, 26 Sep 2017 20:30:06 +0000 (20:30 +0000)
committerAdam Wolfe Gordon <awg@digitalocean.com>
Fri, 29 Sep 2017 15:14:03 +0000 (15:14 +0000)
commit2e239c05518e67b3db80500dbdd3fc5dde30e443
tree186bb9920a420fcc24d929434201fdfddbc48e1d
parentbf99f4d86b1dc758c5e44247c3b943cf9a614a9d
rbd-mirror: Improve data pool selection when creating images

Previously we used the source image's data pool name
unconditionally. There were two problems with that:

1. If a pool with the same name didn't exist locally, creation of the
   local image would fail.
2. If the local pool had a default data pool configured it would be
   ignored.

Change local image creation so it uses the default pool if configured,
and uses the remote pool name only if a pool with that name exists
locally. If neither of those is true, leave the data pool unset.

Signed-off-by: Adam Wolfe Gordon <awg@digitalocean.com>
src/tools/rbd_mirror/image_replayer/CreateImageRequest.cc