Cannot provision flat network after reconfiguring physical bridges
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Medium
|
Anton Kurbatov |
Bug Description
I ran into a problem when the network connectivity inside the newly created VM is not working.
* Pre-conditions:
- the neutron ovs agent has not yet seen any ports from the VM network;
- any other bridge (except for the network in which the VM is created) is recreated on the node.
* Step-by-step reproduction steps:
The bridge mapping from ml2_conf.ini looks like:
[ovs]
bridge_mappings = Public:
The 'Test:br-test' mapping is a test bridge to demonstrate the problem.
I've created it using ovs-vsctl tool like: ovs-vsctl add-br br-test.
1) Recreate this test bridge that triggers _reconfigure_
[root@sqvm2-2009 ~]# ovs-vsctl del-br br-test; ovs-vsctl add-br br-test
[root@sqvm2-2009 ~]#
2) Create the first VM from the 'public' network that is mapped to the 'Public' bridge and try to ping it:
---
[root@sqvm2-2009 ~]# openstack server create test-vm --image cirros --flavor 100 --network public --boot-from-volume 1
[root@sqvm2-2009 ~]# openstack server list
+------
| ID | Name | Status | Networks | Image | Flavor |
+------
| 68c32b4d-
+------
[root@sqvm2-2009 ~]# virsh console 68c32b4d-
Connected to domain instance-00000005
Escape character is ^]
login as 'cirros' user. default password: 'gocubsgo'. use 'sudo' for root.
cirros login: cirros
Password:
$ sudo ip addr add 10.34.111.12/18 dev eth0
$ ip a s eth0
2: eth0: <BROADCAST,
link/ether fa:16:3e:67:f8:4e brd ff:ff:ff:ff:ff:ff
inet 10.34.111.12/18 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::f816:
valid_lft forever preferred_lft forever
$
[root@sqvm2-2009 ~]# ping 10.34.111.12
PING 10.34.111.12 (10.34.111.12) 56(84) bytes of data.
From 10.34.66.138 icmp_seq=1 Destination Host Unreachable
From 10.34.66.138 icmp_seq=2 Destination Host Unreachable
From 10.34.66.138 icmp_seq=3 Destination Host Unreachable
From 10.34.66.138 icmp_seq=4 Destination Host Unreachable
^C
--- 10.34.111.12 ping statistics ---
5 packets transmitted, 0 received, +4 errors, 100% packet loss, time 4000ms
pipe 4
[root@sqvm2-2009 ~]#
---
* Actual result:
The VM is not pingable, but should be.
See the logs of port processing below:
2021-05-24 17:28:29.776 13744 INFO neutron.
2021-05-24 17:28:29.776 13744 INFO neutron.
2021-05-24 17:28:29.777 13744 ERROR neutron.
* Version:
Stein release.
The issue is also reproducible on the master branch.
* Attachments:
Full neutron-
description: | updated |
Changed in neutron: | |
assignee: | nobody → Anton Kurbatov (akurbatov) |
Changed in neutron: | |
importance: | Undecided → Medium |
I would like someone to confirm that this bug have place, may be Slawek Kaplonski as the author of physical_ bridges in ovs agent.
_reconfigure_
I am new to contributing to openstack. Let me send the patch myself.
This patch fixes the issue:
diff --git a/neutron/ plugins/ ml2/drivers/ openvswitch/ agent/ovs_ neutron_ agent.py b/neutron/ plugins/ ml2/drivers/ openvswitch/ agent/ovs_ neutron_ agent.py plugins/ ml2/drivers/ openvswitch/ agent/ovs_ neutron_ agent.py plugins/ ml2/drivers/ openvswitch/ agent/ovs_ neutron_ agent.py (l2population_ rpc.L2populatio nRpcCallBackTun nelMixin, mappings. items() }
index 2c209bd..cfe0534 100644
--- a/neutron/
+++ b/neutron/
@@ -225,6 +225,9 @@ class OVSNeutronAgent
{k: [v] for k, v in self.bridge_
)
+ self.phys_brs = {}
self. setup_physical_ bridges( self.bridge_ mappings)
self. vlan_manager = vlanmanager. LocalVlanManage r()
+ self.int_ofports = {}
+ self.phys_ofports = {}
@@ -1485,9 +1488,6 @@ class OVSNeutronAgent (l2population_ rpc.L2populatio nRpcCallBackTun nelMixin,
:param bridge_mappings: map physical network names to bridge names.
datapath_ ids_set = set()
ovs_bridges = ovs.get_bridges()
'''
- self.phys_brs = {}
- self.int_ofports = {}
- self.phys_ofports = {}
ovs = ovs_lib.BaseOVS()