Add compute build/resize errors to instance faults

Save exception during build and resize operations in instance faults.
This will making it easier to see the individual compute errors that
occurred when an operation got re-scheduled.

Change-Id: I4224b9638aa9b7572fc0ee1ef6fa3e6654b84805
Cells: Add cells commands to nova-manage

Add commands to nova-manage for configuring cells in the DB.

Implements blueprint nova-compute-cells

DocImpact

Change-Id: Ic1a950181d5ce191780647838c5d06e5410676f7
Remove unused aws access key opts

These options are unused since the compute monitor was removed by
commit 07646e8.

blueprint: scope-config-opts
Change-Id: I85af41fb385040710f830864d8ce70b743376e04
Move global path opts in nova.paths

Move the global path config options (i.e. state_path, pybasedir and
bindir) into a new nova.paths module. A new module may seem like
overkill but some utility methods associated with these options follow
in a later commit.

Moving them to nova.paths means they are no longer globally defined
and it's more obvious which modules require these options.

Change-Id: I381d23f1bbe36dc6967a38a65062b0983e1661aa
Add helper methods to nova.paths

We only ever do one of two things with the global path options:

  1) Reference the option in the default of another option so that the
     value can be interpolated it

  2) Use the value of the option to build a path

Add helper methods for both these cases - e.g. basedir_def() for the
former case and basedir_rel() for the latter case. This makes it much
more obvious how and where these options are used.

Change-Id: I7fd94a329fe911761d02d94e5381e950c6668d56
Refactor periodic tasks.

This review allows periodic tasks to be enabled or disabled in the
decorator, as well as by specifying an interval which is negative.

The spacing between runs of a periodic task is now specified in
seconds, with zero meaning the default spacing which is currently 60
seconds.

There is also a new argument to the decorator which indicates if a
periodic task _needs_ to be run in the nova-compute process. There is
also a flag (run_external_periodic_tasks) which can be used to move
these periodic tasks out of the nova-compute process.

I also remove the periodic_interval flag to services, as the interval
between runs is now dynamic based on the number of seconds that a
periodic task wants to wait for its next run. For callers who want to
twiddle the sleep period (for example unit tests), there is a
create() argument periodic_interval_max which lets the period
periodic_tasks() specifies be overridden. This is not exposed as a
flag because I cannot see a use case for that. It is needed for unit
testing however.

DocImpact. Resolves bug 939087.

Change-Id: I7f245a88b8d229a481c1b65a4c0f1e2769bf3901
Add test for resize server in ComputeAPITestCase.

Add test_resize_quota_exceeds_fails for TooManyInstances,
and fixes a typo in test_resize_deleted_flavor_fails.

Change-Id: Iec21deac3701df4ea1b6eb7e9d3da9c31924e589
Add two tests for resize action in ServerActionsControllerTest.

Add test_resize_not_found for NotFound;
and test_resize_with_too_many_instances for TooManyInstances.

Fix bug #1089417

Change-Id: I18dda1129e1bb3d411bb8a5dab9474d67fcb18fd
Remove the global DATA

In test cases for trusted filter, a global variable is used
to fake the OAT HTTP request.

Remove this global variable, to make code cleaner.

Change-Id: Id75077575917e501d51f83d3c4b1c4250fbc84d0
Signed-off-by: Yunhong, Jiang <yunhong.jiang@intel.com>
NovaBase.delete() rename to NovaBase.soft_delete()

Name of this method is misleading. This method actually does not delete entry
from DB instead of that it only marks entry as deleted as well as
query.soft_delete(). Furthermore we have query.delete() that deletes from DB
all matched entries. So it is very important to rename this method to avoid
misunderstanding.

blueprint db-session-cleanup

Change-Id: Ic8b92ce1c087794aca4faafa9c68c72d444e5f9e
config_drive is missing in xml deserializer

bug 1096508

Change-Id: Ibaca0b08b866fa6297d8abaf005adbc6f689818c
Merge "Refactor periodic tasks."
Provide a PXE NodeDriver for the Baremetal driver

This patch implements a PXE NodeDriver class within the Baremetal
provisioning framework, which provides a means for deploying machine
images using TFTP and PXE.

This patch relies on functionality provided by the nova-baremetal-deploy-helper
utility, implemented in review 15830.

blueprint general-bare-metal-provisioning-framework.

Change-Id: I8d849601186e3dc13f10382857ff2bbc1ff1026d
Check admin context in bm_interface_get_all()

This patch puts missing @require_admin_context before
the function.

blueprint general-bare-metal-provisioning-framework

Change-Id: I07d78f75b7f98a225398ca67b3bda251bc6c0440
Make WebOb version specification more flexible

Change the WebOb version to >=1.0.8 as an temporary
measure to allow the actual version update to 1.2.3
to roll out across the projects one at a time without
breaking the integration tests.

Change-Id: Iea626ff758b352cc5cec2b2c9ab1a3dd3da53bf7
Signed-off-by: Doug Hellmann <doug.hellmann@dreamhost.com>
Merge "Handle compute node records with no timestamp."
Merge "Add compute build/resize errors to instance faults"
Merge "Remove the global DATA"
Merge "Add test for resize server in ComputeAPITestCase."
Invert test stream capture logic for debugging.

Previously the default test behavior was to capture stdout and stderr.
Make the new default to not capture stdout and stderr then set
.testr.conf to always capture these streams when running tests under
testr.

The motiviation behind this change is that you will want these streams
to be captured when running under testr, but when not running under
testr you may not want to capture them. An example of this would be
running `python -m testtools.run test_name` with a change to test_name
to invoke the python debugger (capturing stdout and stderr interferes
with normal debugger functionality).

Also, only invoke the test timeout by default when running under testr.
This is done for the same reason as above. When running a test under the
debugger the timeout interferes with debugging.

Change-Id: I42cbbdadb2f221ec439e92a6800d14e8436bb77b