Catch volume create exception

Catch InvalidInput exception from cinder when the parameters
are invalid such as an invalid size. Currently the exception
is not caught which results in a 400 Bad Request correctly being
returned, but also leaving a traceback in the logs. Correctly
catching the exception and explicitly raising an HTTPBadRequest
removes the production of the traceback

Fixes bug #1098048

Change-Id: Ia66e67f302cf20e96417f4ff3c1430b755a4a861
Make sure that hypervisor nodename is set correctly in FakeDriver

This resolves an issue where the wrong host name is used when
executing some sample_api tests individually.

Resolves bug 1177802.

Change-Id: I29af026e29ff8c70bb6b4c81f1bdf28cdea11140
Raise InstanceInvalidState for double hard reboot

A hard reboot is not allowed if the instance task_state is
REBOOTING_HARD so check for that state and raise InstanceInvalidState.
This returns the correct status of 409 to the caller.

Previously the hard reboot would fail the the expected_task_state check
on db.instance_update_and_get_original which would log a traceback and
return a 500 to the caller.

Bug 1157237

Change-Id: Ifb6111790352da5c404289b218c50d8104384301
Pass None to image if booted from volume in live migration

The destination check in live migration will fetch the image
information from glance and it will throw ImageNotFound if
the instance is booted from volume since there is no image id
on the instance

Fix bug 1170596

Change-Id: Ie683a3ca5d6430c52ead77b41f98fbcb4114ea1e
Improve message and logging for corrupt VHD footers

 * Handles the output of vhd-util check a bit more intelligently.
 * Changes it to use LOG like in other modules
 * Adds a necessary import (errno)

Change-Id: I75d6b9e081159bc29732a721deb7a557e5f2ee06
Adds useful debug logging to filter_scheduler

On a large system (>500 hosts) the amount of logging
information if everything is at DEBUG is vasts, due to
the number of hosts checked for each filter

However at the moment some useful information is only
available within the filter's debug entrys (such as
parts of the request_spec).   Also instance uuids are
not logged making it hard to search for instance entries.

This set of changes allows it to be used in a very
large install with debug turned off for everything
except nova.filters

Specifically:
 - Log.Info the instance_uuids at the start of schedule
 - Log.debug the request_spec at the start of schedule
 - Log.debug hosts in weighted order
 - Log.info which host has been allocated to a specific
   instance_uuid
 - Log.debug how many hosts are returned by each filter

To get a count from each filter nova.filters had to be
changed to generate a list after each filter rather than
building a recursive generator object.   Although this
new approach is less elegant it does provide simple and
useful insight into the behaviour of the filters, and s
the impact on execution time on a system with several
hundred hosts and 10 filters was negligible

Change-Id: Ibbdd14f87b1dfd3cee8bf3cf6388e40b474e530a
Fix run_tests.sh usage of tools/colorizer.py.

* run_tests.sh: tools/colorizer.py expects subunit v1 and not v2.
Convert the subunit stream to v1 if subunit-2to1 is present (this
indicates v2 of subunit is being used) before passing the output on to
tools/colorizer.py.

Fixes bug #1168516

Change-Id: I6be917181fa8d18764db89e741190964546d0632
Merge "Fix run_tests.sh usage of tools/colorizer.py."
Merge "Make sure that hypervisor nodename is set correctly in FakeDriver"
Merge "Adds useful debug logging to filter_scheduler"
Merge "Improve message and logging for corrupt VHD footers"
Merge "Raise InstanceInvalidState for double hard reboot"
Merge "Pass None to image if booted from volume in live migration"
Merge "Catch volume create exception"