neutron-openvswitch-agent deletes existing other_config and thus breaks undercloud's MAC address assignment in tripleo
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Invalid
|
Undecided
|
Unassigned |
Bug Description
https:/
option can be set for bridge. Instead, it overwrites the entire other-config array and thus interferes with tripleo's undercloud settings where other-config:hwaddr is a requirement.
neutron-
The original bridge configuration is:
~~~
ov[root@
ovs-vsctl: unknown command 'list-bridge'; use --help for help
[root@undercloud-7 ~]# ovs-vsctl list bridge br-ctlplane
_uuid : d56235c5-
auto_attach : []
controller : []
datapath_id : "0000525400ec14c2"
datapath_type : ""
datapath_version : "<unknown>"
external_ids : {bridge-
fail_mode : standalone
flood_vlans : []
flow_tables : {}
ipfix : []
mcast_snooping_
mirrors : []
name : br-ctlplane
netflow : []
other_config : {hwaddr=
ports : [054cde3c-
protocols : []
rstp_enable : false
rstp_status : {}
sflow : []
status : {}
stp_enable : false
~~~
The new version of neutron-
~~~
2018-10-02 12:31:43.032 3949 DEBUG neutron.
~~~
Which removes the hwaddr:
~~~
[root@undercloud-7 ~]# ovs-vsctl list bridge br-ctlplane
_uuid : 334f1314-
auto_attach : []
controller : [505d73e7-
datapath_id : "000016134f330e4c"
datapath_type : system
datapath_version : "<unknown>"
external_ids : {bridge-
fail_mode : secure
flood_vlans : []
flow_tables : {}
ipfix : []
mcast_snooping_
mirrors : []
name : br-ctlplane
netflow : []
other_config : {mac-table-
ports : [18c205e9-
protocols : ["OpenFlow10", "OpenFlow13"]
rstp_enable : false
rstp_status : {}
sflow : []
status : {}
stp_enable : false
~~~
When it should run something similar to this manual command:
~~~
[root@undercloud-7 ~]# ovs-vsctl set bridge br-ctlplane other-config:
[root@undercloud-7 ~]# ovs-vsctl list bridge br-ctlplane
_uuid : d56235c5-
auto_attach : []
controller : []
datapath_id : "0000525400ec14c2"
datapath_type : ""
datapath_version : "<unknown>"
external_ids : {bridge-
fail_mode : standalone
flood_vlans : []
flow_tables : {}
ipfix : []
mcast_snooping_
mirrors : []
name : br-ctlplane
netflow : []
other_config : {hwaddr=
ports : [054cde3c-
protocols : []
rstp_enable : false
rstp_status : {}
sflow : []
status : {}
stp_enable : false
[root@undercloud-7 ~]#
[root@undercloud-7 ~]# ip link ls dev br-ctlplane
14: br-ctlplane: <BROADCAST,
link/ether 52:54:00:ec:14:c2 brd ff:ff:ff:ff:ff:ff
~~~
The neutron OVS agent issue can be reproduced manually:
~~~
[root@undercloud-7 ~]# ovs-vsctl set bridge br-ctlplane other-config=
[root@undercloud-7 ~]# ovs-vsctl list bridge br-ctlplane | grep other
other_config : {mac-table-
[root@undercloud-7 ~]# ip link ls dev br-ctlplane
14: br-ctlplane: <BROADCAST,
link/ether c6:35:62:d5:34:43 brd ff:ff:ff:ff:ff:ff
[root@undercloud-7 ~]#
~~~
Changed in neutron: | |
assignee: | nobody → Andreas Karis (akaris) |
Changed in neutron: | |
assignee: | Andreas Karis (akaris) → Brian Haley (brian-haley) |
status: | Invalid → In Progress |
Changed in neutron: | |
assignee: | Brian Haley (brian-haley) → nobody |
Changed in neutron: | |
status: | In Progress → Invalid |
This should fix it:
[root@undercloud-7 ~]# diff -u /usr/lib/ python2. 7/site- packages/ neutron/ agent/common/ ovs_lib. py{.bck, } python2. 7/site- packages/ neutron/ agent/common/ ovs_lib. py.bck 2018-10-02 13:46:50.075675926 -0400 python2. 7/site- packages/ neutron/ agent/common/ ovs_lib. py 2018-10-02 14:29:37.638086084 -0400
check_ error=True)
--- /usr/lib/
+++ /usr/lib/
@@ -226,8 +226,13 @@
def create(self, secure_mode=False): CONF.bridge_ mac_table_ size)} get_val( 'Bridge' , 'mac-table- size'] = str(cfg. CONF.bridge_ mac_table_ size) transaction( ) as txn:
txn. add(
self. ovsdb.add_ br(self. br_name,
- other_config = {
- 'mac-table-size': str(cfg.
+ other_config = self.db_
+ self.br_name, 'other_config')
+ if other_config is None:
+ other_config = {}
+
+ other_config[
+
with self.ovsdb.