Merge "Ensure that vif ports are unplugged during failover migration"
This commit is contained in:
commit
3ab2ee6390
|
@ -130,8 +130,6 @@ class ClusterOps(object):
|
|||
# to treat it as a failover.
|
||||
LOG.debug('Instance %s is live migrating.', instance_name)
|
||||
return
|
||||
if instance.host.upper() == self._this_node.upper():
|
||||
return
|
||||
|
||||
nw_info = self._network_api.get_instance_nw_info(self._context,
|
||||
instance)
|
||||
|
|
|
@ -170,18 +170,6 @@ class ClusterOpsTestCase(test_base.HyperVBaseTestCase):
|
|||
mock_LOG.debug.assert_called_once_with(
|
||||
'Instance %s is live migrating.', mock.sentinel.instance_name)
|
||||
|
||||
@mock.patch.object(clusterops.ClusterOps, '_get_instance_by_name')
|
||||
def test_failover_migrate_same_host(self, mock_get_instance_by_name):
|
||||
instance = mock_get_instance_by_name.return_value
|
||||
instance.host = self.clusterops._this_node
|
||||
|
||||
self.clusterops._failover_migrate(mock.sentinel.instance_name,
|
||||
mock.sentinel.old_host,
|
||||
mock.sentinel.new_host)
|
||||
|
||||
self.assertFalse(
|
||||
self.clusterops._network_api.get_instance_nw_info.called)
|
||||
|
||||
@mock.patch.object(clusterops.ClusterOps, '_get_instance_by_name')
|
||||
def test_failover_migrate_at_source_node(self, mock_get_instance_by_name):
|
||||
instance = mock_get_instance_by_name.return_value
|
||||
|
|
Loading…
Reference in New Issue