Volume backed live migration w/o shared storage

This patch allows live migration of volume backed instances without
the need for shared storage (For Libvirt only).

Fixes LP Bug #1074054
DocImpact

Change-Id: If7abd63a610a44720cec2d4021cc4ee737ea301d
Fixed deleting instance booted from invalid vol

1. Translated the exception (NotFound) raised from Cinder client to
Nova's native exception (VolumeNotFound).
2. Added unit test coverage.

Fixes LP: #1087214.

Change-Id: I3cee31a9fd068b65a4097f3f3054aebb69d9ba61
Update command on devref doc

Update the apt-get command to build mysql dependency for ubuntu.
It currenly says apt-get install build-dep python-mysqldb
which should just be apt-get build-dep python-mysqldb

Change-Id: I541f7b80802a6b7191f2fe0338965ef425e7c2fd
Remove the WillNotSchedule exception.

Removes the WillNotSchedule from the Nova exception module. It
is no longer being used.

Change-Id: I865402ec30f9fa1de31c443db51e7f53004d6817
Fix API samples generation.

In Change: Ie46b24a65145c407d46974b63a97a84911223547 a check
was added to _verify_response() to verify the samples.

However, when trying to generate new samples this blocks
_write_sample() because it attempts to read a non-existent file.

This change ensures that the sample is created before the
verification and still retains the behavior that the samples are
only updated on changes.

Change-Id: I1527ba71676b2e1e10bd334f2a7878404d12600c
fix instance rescue without cmdline params in xml.rescue.

fix bug #1086780

Change-Id: I3495693b35dbde9c9da3d78208854b8ebc3f2a04
Execute pygrub using nova-rootwrap in xenapi

Preserve the behavior where, if pygrub fails, compute attempts
to spawn the VM in HVM mode.

Fixes bug #1091628

Change-Id: Ia462964ebb1fc21d8e289de32557a2e7867f1257
Remove fake_tests opt from test.py.

This is no longer used.

Change-Id: Ife0f528da6a9de5ae0567a049f5dbfce9c4a9615
Add option to make exception format errors fatal.

Adds a new fatal_exception_format_errors config option which
defaults to False. This option is use to control how the base
NovaException class handles errors which can occur when it
formats error messages.

The motivation for this change is to be able to enable exception
format checking in our tests by setting
fatal_exception_format_errors=True.

Change-Id: Ie96261ed96bcede4a2b5ec5600cb93c15141a800
Update exceptions to pass correct kwargs.

Updates a variety of Nova exceptions so that they pass the correct
kwargs for proper exception message formatting. Previously
these exceptions would work but have incorrect error messages
because of how NovaException handled exception formatting errors.

Change-Id: I9601d3884a72d53a8ad742cf6610399968747cea
Raise old exception instance instead of new one.

Updates the Nova conductor API's ExceptionHelper class so that
it raises the previous exception instance instead of constructing
a new exception class based on the old one's message.

The motivation for this change is to enable testing of NovaException
message formatting. Previously this function would always construct
a new NovaException which had the incorrect (none) kwargs specified
to properly format the message. The exception would get thrown... but
it would cause extra LOG.error messages to appear in the log file due
to the formatting errors.

This commit works around the issue by raising the previous Exception
directly. From 'pydoc raise':

  If the first object is an instance, the type of the exception is the
  class of the instance, the instance itself is the value, and the
  second object must be ``None``.

Change-Id: I1dddc9e1e7e3d5f970baa9a34b709c943820295e
Import cfg module in extract_opts.py.

Updates the tools/conf/extract_opts.py module so it
imports cfg again.

Fixes "global name 'cfg' is not defined" errors which occur
without it.

Change-Id: Idf7c2c5201c79e7aa359bc555306caadebcc18ce
Allow specification of libvirt guest interface backend driver

Extend the libvirt config APIs to allow the backend driver name
to be set for guest interface devices

Change-Id: Ibde6f0c5e1700b414bb188fb47f511a47cfc0abf
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Make NBD retry logic more generic, add retry to loop.

Other device implementations require retry logic as well. This
change pushes the retry logic up one layer so that its easy to
implement for the other drivers that will benefit from it, and
then adds retry to the loop driver.

This change also adds some unit test coverage for the loop
driver.

Change-Id: Iab0d42d5075e9d50b4e7eb8c7fcef12cae281b40
Add an iptables mangle rule per-bridge for DHCP.

When vhost-net is present on a host, and DHCP services are
run on the same system as guests (multi_host), an iptables
rule is needed to fill packet checksums.  This adds a rule
per-bridge for multi_host networks when vhost-net is present,
similar to how newer versions of libvirt handle the issue for
bridges/networks that it manages.

Fixes LP: #1029430

EDIT: Updated tests and pep8.

Change-Id: I1a51c1d808fa47a77e713dbfe384ffad183d6031
Merge "Allow specification of libvirt guest interface backend driver"
Merge "Remove the WillNotSchedule exception."
Merge "Fix API samples generation."
libvirt: Make vif_driver.plug() returns None

The return value of vif_driver.plug() was used only when nova wrote the
libvirt.xml file on initial boot of the instance. Make it returns None,
and add get_config() to get the configurations if needed.

If LibvirtBridgeDriver is used when the nova-comptue inits, we call
vif_driver.plug() without get the VIF configurations. By doing this
plug doesn't raise if the instance has not yet got a fixed-ip. Fixes
bug 1076309.

Change-Id: I0fafb3d98e3139bce0ef2cee04cab428a0621696
Merge "Fixed deleting instance booted from invalid vol"