Support just waiting for created vif events
In a previous change, we introduced the concept of new VIFs versus updated VIFs. This change fixes an issue where the create flow would wait for neutron to send events for ALL of the vifs. It should only be waiting for events for the created vifs, otherwise it waits until the 5 minute timeout and fails. Change-Id: I02fe4d32e1d4e83672758a8d143153ecbb227515 Closes-Bug: 1618208
This commit is contained in:
@@ -332,6 +332,7 @@ class TestNetwork(test.TestCase):
|
||||
# Set up the runner.
|
||||
p_vifs = tf_net.PlugVifs(mock.MagicMock(), self.apt, inst, net_info,
|
||||
'host_uuid', 'slot_mgr')
|
||||
p_vifs.crt_network_infos = net_info
|
||||
|
||||
# Mock that neutron is off.
|
||||
mock_is_neutron.return_value = False
|
||||
|
||||
@@ -223,7 +223,7 @@ class PlugVifs(pvm_task.PowerVMTask):
|
||||
if (utils.is_neutron() and CONF.vif_plugging_is_fatal and
|
||||
CONF.vif_plugging_timeout):
|
||||
return [('network-vif-plugged', network_info['id'])
|
||||
for network_info in self.network_infos
|
||||
for network_info in self.crt_network_infos
|
||||
if not network_info.get('active', True)]
|
||||
else:
|
||||
return []
|
||||
|
||||
Reference in New Issue
Block a user