Push 'Error' result from event to instance action.

Currently a failed event stores an 'Error' result but in order to see
which actions have failed it would require grabbing each one through the
api to see the events.  This patch adds 'Error' to the message field of
the instance action so that any actions with failures can be seen from
the initial listing of actions on an instance.

Change-Id: Ieeb798c47211ab00fe5b767dc1f18a665549ba01
Standardize the coverage initializations.

Now when we measure coverage repeatedly, the coverage data of
nova-api is accumulated but the ones of other nova services are
reset each time.
This is due to create new "coverage" class each time
"_start_coverage_telnet" method is executed.

This patch limits creating "coverage" class the first time
the method is executed.

Fixes bug 1122720

Change-Id: Ia900c96113bee65362ccb7c4c1975535d814d835
Adds retry on upload_vhd for xapi glance plugin

Add a retry for the xapi glance plugin to handle transient issues
when uploading the vhd.

An example issue we're seeing is a connection timeout:

['XENAPI_PLUGIN_FAILURE', 'upload_vhd', 'error',
		"(110, 'Connection timed out')"]

To work around transient issues such as a connection timeout, we
should retry based on glance_num_retries before outright failing.

Change-Id: Ice6fdd3dd39ef40e5997d69209aaafa66bff5d6e
Fixes: bug #1134493
Return proper error messages while disassociating floating IP

Currently, when a floating IP is not associated with an instance, and if we try
to disassociate it, a response likes "HTTP/1.1 404 Not Found" will be returned,
it is not proper, so change it to "HTTP/1.1 422 Unprocessable Entity" with body
likes '{"computeFault": {"message": "Floating ip 172.24.4.225 is not associated
with instance a33857af-b18b-4b88-a5cc-7d84c7fd41c8.", "code": 422}}'.

Fixes bug: #1129719

Change-Id: I18194ccf59edb5eb2bcd52a65f38d5632fef95d3
Fallback coverage backdoor telnet connection to lo

This commit adds a fallback condition for the telnet connection.
If trying to establish a connection to the backdoor fails with
ECONNREFUSED the extension will then try to connect to the same
port on the lo device. Eventlet backdoors currently open on the
lo interface and this is to cover the common (and CI) use case
where the hostname doesn't resolve to 127.0.0.1.

Using the fallback was done to avoid adding a new config option
to specify that the hostname that is in the DB for the service
doesn't resolve to the lo device, and that the extension should
use just use localhost.

Change-Id: I0321db68cbccf0cddf13d91a77dfb744bb456d87
Don't LOG.error on max_depth (by default).

Reverts part of 7b206ad which added an extra LOG.error
statement when max_depth is hit.

This is causing spurious errors to get logged when making
some Nova requests.

Fixes LP Bug #1140133

Change-Id: I0fff47d9c53c63345ae273a4d20a2bacb27f12e5
Fixes live migration with attached volumes issue

Fixes Bug: 1140917

Live migration fails when there are volumes attached to the instance

Change-Id: I27b39ac41e97840d2a60006b1c74f6d256bc53b7
Imported Translations from Transifex

Change-Id: I380ccf561e13327dc15b8da9bcf938ec5ec46c75
Merge "Don't LOG.error on max_depth (by default)."
Compute manager should remove dead resources

While most hypervisors return a single - and constant - value from
driver.get_available_nodes, baremetal does not. When a node is deleted
from the baremetal database, it is no longer returned from
driver.get_available_nodes. However, Nova's compute_node record is not
directly updated.

This patch allows Compute Manager to detect missing nodes within
update_available_resources. It then invokes resource_tracker to update
the dead node and remove it from compute.

This in turn allows the ServiceGroup API to properly update the
servicegroup when a baremetal node is no longer in service.

Fixes bug 1138184

Change-Id: Icfff3f8e3099668806633a6a58a152b32ec8b49b
Merge "Imported Translations from Transifex"
Merge "Adds retry on upload_vhd for xapi glance plugin"
Merge "Fallback coverage backdoor telnet connection to lo"
Merge "Compute manager should remove dead resources"
fix postgresql drop race

when running under testr there is a chance that we enter
reset_databases for the postgresql tests at the same time for both
general and baremetal tests. In this case the pg admin commands
could fail, as pg gets really strict about having 2 users trying
to do admin commands at the same time on a single database (in
this case the magic template1 db, that we need to use because
you can't drop the db you are currently on.)

Solve this by breaking out the postgresql reset case into a
seperate function and using @lockutils on it.

Change-Id: I31555ef5aae27f31daf7cbbae61072a8d7deb255
Fixes oslo-config update for deprecated_group

Fixes bug: 1140310

The oslo-config dependency referenced in pip-requires should be updated to
the latest version to include support for "deprecated_group".
This is needed to move specific driver options from the DEFAULT group w/o
losing backwards compatibility.

Change-Id: I5d18a5ee704a1f781c8acd6f903b0e3ca07bc070
Remove unused db calls from nova.db.api

* iscsi_target_count_by_host
* iscsi_target_create_safe
* reservation_destroy
* volume_get_iscsi_target_num

Change-Id: I0c357a6398509150e7ac987826341cd1e79f0075
Merge "Fixes oslo-config update for deprecated_group"
docs should indicate proper git commit limit

The nova gate should recommend 50 characters or less for a git commit
but actually enforce 72 characters.

This patch changes the hacking.rst docs to indicate the actual limit
is 72 characters rather then 50 characters.

Change-Id: I47f1f1f1007f5744bf1fef419df7e033803b4a53
Fixes: Bug #1144840
Merge "Remove unused db calls from nova.db.api"