Opening stable/icehouse

Bump version to next stable release on icehouse branch, and set
defaultbranch in .gitreview for convenience.

Change-Id: I3574a26e374d563677905b2a3c98b72bf1429d2b
Fix bug detach volume fails with "KeyError" in EC2

Modified volume['instance_uuid'] to volume.get('instance_uuid'),
to avoid "KeyError", when detach a volume with "attaching" status.

Change-Id: Ic1aacab212c2a2026d18ef57ad9d77fdc6d86b47
Closes-Bug: #1280532
(cherry picked from commit fa72e49845179e29cf918e0742ef735ae868bb4c)
Don't overwrite instance object with dict in _init_instance()

If a compute service is started while it has an instance in task_state
REBOOT_STARTED or REBOOT_STARTED_HARD it will trigger an instance update
which will overwrite the instance object with an instance dict.  This
causes an AttributeError on the next line when instance.task_state is
referenced.  This seems like a simple oversight and should be switched
to using the instance.save method.

Change-Id: I44c3eab2c8821b66b0b9ef4696e56bd577ae8fed
Closes-Bug: 1309067
(cherry picked from commit b4b5254a56d808f2582784897364de1adafeb43a)
Merge "Fix bug detach volume fails with "KeyError" in EC2" into stable/icehouse
Remove unneeded call to fetch network info on shutdown

There is no reason to fetch the network_info from the network api on shutdown
since we can just pull it out of the local cache. There are probably other
places where this call to the network api call can be removed but this patch
just handles the case for shutdown.

Note: the following test was removed 'test_terminate_no_fixed_ips' as
the call to the network api is no longer done so this test would be the
same as test_terminate_no_network.

Closes-bug: #1288392

Change-Id: Ifbf751739c215e566926719f481c03e2c064163a
(cherry picked from commit c47900064f2f3b4384cfa3fd6fe21f452514fa36)
Don't explode if we fail to unplug VIFs after a failed boot

Libvirt currently attempts to unplug VIFs after destroying an
instance, which can fail if the instance was never built
properly in the first place. This patch makes it ignore errors
when trying to tear down VIFs during that cleanup. Failure
in this case would block the deletion of the instance (which
should never happen) and any real failures aren't something
we could do anything about.

Closes-bug: #1306718

Change-Id: I84a4433c3959b8f14e0259be0aa51da1654006c8
(cherry picked from commit b3225581befe14f21b909e176d0a4583b297e031)
Change errors_out_migration decorator to work with RPC

This decorator in nova/compute/manager.py was written to work with
positional arguments, but at run time the decorated methods are
called via RPC with keyword arguments.  This change fixes the
decorator and the associated test cases.

Closes-Bug: #1300380

Change-Id: I9f87151a71e5217e7eff97cdc5cad2c85b620fa5
(cherry picked from commit 72cd430e971589f7872a9d4e8f173c68b4955375)
Fix display of server group members

The previous code was failing to display the members of server
groups because it was filtering them all out.

Interestingly, the previous code passes the unit tests due to a
bug where we treat regex comparisons differently when using mysql
vs sqlite (tracked under bug 1298690).

Change-Id: I7be9c180f4284dd18cd02e510e77e3c1e3fc9925
Closes-bug: 1298494
(cherry picked from commit 8ce30b6ac7ea8d2e036a621a9904b35cb1563672)
Moved the registration of lifecycle event handler in init_host()

The event handler has to be registered before the libvirt connection
is used for the first time.  Otherwise it doesn't register and events
such as shut down initiated from within the instance are not registered
in nova until a period task compares the content of hypervisor with
content of database.

Closes bug: #1297485

Change-Id: I70887bea343734a977f621fedc634b6fab0e4ad5
(cherry picked from commit 8a430da045d86ccb8daee6e082c12890ce5c5276)
InvalidCPUInfo exception added to except block

When a live migration between two nodes with different
CPU info features is launched, an InvalidCPUInfo exception
is raised and not captured. That lets the vm in an
unusable state because the task_state rollback is not
executed.

Change-Id: Ib418fa324964cabd5f342d1b764f9ac7608b7ade
Closes-Bug: #1294210
(cherry picked from commit 7a3b4033f07f8c2144a36c1f12b1b9281cfb9a69)
Remove metadata's network-api dependence on the database

This makes the metadata server use instance.info_cache for getting
an instance's info cache instead of going direct to the network-api
(and thus, the database) for it. It also converts the network-api
implementation of get_fixed_ip_by_address() to use and return an
object. Since that translates to the same DB call in the end, none
of the network tests need to change.

Conflicts:

        nova/tests/network/test_api.py

Change-Id: Iab444b1669628604f7d96d9550eb684645c554cb
Closes-bug: #1306009
(cherry picked from commit 20d0cef99376ca622294536485a5987385a717e3)
Remove unnecessary call to fetch info_cache

The _heal_instance_info cache() always accesses instance['info_cache']
therefore we should always load the info_cache so we can avoid the extra
query to fetch it.

Change-Id: I3c2e005b98abf2a80276562cc05e88ba5ff199bc
Closes-bug: #1309239
(cherry picked from commit 5aa29b6b0a34d603e882a80cdc8e936f983b1892)
remove unneeded call to network_api on rebuild_instance

When rebuilding an instance we call the network_api and which results in
calling neutron and updating the info cache. We do not actually need to
do this as we can get the nw_info directly from the instance's info cache.

Change-Id: I2bcc2f15b1e5bb52d972098c7bc3e12f160b6feb
Closes-bug: 1294914
(cherry picked from commit 982850f0e912e1a72e501e456cb2b5ef94124ca6)
Merge "Fix display of server group members" into stable/icehouse
Pass configured auth strategy to neutronclient

When the token is invalid Nova emits a log trace about an
unknown auth strategy (caused by neutron client). This is a
red herring and is only masking the fact that the token was
unable to be validated in the first place.

Partial-bug: 1297309

Change-Id: Ia3801f80c7ca18674fcf46b5270aa04f6c8c9331
(cherry picked from commit fdd689c146713d18eb901d6f3ec986cdd11d13fe)
Merge "Remove unnecessary call to fetch info_cache" into stable/icehouse
Merge "remove unneeded call to network_api on rebuild_instance" into stable/icehouse
Merge "Remove unneeded call to fetch network info on shutdown" into stable/icehouse
Check for None or timestamp in availability zone api sample

test_availability_zone_detail depends on the services not having an
updated_at time set in the database.  This is set by a periodic task so
it's not guaranteed to be set, or not, shortly after the service starts.
On a fast system the test reliably passes, but adding a delay causes the
test to start failing.  Introducing a time.sleep(5) in the test seems to
make it reliably fail for me.  The test should pass if updated_at is set
to None or a timestamp.

Change-Id: I976ddf5354a52ca06a6419a92abcacb7d2379a37
Closes-bug: 1300810
(cherry picked from commit a70308a471c67386ad255e67e8971bbf96c31f18)
VMWare: add power off vm before detach disk during unrescue

Non Hot Plug type disk like IDE can only be detached when the VM is power off.

Change-Id: Ib1f387a41abe2b52357854e90c2535ebb7b43f18
Close-bug: #1279199
(cherry picked from commit 1e1915aaaca38b5691794e0e052a42b9d95dd3c2)