2022-10-21 12:04:11 |
alecorps |
description |
VMware DVS plugin
Starting on Neutron stable/victoria and newer versions.
Since Victoria release, "replace_port" function has been modified in ovs_lib (https://github.com/openstack/neutron/blob/stable/victoria/neutron/agent/common/ovs_lib.py#L359) and create, by default, the interface in vlan_mode trunk and trunks 4095 instead of vlan_mode access without trunks.
When you are using, Neutron VMware DVS plugin, the DHCP interface is created with this lib and should be reachable. For example, with a neutron node as a VM with a trunk portgroup, this modification cause an issue. With the vlan_mode trunk and trunks 4095, your dhcp interface is not reachable.
Actual result on openvswitch :
ovs-vsctl show
Bridge br-dvs
...
Port "tapxxx"
tag: 210
trunks: [4095]
Interface "internal"
Expected result :
ovs-vsctl show
Bridge br-dvs
...
Port "tapxxx"
tag: 210
Interface "internal"
The workaround is to remove the line 359 (https://github.com/openstack/neutron/blob/stable/victoria/neutron/agent/common/ovs_lib.py#L359) but should be implemented directly in the vmware-nsx plugin I guess. |
VMware DVS plugin
Starting on Neutron stable/victoria and newer versions.
Since Victoria release, "replace_port" function has been modified in ovs_lib (https://github.com/openstack/neutron/blob/stable/victoria/neutron/agent/common/ovs_lib.py#L359) and create, by default, the interface in vlan_mode trunk and trunks 4095 instead of vlan_mode access without trunks.
When you are using, Neutron VMware DVS plugin, the DHCP interface is created with this lib and should be reachable. For example, with a neutron node as a VM with a trunk portgroup, this modification cause an issue. With the vlan_mode trunk and trunks 4095, your dhcp interface is not reachable.
Actual result on openvswitch :
ovs-vsctl show
Bridge br-dvs
...
Port "tapxxx"
tag: 210
trunks: [4095]
Interface "internal"
Expected result :
ovs-vsctl show
Bridge br-dvs
...
Port "tapxxx"
tag: 210
Interface "internal"
In https://opendev.org/x/vmware-nsx/src/branch/master/vmware_nsx/plugins/dvs/dhcp.py, we could replace the line 57 "br_dvs.set_db_attribute("Port", dvs_port_name, "tag", vlan_tag)"
by
ovsdb = br_dvs.ovsdb
with ovsdb.transaction() as txn:
txn.add(ovsdb.db_set('Port', dvs_port_name, ('tag', vlan_tag)))
txn.add(ovsdb.db_clear('Port', dvs_port_name, 'vlan_mode'))
txn.add(ovsdb.db_clear('Port', dvs_port_name, 'trunks'))
I will try to push you a PR on that soon |
|