NSX|V3+P: Fix mdproxy handling for vlan transparent
Commit I24aed399a478e2d391ab7b45fe38e53b77116abb missed some fields needed for the mdproxy skipping for vlan transparent networks. This commit changes the order of initialization of a new network to overcome this issue. Change-Id: I44699f033e529473b9c19d59962042f4a586c689
This commit is contained in:
parent
b2f3f49e9a
commit
84a09a82fc
|
@ -743,6 +743,11 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base):
|
|||
super(NsxPolicyPlugin, self).delete_network(
|
||||
context, net_id)
|
||||
|
||||
# this extra lookup is necessary to get the
|
||||
# latest db model for the extension functions
|
||||
net_model = self._get_network(context, net_id)
|
||||
resource_extend.apply_funcs('networks', created_net, net_model)
|
||||
|
||||
# MD Proxy is currently supported by the passthrough api only
|
||||
if is_backend_network and cfg.CONF.nsx_p.allow_passthrough:
|
||||
try:
|
||||
|
@ -755,11 +760,6 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base):
|
|||
LOG.error("Failed to create mdproxy port for network %s: %s",
|
||||
net_id, e)
|
||||
|
||||
# this extra lookup is necessary to get the
|
||||
# latest db model for the extension functions
|
||||
net_model = self._get_network(context, net_id)
|
||||
resource_extend.apply_funcs('networks', created_net, net_model)
|
||||
|
||||
# Update the QoS policy (will affect only future compute ports)
|
||||
qos_com_utils.set_qos_policy_on_new_net(
|
||||
context, net_data, created_net)
|
||||
|
|
|
@ -970,6 +970,12 @@ class NsxV3Plugin(nsx_plugin_common.NsxPluginV3Base,
|
|||
{'network': {'vlan_transparent': vlt}})
|
||||
|
||||
rollback_network = True
|
||||
|
||||
# this extra lookup is necessary to get the
|
||||
# latest db model for the extension functions
|
||||
net_model = self._get_network(context, created_net['id'])
|
||||
resource_extend.apply_funcs('networks', created_net, net_model)
|
||||
|
||||
if is_backend_network:
|
||||
self._create_net_mdproxy_port(
|
||||
context, created_net, az, nsx_net_id)
|
||||
|
@ -990,11 +996,6 @@ class NsxV3Plugin(nsx_plugin_common.NsxPluginV3Base,
|
|||
super(NsxV3Plugin, self).delete_network(
|
||||
context, created_net['id'])
|
||||
|
||||
# this extra lookup is necessary to get the
|
||||
# latest db model for the extension functions
|
||||
net_model = self._get_network(context, created_net['id'])
|
||||
resource_extend.apply_funcs('networks', created_net, net_model)
|
||||
|
||||
# Update the QoS policy (will affect only future compute ports)
|
||||
qos_com_utils.set_qos_policy_on_new_net(
|
||||
context, net_data, created_net)
|
||||
|
|
Loading…
Reference in New Issue