Clarify TooManyInstances exception message.

Fixes LP 1031737.

Previously the message indicated the number of instances requested
and an incorrect indication of the headroom, in the case where ram
or cores was the resource gone over-quota (as opposed to the number
of raw instances).

Change-Id: I9f7f3203f0e644ba533940a87e496bfd09da0460
Deprecate root_helper in favor of rootwrap_config

Mark the root_helper option deprecated and introduce usage of
the rootwrap_config option instead. The root_helper option will
still fully be supported in Folsom, but will be removed in Grizzly.

Transition notes: you should replace:
root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf

by:
rootwrap_config=/etc/nova/rootwrap.conf

Implements bp deprecate-root-helper

Change-Id: I8dfc94e9b91f7ffc82d393b345f09409da347e78
Move tests.test_compute_utils into tests.compute.

Move the test_compute_utils module into nova.tests.compute to be with
other compute related unit tests.

Change-Id: I0956a18279caa15504448ddca7ffe7f4113f1f65
Remove agent_update from the compute manager.

It appears that this method of the compute method has never been used
since it was added in fa0b64b500f3a196044459ba4bf8ed0dea214e92, so just
remove it.

It was also added to the virt driver API, but the only use is internally
to the xenapi driver, so leave it as an internal thing to that driver
only.

Part of blueprint no-db-messaging.

Change-Id: Idb2c823421e714fa364affbbb80d28175b9b5b4e
Pass a full instance to rotate_backups().

This patch renames rotate_backups() to _rotate_backups(), as this method
has never been used over rpc since it was first introduced in
75a87df739effe840e6cb39c976002e99b49c796.  The name change makes it more
clear that it's a private method.

The change also makes it so this method takes an instance dict instead
of just the instance_uuid as an argument.  This is mainly for
consistency with the rest of this file, where things are moving toward
passing the full instance dict around instead to avoid any potential
need for db access.

In passing, this also fixes up some uses of instance_uuid in
snapshot_instance() where instance_uuid is most likely None.

Part of blueprint no-db-messaging.

Change-Id: I275f71384e77eb038aa1140bbfde108b91cd2f83
Don't pass kernel args to Xen HVM instances

The refactoring in commit c0f67877 missed setting guest.os_root for
Xen PV instances only.  If set for Xen HVM instances, the xen tools
will invoke qemu-dm with '-append root=/dev/xxx'.  qemu-dm promptly
failes with '-append only allowed with -kernel option'.

Change-Id: Iba8054b728e28463fb221d44417b1ddba323f596
Fix traceback when using s3.

Fix a regression that causes tracebacks in s3

Traceback (most recent call last):
  File "/opt/stack/nova/nova/image/s3.py", line 294, in delayed_create
     _update_image_state(context, image_uuid, 'downloading')
  File "/opt/stack/nova/nova/image/s3.py", line 286, in _update_image_state
  	headers)
 TypeError: update() takes at most 5 arguments (6 given)

This is due to 6e4539f397bfc5dbf9ec88ddc3968621815d576b

Fixes LP: #1031867

Change-Id: I6cf786999c623c0ca780a173dcba49354207e9c3
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Avoid using logging in signal handler

Fixes bug 1029727

In some cases, logging can grab locks and thusly attempt to reschedule,
which will fail in signal handlers.

This patch simplifies the signal handlers for multi-process support to
only reset the signal handlers and then raise an exception. This will
move all logging and other cleanup out of the signal handler and into
safer places.

Change-Id: I0878adf6ef5c54e577ab2ea39e2ff9845e0e9191
Fix issue with filtering where a value is unicode.

This fixes an issue where if an attribute, such as name, for an instance
contains unicode and doing a list of instances filtering by that attribute
causes a 500 error.

fixes bug 1031846

Change-Id: I2e9e9a36194dad1326b0d7257308576f8553ef06
Fix typo in db test.

test_instance_get_all_by_filters was doing an assertTrue on two values when an
assertEquals was intended.

Change-Id: I335f873a27d1777309d6fb850d7f259b87ebcb0d
Merge "Fix traceback when using s3."
Merge "Fix issue with filtering where a value is unicode."
Merge "Avoid using logging in signal handler"
Merge "Fix typo in db test."
Merge "Don't pass kernel args to Xen HVM instances"
XenAPI: Add script to destroy cached images.

Operations will want the ability to clear out cached images when
disk-space becomes an issue.

This script allows ops to clear out all cached images or just cached
images that aren't in current use.

Change-Id: If87bd10ef3f893c416d2f0615358ba65aef17a2d
Audit log messages in nova/compute/manager.py

To include instance whereever possible. This resolves bug 977978.

Change-Id: Ic113489c464458f9b1859a21942b1bbe203698bd
Merge "Move tests.test_compute_utils into tests.compute."
Merge "Remove agent_update from the compute manager."
Merge "Pass a full instance to rotate_backups()."