Remove outdated try except block in ec2 code

We now have 'ec2_id -> glance_id mapping' so this check can be removed

Change-Id: Ib10ab5faea154bae9d129c0dc1edc24c2a99ffb7
Fixes passing arbitrary conductor_api argument

Fixes bug #1158679

Change-Id: Iabe1f58b6139f5619e328a986143e8591b3a02cc
xenapi: fix console for rescued instance

Check if the instance is in vm_state RESCUED and if so
change the name-label to reflect that. Name label is used
to get vm ref and currently the original instance is being
referenced even when in rescue mode. If rescue vm is not ready
yet, InstanceNotReady is raised.

Added tests cases for xenapi get_vnc_console for instance
and rescue mode.

Fixes bug #1157389

Change-Id: I5438103d517c40c1c87ddecd5f88b1487bfc0339
Add a comment to placeholder migrations.

We've had a review that tried to reuse migration 162 rather than
skipping to 172.  Maybe a comment will prevent that in the future.

Change-Id: Ib8b73260df593d13a81ce65c85a302a54668b95e
Initialize compute manager before loading driver.

The compute virt API uses the conductor API instance on the compute
manager.  Make sure the compute manager has been fully initialized
before loading the driver and passing it the virtapi instance.  This
prevents the possibility of the driver calling back into the compute
manager and using something not initialized yet, such as the conductor
API in the case of this bug.

This patch also moves initialization of a member variable up above
super(), where the rest of the initialization is.  There doesn't appear
to be a reason for needing to have it at the end.

Fix bug 1156490.

Change-Id: I19684f24d590201d135336107425c2be2f74c83e
translate cinder BadRequest exception

if we attempt to create a volume with values that are invalid (like
a non numeric value for size) we properly get a BadRequest returned
from cinder. However we inproperly pass that cinderclient exception
all the way to the top of the request process, causing a stack trace
to appear in the logs because this is an exception type Nova doesn't
understand.

This situation is triggered by Tempest on every run, and while the
return is successful, the stack trace might spook people.

Fix this by increasing the scope of the existing
_reraise_translated_volume_exception() method. Longer term it would
make sense to have a decorator that handles all possible exceptions
we'd expect from cinder client and turn them into Nova exceptions.

This reduces the number of stack traces in nova-api by 6 on a
successful Tempest run.

Fixes bug #1158505

Step towards blueprint no-stacktraces-in-logs

Change-Id: Ifcfbd5eb11fe9f038f648ca5291499290b7126b1
Merge "Fixes passing arbitrary conductor_api argument"
Merge "translate cinder BadRequest exception"
Merge "Initialize compute manager before loading driver."
Don't log traceback on rpc timeout.

Don't log a traceback in the rpc layer after a timeout() occurs while
waiting on a response to a call().  Let the caller get the exception and
decide whether it should be logged or not.

Fix bug 1158920.

Change-Id: I0387ab48899627cbc3eb1d7187067472ddefc1bf
Sync rpc from oslo-incubator.

Updates include:

* Enabling the rpc message envelope.
* Improved logging for timeouts
* fixes in the zmq driver

Change-Id: I0b2ab1acff1fea9c07a33da176cf6a11ed8a3f2c
Sync everything from oslo-incubator.

Change-Id: If602b424086abb3edbd4703bc0e3befedbf37925
Reset ec2 image cache between S3 tests.

We recently introduced EC2 image caching in 2865a76.

On some python 2.6 distros I'm now seeing nova.tests.image.test_s3
failures caused by test ordering issues. Tests appear to reuse
IDs and this can cause issue if we don't clear the cache in tearDown.

Fixes LP Bug #1158935.

Change-Id: Ifeedaf7a784b787de95d2f36394216cf7c94c5f4
py2.6 doesn't support TextTestRunner resultclass

Updates tools/colorizer to account for the fact that Python
2.6 doesn't support resultclass.

This fixes issue in trying to use run_tests.sh on distributions
which use python 2.6.

Fixes LP Bug #1158940

Change-Id: I763cd9c7a4b5ec5baaad3a3d9ee96e6e3cd13b3e
Make _downsize_quota_delta() use stashed instance types

This change changes the _downsize_quota_delta() method to take instance
as a param instead of migration_ref, and use it to extract the old and new
instance_types instead of looking them up in the database. This is needed
for this case since the method can be called from compute manager during
the periodic task to confirm pending migrations, and thus access to the
database may not be allowed.

Fixes bug #1158897

Change-Id: I647c51bc4d30e6dfd62abe7b65a9109d6aa2bb6f
Merge "Add a comment to placeholder migrations."
Merge "Make _downsize_quota_delta() use stashed instance types"
Merge "Remove outdated try except block in ec2 code"
disable colorizer as it swallows fails

while the colorizer is pretty, it has the problem that fail output
actually gets completely swallowed when it is turned on.

Revert the use in run_tests.sh for now until it can be sorted out
so we don't prevent people from using run_tests.sh to do development.

Fixes bug #1159116

Change-Id: I3e6dfdc03c7b033ff132c00a51a368dae9789266
Merge "Reset ec2 image cache between S3 tests."