Merge lp:~corey.bryant/nova/2014.1.5 into lp:~ubuntu-server-dev/nova/icehouse

Proposed by Corey Bryant
Status: Merged
Merge reported by: Chuck Short
Merged at revision: not available
Proposed branch: lp:~corey.bryant/nova/2014.1.5
Merge into: lp:~ubuntu-server-dev/nova/icehouse
Diff against target: 241 lines (+32/-170)
5 files modified
debian/changelog (+28/-0)
debian/patches/drop-oslo-utils-usage.patch (+0/-41)
debian/patches/fix-requirements.patch (+4/-4)
debian/patches/recover-from-power-state-on-compute.patch (+0/-123)
debian/patches/series (+0/-2)
To merge this branch: bzr merge lp:~corey.bryant/nova/2014.1.5
Reviewer Review Type Date Requested Status
Ubuntu Server Developers Pending
Review via email: mp+262603@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2015-04-23 14:25:59 +0000
3+++ debian/changelog 2015-06-22 16:01:22 +0000
4@@ -1,3 +1,31 @@
5+nova (1:2014.1.5-0ubuntu1) UNRELEASED; urgency=medium
6+
7+ * Resynchronize with stable/icehouse (08b5d48) (LP: #1467533):
8+ - [74295ed] Use ebtables to isolate dhcp traffic
9+ - [a83eb5f] VMware: fix AttributeError: TaskInfo instance has no attribute 'name'
10+ - [8876294] libvirt: partial fix for live-migration with config drive
11+ - [b77c188] Type conflict in trusted_filter.py using attestation_port default value
12+ - [378a8d4] Use instance.uuid instead of instance
13+ - [c12f21d] Make test_version_string_with_package_is_good work with pbr 0.11
14+ - [1668178] Moves trusted filter unit tests into own file
15+ - [4812617] Use hypervisor hostname for compute trust level
16+ - [d8853ee] Recover from POWERING-* state on compute manager start-up
17+ - [0784b0c] Avoid referring to juno-era exception type
18+ - [f513a28] libvirt: Make sure volumes are well detected during block migration
19+ - [68ec684] libvirt: avoid changing UUID when redefining nwfilters
20+ - [cc86ef5] delete python bytecode before every test run
21+ - [3501ec2] Drop use of oslo.utils in nova
22+ - [392dc22] Eventlet green threads not released back to pool
23+ - [1e03160] Sync strutils from oslo-incubator for mask_password fix
24+ - [7292c02] Allow instances to attach to shared external nets
25+ - [dbc348d] Fix libvirt watchdog support
26+ - [08b5d48] HyperV Driver - Fix to implement hypervisor-uptime
27+ * d/p/drop-oslo-utils-usage.patch: Dropped; Fixed upstream.
28+ * d/p/recover-from-power-state-on-compute.patch: Dropped; Fixed upstream.
29+ * d/p/fix-requirements.patch: Rebased.
30+
31+ -- Corey Bryant <corey.bryant@canonical.com> Mon, 22 Jun 2015 10:15:07 -0400
32+
33 nova (1:2014.1.4-0ubuntu2.1) trusty; urgency=medium
34
35 * Ensure that compute manager restarts during instance power
36
37=== removed file 'debian/patches/drop-oslo-utils-usage.patch'
38--- debian/patches/drop-oslo-utils-usage.patch 2015-03-17 16:46:32 +0000
39+++ debian/patches/drop-oslo-utils-usage.patch 1970-01-01 00:00:00 +0000
40@@ -1,41 +0,0 @@
41-Description: Override python-oslo.utils dependency as it's not in trusty.
42-Author: Corey Bryant <corey.bryant@canonical.com>
43-Bug: https://bugs.launchpad.net/bugs/1432685
44-Forwarded: yes
45-
46---- a/nova/compute/api.py
47-+++ b/nova/compute/api.py
48-@@ -26,7 +26,6 @@
49- import uuid
50-
51- from oslo.config import cfg
52--from oslo.utils import units
53- import six
54-
55- from nova import availability_zones
56-@@ -68,6 +67,7 @@
57- from nova.openstack.common import log as logging
58- from nova.openstack.common import strutils
59- from nova.openstack.common import timeutils
60-+from nova.openstack.common import units
61- from nova.openstack.common import uuidutils
62- import nova.policy
63- from nova import quota
64---- a/nova/tests/compute/test_compute.py
65-+++ b/nova/tests/compute/test_compute.py
66-@@ -31,7 +31,6 @@
67- import mox
68- from oslo.config import cfg
69- from oslo import messaging
70--from oslo.utils import units
71- import six
72- from testtools import matchers as testtools_matchers
73-
74-@@ -69,6 +68,7 @@
75- from nova.openstack.common import jsonutils
76- from nova.openstack.common import log as logging
77- from nova.openstack.common import timeutils
78-+from nova.openstack.common import units
79- from nova.openstack.common import uuidutils
80- from nova import policy
81- from nova import quota
82
83=== modified file 'debian/patches/fix-requirements.patch'
84--- debian/patches/fix-requirements.patch 2015-03-17 16:46:32 +0000
85+++ debian/patches/fix-requirements.patch 2015-06-22 16:01:22 +0000
86@@ -6,10 +6,10 @@
87 @@ -25,9 +25,8 @@
88 python-neutronclient>=2.3.4,<2.3.11
89 python-glanceclient>=0.9.0,!=0.14.0,<=0.14.2
90- python-keystoneclient>=0.7.0,<=0.11.2
91--six>=1.6.0
92-+six>=1.5.2
93- stevedore>=0.14,<1.2
94+ python-keystoneclient>=0.7.0,<0.12.0
95+-six>=1.6.0,<=1.9.0
96++six>=1.5.2,<=1.9.0
97+ stevedore>=0.14
98 -websockify>=0.5.1,<0.6
99 wsgiref>=0.1.2
100 oslo.config>=1.2.0,<1.5
101
102=== removed file 'debian/patches/recover-from-power-state-on-compute.patch'
103--- debian/patches/recover-from-power-state-on-compute.patch 2015-04-23 14:25:59 +0000
104+++ debian/patches/recover-from-power-state-on-compute.patch 1970-01-01 00:00:00 +0000
105@@ -1,123 +0,0 @@
106-From d8853eef181fabebc13bdfdaa98818cfcef318be Mon Sep 17 00:00:00 2001
107-From: David McNally <dave.mcnally@hp.com>
108-Date: Fri, 22 Nov 2013 16:18:53 +0000
109-Subject: [PATCH] Recover from POWERING-* state on compute manager start-up
110-
111-If a compute manager is stopped / fails during POWERING-ON or
112-POWERING-OFF operations then the instance will be left stuck in
113-a transitional task_state.
114-
115-This change handles both these states by simply either retriggering
116-the power on or power off request on start-up of the compute manager.
117-If the operation had previously completed then retrying will
118-essentially be a no-op so it is safe to handle instances in this
119-state in this way.
120-
121-Closes bug: #1304333
122-
123-(cherry picked from commit 8f7056f48c115ee0939c76ce08531dab0f14e354)
124-Change-Id: I262be6b13a764bc1355be34cdc0180e8e87f260b
125----
126- nova/compute/manager.py | 26 ++++++++++++++++++
127- nova/tests/compute/test_compute_mgr.py | 48 ++++++++++++++++++++++++++++++++++
128- 2 files changed, 74 insertions(+)
129-
130-diff --git a/nova/compute/manager.py b/nova/compute/manager.py
131-index 2955796..900f861 100644
132---- a/nova/compute/manager.py
133-+++ b/nova/compute/manager.py
134-@@ -919,6 +919,32 @@ class ComputeManager(manager.Manager):
135- instance.vm_state = vm_states.ACTIVE
136- instance.save()
137-
138-+ if instance.task_state == task_states.POWERING_OFF:
139-+ try:
140-+ LOG.debug(_("Instance in transitional state %s at start-up "
141-+ "retrying stop request"),
142-+ instance['task_state'], instance=instance)
143-+ self.stop_instance(context, instance)
144-+ except Exception:
145-+ # we don't want that an exception blocks the init_host
146-+ msg = _('Failed to stop instance')
147-+ LOG.exception(msg, instance=instance)
148-+ finally:
149-+ return
150-+
151-+ if instance.task_state == task_states.POWERING_ON:
152-+ try:
153-+ LOG.debug(_("Instance in transitional state %s at start-up "
154-+ "retrying start request"),
155-+ instance['task_state'], instance=instance)
156-+ self.start_instance(context, instance)
157-+ except Exception:
158-+ # we don't want that an exception blocks the init_host
159-+ msg = _('Failed to start instance')
160-+ LOG.exception(msg, instance=instance)
161-+ finally:
162-+ return
163-+
164- net_info = compute_utils.get_nw_info_for_instance(instance)
165- try:
166- self.driver.plug_vifs(instance, net_info)
167-diff --git a/nova/tests/compute/test_compute_mgr.py b/nova/tests/compute/test_compute_mgr.py
168-index 92e1bb5..78ffdef 100644
169---- a/nova/tests/compute/test_compute_mgr.py
170-+++ b/nova/tests/compute/test_compute_mgr.py
171-@@ -616,6 +616,54 @@ class ComputeManagerUnitTestCase(test.NoDBTestCase):
172- instance.power_state = power_state.RUNNING
173- self._test_init_instance_cleans_reboot_state(instance)
174-
175-+ def test_init_instance_retries_power_off(self):
176-+ instance = instance_obj.Instance(self.context)
177-+ instance.uuid = 'foo'
178-+ instance.id = 1
179-+ instance.vm_state = vm_states.ACTIVE
180-+ instance.task_state = task_states.POWERING_OFF
181-+ with mock.patch.object(self.compute, 'stop_instance'):
182-+ self.compute._init_instance(self.context, instance)
183-+ call = mock.call(self.context, instance)
184-+ self.compute.stop_instance.assert_has_calls([call])
185-+
186-+ def test_init_instance_retries_power_on(self):
187-+ instance = instance_obj.Instance(self.context)
188-+ instance.uuid = 'foo'
189-+ instance.id = 1
190-+ instance.vm_state = vm_states.ACTIVE
191-+ instance.task_state = task_states.POWERING_ON
192-+ with mock.patch.object(self.compute, 'start_instance'):
193-+ self.compute._init_instance(self.context, instance)
194-+ call = mock.call(self.context, instance)
195-+ self.compute.start_instance.assert_has_calls([call])
196-+
197-+ def test_init_instance_retries_power_on_silent_exception(self):
198-+ instance = instance_obj.Instance(self.context)
199-+ instance.uuid = 'foo'
200-+ instance.id = 1
201-+ instance.vm_state = vm_states.ACTIVE
202-+ instance.task_state = task_states.POWERING_ON
203-+ with mock.patch.object(self.compute, 'start_instance',
204-+ return_value=Exception):
205-+ init_return = self.compute._init_instance(self.context, instance)
206-+ call = mock.call(self.context, instance)
207-+ self.compute.start_instance.assert_has_calls([call])
208-+ self.assertIsNone(init_return)
209-+
210-+ def test_init_instance_retries_power_off_silent_exception(self):
211-+ instance = instance_obj.Instance(self.context)
212-+ instance.uuid = 'foo'
213-+ instance.id = 1
214-+ instance.vm_state = vm_states.ACTIVE
215-+ instance.task_state = task_states.POWERING_OFF
216-+ with mock.patch.object(self.compute, 'stop_instance',
217-+ return_value=Exception):
218-+ init_return = self.compute._init_instance(self.context, instance)
219-+ call = mock.call(self.context, instance)
220-+ self.compute.stop_instance.assert_has_calls([call])
221-+ self.assertIsNone(init_return)
222-+
223- def test_get_instances_on_driver(self):
224- fake_context = context.get_admin_context()
225-
226---
227-1.9.1
228-
229
230=== modified file 'debian/patches/series'
231--- debian/patches/series 2015-04-23 14:25:59 +0000
232+++ debian/patches/series 2015-06-22 16:01:22 +0000
233@@ -1,8 +1,6 @@
234 # Ubuntu specific patches below here. Note these can be dropped eventually.
235-drop-oslo-utils-usage.patch
236 disable-websockify-tests.patch
237 fix-requirements.patch
238 skip_ipv6_test.patch
239 arm-console-patch.patch
240 update-run-tests.patch
241-recover-from-power-state-on-compute.patch

Subscribers

People subscribed via source and target branches