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
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
Fixes live migration with attached volumes issue

Fixes Bug: 1140917

Live migration fails when there are volumes attached to the instance

Change-Id: I27b39ac41e97840d2a60006b1c74f6d256bc53b7
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
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
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"
Merge "Push 'Error' result from event to instance action."
Merge "Standardize the coverage initializations."
Merge "fix postgresql drop race"
Prevent reboot of rescued instance.

Do not allow rebooting an instance in the RESCUED state.  This will
revert the instance back into an ACTIVE state, which may still be
broken.  Require an explicit unrescue, instead.

Fix bug 1126163.

Change-Id: I144163666767923e3beb0a82e687066d1f3a0441
quantum security_group driver queries db regression

The following commit 1c6cc18 removed the populate_security_groups()
method in nova/compute/api.py which causes nova-api to check against the
database if a security group exists.

Fixes bug 1145426

Change-Id: I35a6003ac4c16df364302cf90f701ed977f54946
Remove completed FIXME.

block_device_mapping doesn't need elevated context anymore.

Change-Id: Iee23320be10604256db479c13ee405f601cbfd42
Imported Translations from Transifex

Change-Id: I8e952faa49f6ec87b18c9c288f3707c4d1a53dc1
Merge "docs should indicate proper git commit limit"
Merge "quantum security_group driver queries db regression"
Catching InstanceNotFound exception during reboot instance

If the instance is deleted during reboot(most of soft reboot), an
InstanceNotFound exception may be raised when update instance info to DB,
and the instance may become running deleted, so catching the exception and
logging it.
This commit is a supplement of bug #1111213, which may result in the instance
becomes running deleted, when deleting an instance after soft reboot.

Change-Id: I3e8df109d431040c64e87f16ca84ff5b62dde898
Bump instance updated_at on network change.

Update add-fixed-ip and remove-fixed-ip code paths to update the
updated_at field of the instance, since from the user's perspective
through the API, they have made a change to the instance's
configuration.  In that case, it makes sense to expect that the
updated_at field gets changed.

Fix bug 1143466.

Change-Id: Icfd7d0b1b556795d94a22c1719727f8c9fc744f0
Put options in a list.

Update nova.notifications configuration options to be in a list, like
pretty much everywhere else.  For some reason when I saw this it buged
me so ... I changed it.

Change-Id: I551aba4eaceed2d1a8925e9ab621a030af83eeca