Add git commit message validation to hacking.py

Adds N801: git commit title should provide a description

Change-Id: Ic6334b20f5f06631b7a5579a4d1b2303685463eb
Updates migration 111 to work w/ Postgres.

Updates migration 111 so that we drop the aggregate_hosts_host_key
unique constrain by name.

Fixes LP Bug #1027453

Change-Id: Ibe36eace6a2d5d5a8d8d03d2cb170cbe0056320e
Remove unused user_id and project_id arguments

The code using the arguments was removed a long time ago.

Change-Id: Ic64ce46115617d05e41b6d01c8d403b58f8cacf9
Log snapshot UUID and not OpaqueRef.

The OpaqueRef doesn't help troubleshooting since it can't be easily used
to identify an image after the session finishes. UUID, which is
invariant, is much more useful.

Change-Id: I3b802e41e583bee84ee6f5d05e1ffc581761571d
Merge "Log snapshot UUID and not OpaqueRef."
Add call to get hypervisor statistics

Adds an admin API call to retrieve the compute node statistics for an
entire nova instance.  Counts up all hypervisors and sums all their
values (vcpus, vcpus_used, etc.).

Change-Id: I36272656bb417c1549133fd2963bac54db0e86c6
Use compute_driver in vmware driver help messages.

Updates the help messages in the vmware driver to use 'compute_driver'
examples instead of 'connection_type' which is now deprecated.

Change-Id: Iddea2cabc841200edd561d71f0c11fd6ba272f5d
Update NovaKeystoneContext to use jsonutils.

Minor fix to use jsonutils.loads instead of json.loads to
standardize w/ the rest of Nova.

Change-Id: I4a6912d29fbe425b29bd1b170b9bec19e3bfc46e
Merge "Use compute_driver in vmware driver help messages."
Merge "Add call to get hypervisor statistics"
Xen: Fix snapshots when use_cow=True.

This fixes an issue where use_cow=True would sporadically cause snapshot
corruption.

The root cause was a race-condition where the VM's sm_config was
sometimes out-of-sync with the underlying VHDs.

The solution is to force an SR rescan immediately after taking a
snapshot so that any VHD parent-pointer modifications are propogated
into the sm_config so that _walk_vdi_chain will receive accurate
information.

Change-Id: I03b4914d9420918590ae27dfc77dfedac9c767c1
Merge "Add git commit message validation to hacking.py"
Merge "Updates migration 111 to work w/ Postgres."
Fix a bug in compute_node_statistics

Turns out, using Sqlalchemy's sum aggregation functions returns
instances of Decimal.  This caused the statistics reporting to
fail with a cryptic "Circular reference" error during
serialization.  Fixed by forcing the values to integer.

Change-Id: Ia89c191f420e116b2f7ca144cdb2e21e6ace404a
Update decorators in compute manager.

This patch modifies two decorators in the compute manager:
checks_instance_lock and wrap_instance_fault.  Both of these assumed that
the function they are wrapping takes two positional arguments: context
and instance_uuid.  They will automatically adapt to the new form that
the functions they wrap will be taking.  These functions will all be
modified to take either a full instance dict or an instance_uuid for
backwards compatibility.

Part of blueprint no-db-messaging.

Change-Id: I93e331706aed1c97877655ce54784a0dbd8de89e
Include name in a primitive Instance.

This ensures that the name of an instance will be present in the result
of jsonutils.to_primitive(Instance).  The name isn't a column.  It's a
property that gets generated dynamically by the Instance class.

Part of blueprint no-db-messaging.

Change-Id: I45914ed55f2c037ee2efd7775bd57fbde36a2116
Convert reboot_instance to take a full instance.

Convert the reboot_instance method in the compute rpc API to take a full
instance via rpc instead of just the instance UUID.  This cuts down on
database access needed by nova-compute.

Part of blueprint no-db-messaging.

Change-Id: Id2c455f66966a9b446e5bbbe542ed3a2b0655289
Don't use rpc to lock/unlock an instance.

Instead of converting this method to send a full instance over rpc
instead of just an instance UUID, this patch removes the usage of rpc
for this operation entirely.  All it's doing is a database update.  RPC
is expensive, so cut out the middle-man.

One functional difference with this approach is that the db update is
now synchronous on the API node, instead of kicking off an async message
to a compute node to handle it.  This seems fine, though.

Part of blueprint no-db-messaging.

Change-Id: I15ceb7625425ab097eebd5b7dd3606a171329f97
Send a full instance via rpc for (un)pause_instance.

Change the pause_instance and unpause_instance methods of the compute
rpc API to take a full instance over rpc instead of just the instance
UUID.  This cuts down on database access needed by nova-compute.

Part of blueprint no-db-messaging.

Change-Id: Ia7e31428c7d2edb9a0c4d0958f1c7774742ea1cd
Send a full instance via rpc for suspend_instance.

Change the suspend_instance method of the compute rpc API to take a full
instance over rpc instead of just the instance UUID.  This cuts down on
database access needed by nova-compute.

Part of blueprint no-db-messaging.

Change-Id: If881fb419a52a2486b2e7b85b4d58a17f72c48a6