remove redundant copy of test_cache_base_dir_exists

Second copy of RbdTestCase.test_cache_base_dir_exists was accidentally
introduced in https://review.openstack.org/82840.

Change-Id: I16b2e472b2499f01379fdca9c860da0b95e291d8
Closes-bug: #1302211
Fix incorrect root partition size and compatible volume name

When using rbd backend, it needs to resize volume size if size presents. Else
we will get wrong image size.

Rbd volume always uses uuid as the main pattern of volume name, now change to
it is necessary.

Fix bug 1219658

Change-Id: I3dc8d639b066eac35d190b8d4687c41c9f4d5824
(cherry picked from commit 1b66a47b5f4cbcdf1a9a1ec38532474588a3fee2)
make rbd usable for ephemeral storage

Currently when using rbd as an image backend, nova downloads the
glance image to local disk and then copies it again into rbd.  This
can be very slow for large images, and wastes bandwidth as well as
disk space.

When the glance image is stored in the same ceph cluster, the data is
being pulled out and pushed back in unnecessarily. Instead, create a
copy-on-write clone of the image. This is a fast, and does not depend
on the size of the image. Instead of taking minutes, booting takes
seconds, and is not limited by the disk copy.

Add a direct_fetch() method to the image backend, so backends
like rbd can make optimizations like this. Try to use direct_fetch()
for the root disk when it comes from an image, but fall back to
fetch_to_raw() if direct_fetch() fails.

The majority of this code was taken from the cinder rbd driver.
The only new parts are the direct_fetch() method for the image
backend, and the small backwards-compatible interfaces changes
needed to make use of it.

fixes bug 1226351

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>

Change-Id: Ic9b9fbcb6e133cc9315581354f1b70ed7c9909ad
Make rbd.libvirt_info parent class compatible

Rbd.libvirt_info function definition misses hypervisor_version argument added in change:
https://review.openstack.org/32379

Closes-Bug: #1233188
Change-Id: Ib68d743e783af0f6d82d2ba180869ee642e86050
(cherry picked from commit 7a34be0ec0cd0cb9555fe64ff6c486faae1ae91d)
imagebackend: make verify_base_size() behave for rbd

verify_base_size() calls disk.get_disk_size(), which assumes the disk
is stored locally.

Instead of calling disk.get_disk_size() directly from
verify_base_size(), add a new method that is overridden by the Rbd
subclass to get the disk size.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Add max_size to direct_fetch
Improve shared storage checks for live migration

Distinguish cases that require shared instance drive and shared libvirt
instance directory. Reflect the fact that RBD backed instances have
shared instance drive (and no shared libvirt instance directory) in the
relevant conditionals.
Fix dictionary update and key issues, update tests
pass rbd_user id as part of RBD URI for qemu-img

Unlike rados.py, qemu-img does not use id from CEPH_ARGS and has to be
given a Cephx user id explicitly in RBD URI.
Merge pull request #1 from angdraug/rbd-live-migration-stable-havana-fedorapeople

RBD live migration rebase over fedorapeople patches