libvirt: Fix spurious backing file existence check.

Bug 1195877

The problem lies with the truncation of backing file names at the
first underscore character. On a reboot, nova-compute checks the
backing images exist. Typically, they will do; however, instead
of looking for an "ephemeral_XXX" file, it hunts for "ephemeral".
This won't exist, triggering code that attempts to pull the whole
image again from glance(!)

Lacking credentials, the attempt to fetch the image will fail,
ultimately resulting in the instance going to an ERROR state.

Change-Id: Iabcc7a1ffd248c22a747a1ddc7863d2b386d409a
(cherry picked from commit 65386c91910ee03d947c2b8bcc226a53c30e060a)
Check instance on dest once during block migration

During live block migrations both pre_live_migration and
pre_block_migration check for the presence of the instance on
the destination and create the instance dir if it doesn't exist.

As a result the call to pre_block_migration always fails as
pre_live_migration has already created the instance dir on the
destination.

As it turns out the pre_block_migration call is completely
unnecessary. The libvirt driver is the only driver that uses the
call and the work it does can easily be done in the existing
pre_live_migration call. In order to streamline things we
completely remove the pre_block_migration call from all
drivers. Additionally we update the function definition for
pre_live_migration to pass needed disk info down to the
virt drivers.

Fixes bug: #1193359

(cherry picked from commit 659ec75eaf052742a6269e0aae258f1c874749f7)

Conflicts:
	nova/compute/manager.py
	nova/tests/test_libvirt.py
	nova/virt/libvirt/driver.py
	nova/virt/xenapi/driver.py

Change-Id: Id9dfe482db3471d6a1b9b6c7d59a5ddc48775d7f

Conflicts:
	nova/tests/test_libvirt.py
Performs hard reboot if libvirt soft reboot raises libvirtError

Currently the libvirt driver will only attempt a hard reboot if a soft
reboot fails and returns False. If a libvirt exception is raised,
however, the hard reboot is not attempted. This patch wraps the soft
reboot in a try block to continue with the hard reboot attempt if a
libvirtError is raised.

Fixes bug 1202974

(cherry picked from commit 9925c9f1b353240ebb1eccde50574055ce271313)

Conflicts:
	nova/tests/test_libvirt.py

Change-Id: Ifaff75b33b5123cdd3293e8f263ccb4f72ae726a
Assert backing_file should exist before attempting to create it

Fixes bug 1200249

Change-Id: If7878361711f835247aaf64ce26f0058f8c4b5ba
(cherry picked from commit 879565efe51f19bd6f4d69d1b430b995f62106c8)
Exclude probelmatic boto versions

Change-Id: Ia3bd9a0b29975368d5d5faf779af8fc3dd790c38
Closes-Bug: #1237944
Add boto special casing for param changes in 2.13

boto 2.13 has some interface changes with the get_http_connection
call which adds port as a non optional parameter *in the middle of*
existing non optional parameters. It's a special kind of incompatible
change.

We are already special casing around boto in the unit tests, lets
just do more of that if we are running on a newer version.

(cherry picked from commit 1ce493b9e4e0c381146287161ab2a3c75f1fc603)

Change-Id: I62f5d4ef5cfa5577015a521a5d161086546a4125
Co-Authored-By: Sean Dague <sdague@linux.vnet.ibm.com>
Co-Authored-By: Dan Smith <dansmith@redhat.com>
Further harden boto version checking in EC2 tests

Use pkg_resources to determine correct boto interface
to use in API tests.  stable/grizzly version.

Fixes Bug #1239220

Change-Id: I455ce5f2aabfad7178be361844c6b9b7b0d9c946
Create epemeral disk if not exists for block migration

Change-Id: Ib7a994eb8dfaa775f0d34e7684d6c729c2985c11