Backport tox settings to unbreak jenkins jobs.

The stable/essex tox config for nova does not currently match the
testing standards that jenkins expects. This backports in current
changes so that jenkins coverage jobs should start passing for
stable/essex.

Change-Id: I0fd476c38d9aea7d1c60cb959d8c7ac30e515d77
ensure libguestfs has completed before proceeding

This avoids a FUSE issue referenced here:
http://code.google.com/p/s3ql/issues/detail?id=159
which in turn references this thread on the subject from 2006:
http://thread.gmane.org/gmane.comp.file-systems.fuse.devel/3903
And another case from 2008:
http://permalink.gmane.org/gmane.comp.file-systems.fuse.devel/6502

The vast majority of this work was reproducing and classifying
done by David Naori and Richard W.M. Jones at:
https://bugzilla.redhat.com/show_bug.cgi?id=835466

Fixes bug: 1013689
Change-Id: I36fd11d5f01562f65a6b6f07e759ea066490b067
fix metadata file injection with xen

The metadata parameter was misordered in commit 1463839f

Cherry picked from commit a2032924
Fixes Bug: 1022036
Change-Id: Ica0e2f51b6852c8572bdc3c995cc8c2588b9a25c
Fixes affinity filters when hints is None

 * Fixes bug 1007573
 * Includes failing tests

Change-Id: I827588f0694c5dd7b5e8ff3173d4794a55946d81
(cherry picked from commit 4803074f2c02c87310c486f66fb66be98533805f)
Addtional CommandFilters to fix rootwrap on SLES

Fixes bug 1013147 (for SLES)

(cherry picked from commit a519752eef157aaa03c9f6169eba1ff1b5a9f1bd)

Change-Id: Ib362c913b809f7601a9a4faedede89b22794dfb7
Fix marker behavior for flavors

Fixes Bug #956096

(cherry-picked from commit 497502cbf833d063c964975448dfacd0e1db2ef4)

Change-Id: I700770b17d0a38f120fce002167c8b6a8bbecbb2
Use default qemu-img cluster size in libvirt connection driver

The recommended cluster size [1] for qcow2 is 64k, which is the default
when invoking 'qemu-img create ...'.  Remove the cluster_size option
from qemu-img invocation.

[1] http://www.mail-archive.com/openstack@lists.launchpad.net/msg11371.html

V2: Fix test.

Note: This patch is needed in the stable/essex branch too, otherwise it
is not possible to start Xen instances that use qcow2 images.  The old
qemu 0.10 in Xen cannot cope with cluster size > 64k.

Change-Id: Iafc290720a820cb5f57ded10a2f584fdc5cd5b49
(cherry picked from commit de5cb27e64267ec59e12a495a59880412cecb5e8)
Return 413 status on over-quota in the native API.

Related to LP 1021373.

Previously, we returned a generic 500 Server Error on an over-quota
conditions, whereas this is arguably more appropriately reported
as a 413 status.

Change-Id: I5c1cdc9db54804c512d60e4179c1faa13516d6f9
Handle local & remote exceptions consistently.

Related to LP 1021373.

When the floating_ips quota threshold is exceeded, this occurs remotely
in the networking service and hence is reported back to the API service
over RPC, via a RemoteError wrapping the original QuotaError exception.

Previously the handling of such RemoteErrors in the native API was
inconsistent with exceptions raised locally within the API service.

Now in both cases, we expose the exception explantion, status etc. in the
response, if the exception type is declared as safe.

This fix is not required on master, as the Folsom RPC failure deserialization
logic renders it unnecessary.

Change-Id: Icf7dcafd1f942f5d81d12587775d6ade4a176932
Merge "Use default qemu-img cluster size in libvirt connection driver" into stable/essex
Merge "Return 413 status on over-quota in the native API." into stable/essex
libvirt: fix qcow2 size on live block migration

When using live block migration, ephemeral disks with qcow2 format
should be created in the destination with the same virtual size as
before.

bug 977007

Change-Id: I5c5b1295bdb3e4dc281698eba38c5ce697aa9bc2
(cherry picked from commit ee705d048418d63667136cad3951655178861d46)
Merge "Addtional CommandFilters to fix rootwrap on SLES" into stable/essex
Merge "libvirt: fix qcow2 size on live block migration" into stable/essex
Adding networking rules to vm's on compute service startup

Fixes bug 1027105

Restarting nova-compute resulted in a new empty iptables chain
"nova-compute-FORWARD" being create. This commit adds a single
call to plug_vifs which ensures the appropriate filters (and
bridge) are present on service startup.

Change-Id: I51cbb56acbb244ddddd951a26d3168cf5a9c0314
(cherry picked from commit c2e957ceb555b88084033d9a1c15a4f338b1476e)
Backport fix for API listing of os-hosts.

Backports fix for bug 1014925 to stable/essex, which resolves issue
where querying /v1.1/$tenant/os-hosts returns an empty list.

Original fix by Joe Gordon reviewed into Folsom at:

    https://review.openstack.org/#/c/8682/2

Change-Id: I44ac2e519b7af9b8f3b37a42280ac6fe71c31a1c
Merge "Fix marker behavior for flavors" into stable/essex
Merge "fix metadata file injection with xen" into stable/essex
Merge "ensure libguestfs has completed before proceeding" into stable/essex
Avoid lazy-loading errors on instance_type

When instances are launched with a source group, the instance_type
is not lazy_loaded in properly.

The issue is intermittent because if another query has already loaded
the instance with a joined instance_type or the instance has not
yet been expunged from the session, then the load succeeds.

Therefore this failure only appears under heavy load. Adding an
explicit joindload fixes the issue.

fixes bug 1018721

Change-Id: I450c598c31c416c7be341cbb8cd14e33c6bb2aec
(cherry picked from commit 2ef0dcfac78468551aac8492269ad856c312dcb5)