Skip to content

Commit b06a892

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Revert "Handle Neutron errors in _post_live_migration()""
2 parents 49817d3 + 64b4271 commit b06a892

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

nova/compute/manager.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8432,14 +8432,7 @@ def _post_live_migration(self, ctxt, instance, dest,
84328432
# Releasing vlan.
84338433
# (not necessary in current implementation?)
84348434

8435-
network_info = None
8436-
try:
8437-
network_info = self.network_api.get_instance_nw_info(
8438-
ctxt, instance)
8439-
except Exception as e:
8440-
LOG.info('Unable to obtain network info: %s. Network info in '
8441-
'live.migration._post.start notification will be '
8442-
'omitted.', e, instance=instance)
8435+
network_info = self.network_api.get_instance_nw_info(ctxt, instance)
84438436

84448437
self._notify_about_instance_usage(ctxt, instance,
84458438
"live_migration._post.start",

nova/tests/functional/compute/test_live_migration.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,10 @@ def stub_plm(*args, **kwargs):
215215
with mock.patch.object(self.computes['src'].manager,
216216
'_post_live_migration',
217217
side_effect=stub_plm):
218-
self._live_migrate(server, 'completed')
218+
# FIXME(artom) Until bug 1879787 is fixed, the raised
219+
# ConnectionError will go unhandled, the migration will fail, and
220+
# the instance will still be reported as being on the source, even
221+
# though it's actually running on the destination.
222+
self._live_migrate(server, 'error', server_expected_state='ERROR')
219223
server = self.api.get_server(server['id'])
220-
self.assertEqual('dest', server['OS-EXT-SRV-ATTR:host'])
224+
self.assertEqual('src', server['OS-EXT-SRV-ATTR:host'])

0 commit comments

Comments
 (0)