XenAPI: Don't use nicira-iface-id for XenServer VIF

When using neutron polling mode, booting a VM will timeout because
nova-compute cannot receive network-vif-plugged event. This is
because we set vif['id'](i.e. neutron port uuid) to two different
OVS ports. One is Xenserver VIF, the other is tap device qvo-XXXX
which neutron ovs agent will monitor and deal with.
My previous patch https://review.openstack.org/#/c/463246/ has
deprecated the setting of 'nicira-iface-id' to XenServer. This
patch is to remove the setting of 'nicira-iface-id'.

Closes-Bug: #1732624

Change-Id: I221e89686c8e9041651f5affc4e3542d75ff55bc
This commit is contained in:
Huan Xie 2017-03-29 20:48:40 -07:00
parent 9f46043f2f
commit fb8978b91e
4 changed files with 11 additions and 8 deletions

@ -47,7 +47,7 @@ def fake_call_xenapi(method, *args):
return {'uuid': fake_vif['uuid'],
'MAC': fake_vif['address'],
'network': 'fake_network',
'other_config': {'nicira-iface-id': fake_vif['id']}
'other_config': {'neutron-port-id': fake_vif['id']}
}
else:
raise exception.Exception("Failed get vif record")
@ -293,7 +293,6 @@ class XenAPIOpenVswitchDriverTestCase(XenVIFDriverTestBase):
'MAC': fake_vif['address'],
'network': 'fake_network',
'other_config': {
'nicira-iface-id': 'fake-nicira-iface-id',
'neutron-port-id': 'fake-neutron-port-id'}
}
mock_VIF_get_record = self.mock_patch_object(
@ -327,7 +326,6 @@ class XenAPIOpenVswitchDriverTestCase(XenVIFDriverTestBase):
'MAC': fake_vif['address'],
'network': 'fake_network',
'other_config': {
'nicira-iface-id': 'fake-nicira-iface-id',
'neutron-port-id': 'fake-neutron-port-id'}
}
mock_VIF_get_record = self.mock_patch_object(

@ -1793,8 +1793,8 @@ class LiveMigrateHelperTestCase(VMOpsTestBase):
'get_other_config') as mock_other_config, \
mock.patch.object(self._session.VM,
'get_VIFs') as mock_get_vif:
mock_other_config.side_effect = [{'nicira-iface-id': 'vif_id_a'},
{'nicira-iface-id': 'vif_id_b'}]
mock_other_config.side_effect = [{'neutron-port-id': 'vif_id_a'},
{'neutron-port-id': 'vif_id_b'}]
mock_get_vif.return_value = ['vif_ref1']
vif_uuid_map = {'': 'default_net_ref'}
vif_map = self.vmops._generate_vif_network_map('vm_ref',

@ -274,9 +274,7 @@ class XenAPIOpenVswitchDriver(XenVIFDriver):
vif_rec['MTU'] = '1500'
vif_rec['qos_algorithm_type'] = ''
vif_rec['qos_algorithm_params'] = {}
# Deprecated: 'niciria-iface-id', will remove it in the next release
vif_rec['other_config'] = {'nicira-iface-id': vif['id'],
'neutron-port-id': vif['id']}
vif_rec['other_config'] = {'neutron-port-id': vif['id']}
vif_ref = self._create_vif(vif, vif_rec, vm_ref)
# call XenAPI to plug vif

@ -0,0 +1,7 @@
---
upgrade:
- |
Setting of 'nicira-iface-id' in XenServer VIF's other-config
field by XenAPI driver has been removed to avoid VM booting
timeout problem when using neutron polling mode.
It was previously deprecated in Pike.