Merge "Return to skipping filters when using force_hosts."
Added the build directory to the tox.ini list pep8 ignores.

Change-Id: Ie3c0d5ce021058de8ac868c736660fa0c75b5af5
Implement ZooKeeper driver for ServiceGroup API.

The ZooKeeper driver uses ephemeral nodes in ZooKeeper to keep
track of node liveness in a service group. The Implementation is
based on the evzookeeper library to combine zookeeper
and eventlet.

Part of blueprint zk-service-heartbeat

DocImpact: new driver

Change-Id: Ia20519de2b4964007f8b91ea5d56d1875510d40f
Merge "Fix lazy load 'system_metadata' failed problem."
Move floating ip db access to calling side.

Most of the allocation for floating ips can be done on the calling
side, including finding the proper host to send the message to.
This saves us from making an rpc call for allocate/deallocate and
makes sure that we only need 1 call for associate/disassociate by
finding the proper host to send the message to immediately.

Getting exceptions to work properly required pulling in the helper
that was used by the conductor to regenerate exceptions that are
wrapped for rpc. Since this is now a shared class, it was moved
to utils.

Also a few config options were moved to avoid circular imports.

Part of blueprint optimize-nova-network

Change-Id: I6ec65b1f3e8d00cab778b10eec620760886567e0
Optimize rpc handling for allocate and deallocate

If we are in multi_host mode we can save an extra rpc call by
sending the message to the instance host the first time. This
will prevent nova-network from having to resend the message
to actually allocate the fixed ips.

Part of blueprint optimize-nova-network

DocImpact: before multi_host only affected the network create
commands, but now it can be used at run-time to optimize the
path for allocating and deallocating fixed_ips, so it is important
to set it if you are using multi_host networks.

Change-Id: Ide48e0adb2e1051e31965c9a8422b27c1a9c40b3
Merge "Access DB as dict not as attributes part 5"
Merge "Add regression testing tool"
Merge "Recache or rebuild missing images on hard_reboot"
Merge "Default the last parameter (state) in task_log_get to None"
Add a virtual PowerDriver for Baremetal testing

This virtual_power_driver provides the ability for baremetal driver to
start/stop/reboot VMs within common dev/test environments. Its goal is to
approximate the same functionality as other PowerDrivers (eg. IPMI) within
a desktop development environments and within the devstack-gate environment.

Authored-by: Chris Krelle <nobodycam@gmail.com>
Co-authored-by: Devananda van der Veen <devananda.vdv@gmail.com>

Change-Id: I9935a9a30a166a9c28a9abb139c49f219a32ddd7
Merge "Move floating ip db access to calling side."
Merge "Optimize rpc handling for allocate and deallocate"
Fixed FlavorAccess serializer

Fixed flavor_access template
Renamed remaining serializers
Fixed serializer tests
Fixes bug 1115880

Change-Id: I28913f1466ff6d1f7933c292ba617be2899c09a7
Support for scheduler hints for VM groups

This is part of the blueprint vm-ensembles. The patch introduces the
group as a scheduler hint.

The patch set adds group support for multi-VM deployment. This is achieved
as follows:
1. A new hint is added: group. This will contain the name and type for the
   group. At the moment only anti-affinity is supported. In the future
   we will add network proximity. It will be extended to <name>:<type>
2. In order to ensure that group policy will be honored for future VM
   deployments, the group is stored as system_metadata.
3. The anti affinity is implemented by a new filter called
   GroupAntiAffinityFilter.

DocImpact

Change-Id: I6ea2af5770b5ac4ff082b2a021d323ee38282205
Remove nova.db call from baremetal PXE driver

Baremetal PXE driver was fetching instance_type from the nova db.
Now that no-db-compute is done, that's not possible. Also, there's a
more efficient way -- just call extract_instance_type(instance)!

Baremetal unit tests should check for instance_types with swap = 0 and
with swap > 0. This required changing test/utils to include a
real copy of instance_types in instance['system_metadata'].

Change-Id: I2a91e5c026782946f6b01e4189ec85d30ba87583
Ensure that LB VIF drivers creates the bridge if necessary

Fixes bug 1117770

In order for libvirt to use the bridge name the bridge must exist.

Change-Id: Ie24cfce8454e0c1bbfd9058787a1fd704790f03c
Merge "Added the build directory to the tox.ini list pep8 ignores."
Fixes a race condition on updating security group rules

During creating the instance, compute manager makes an rpc call
to "allocate_for_instance" from the network manager, which will
in turn end up making a rpc cast to each compute_manager with
an instance in the group(s) than need to be refreshed calling
refresh_instance_security_rules.

When an instance is being created is in a group that has a
rule referring to itself, that chain will end up trying to
refresh the rules for the instance which is still being created.

That call will find its way down to do_refresh_instance_rules()
in libvirt/firewall - which will in turn try to get network_info
from the global "network_infos" in firewall.

But the entry in network_infos for this instance might not of
been added yet, as that only happens when the create of the
instance calls "prepare_instance_filter which comes later in
the sequence as part of driver.spawn

The fix here adds a synchronisation lock to the incomming
refresh call so that it is blocked until any in-progress
thread on the instance is finished.

Change-Id: I550e286aa4777b011633550109e18e03d63a4bbb
Regenerate nova.conf.sample

Change-Id: I1f560367cb895602b359a51a9da9cb044013e936