Bug 1533653
Summary: | VXLAN port type cast error - impossible to change VXLAN port from defaults in neutron-openvswitch-agent | |||
---|---|---|---|---|
Product: | Red Hat OpenStack | Reporter: | Andreas Karis <akaris> | |
Component: | openstack-neutron | Assignee: | Jakub Libosvar <jlibosva> | |
Status: | CLOSED ERRATA | QA Contact: | Roee Agiman <ragiman> | |
Severity: | high | Docs Contact: | ||
Priority: | high | |||
Version: | 10.0 (Newton) | CC: | amuller, chrisw, jlibosva, nyechiel, srevivo | |
Target Milestone: | z7 | Keywords: | Triaged, ZStream | |
Target Release: | 10.0 (Newton) | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | openstack-neutron-9.4.1-11.el7ost | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1533883 1533884 1533885 1533886 1533887 (view as bug list) | Environment: | ||
Last Closed: | 2018-02-27 16:42:42 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1533883, 1533884, 1533885, 1533886, 1533887 |
Description
Andreas Karis
2018-01-11 21:57:55 UTC
Error in neutron-openvswitch-agent logs: /var/log/neutron/openvswitch-agent.log ~~~ [root@overcloud-compute-0 site-packages]# grep 'tunnel port to' /var/log/neutron/openvswitch-agent.log 2018-01-11 18:21:11.684 10070 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent [req-8eea42df-f5b3-4011-90e4-2a3bd31f3caa - - - - -] Failed to set-up vxlan tunnel port to 172.16.0.6 2018-01-11 18:21:11.795 10070 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent [req-8eea42df-f5b3-4011-90e4-2a3bd31f3caa - - - - -] Failed to set-up vxlan tunnel port to 172.16.0.7 2018-01-11 18:21:55.393 10232 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent [req-480ebd2c-7b63-44d4-b271-8d980aa19755 - - - - -] Failed to set-up vxlan tunnel port to 172.16.0.6 2018-01-11 18:21:55.509 10232 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent [req-480ebd2c-7b63-44d4-b271-8d980aa19755 - - - - -] Failed to set-up vxlan tunnel port to 172.16.0.7 2018-01-11 18:34:28.145 10782 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent [req-101d6067-a9e3-4803-b24b-1b1b2dae6292 - - - - -] Failed to set-up vxlan tunnel port to 172.16.0.6 2018-01-11 18:34:28.255 10782 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent [req-101d6067-a9e3-4803-b24b-1b1b2dae6292 - - - - -] Failed to set-up vxlan tunnel port to 172.16.0.7 ~~~ Code: /usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py ~~~ 1444 LOG.error(_LE("Invalid local or remote IP, cannot create tunnel: " 1445 "local_ip=%(lip)s remote_ip=%(rip)s"), 1446 {'lip': self.local_ip, 'rip': remote_ip}) 1447 return 0 1448 ofport = br.add_tunnel_port(port_name, 1449 remote_ip, 1450 self.local_ip, 1451 tunnel_type, 1452 self.vxlan_udp_port, 1453 self.dont_fragment, 1454 self.tunnel_csum) 1455 if ofport == ovs_lib.INVALID_OFPORT: 1456 LOG.error(_LE("Failed to set-up %(type)s tunnel port to %(ip)s"), 1457 {'type': tunnel_type, 'ip': remote_ip}) 1458 return 0 ~~~ ~~~ [root@overcloud-compute-0 neutron]# grep add_tunnel_port -RI | grep def tests/functional/agent/test_ovs_lib.py: def _test_add_tunnel_port(self, attrs): tests/functional/agent/test_ovs_lib.py: def test_add_tunnel_port_ipv4(self): tests/functional/agent/test_ovs_lib.py: def test_add_tunnel_port_ipv6(self): tests/unit/plugins/ml2/drivers/openvswitch/agent/openflow/ovs_ofctl/test_br_tun.py: def _mock_add_tunnel_port(self, deferred_br=False): tests/unit/plugins/ml2/drivers/openvswitch/agent/openflow/ovs_ofctl/test_br_tun.py: ofport = deferred_br.add_tunnel_port(port_name, remote_ip, tests/unit/plugins/ml2/drivers/openvswitch/agent/openflow/ovs_ofctl/test_br_tun.py: def test_add_tunnel_port(self): tests/unit/plugins/ml2/drivers/openvswitch/agent/openflow/ovs_ofctl/test_br_tun.py: def test_deferred_br_add_tunnel_port(self): tests/unit/agent/common/test_ovs_lib.py: def test_add_tunnel_port(self): agent/common/ovs_lib.py: def add_tunnel_port(self, port_name, remote_ip, local_ip, ~~~ Made the following change: /usr/lib/python2.7/site-packages/neutron/agent/common/ovs_lib.py ~~~ 351 def add_tunnel_port(self, port_name, remote_ip, local_ip, 352 tunnel_type=p_const.TYPE_GRE, 353 vxlan_udp_port=p_const.VXLAN_UDP_PORT, 354 dont_fragment=True, 355 tunnel_csum=False): 356 attrs = [('type', tunnel_type)] 357 # TODO(twilson) This is an OrderedDict solely to make a test happy 358 options = collections.OrderedDict() 359 vxlan_uses_custom_udp_port = ( 360 tunnel_type == p_const.TYPE_VXLAN and 361 vxlan_udp_port != p_const.VXLAN_UDP_PORT 362 ) 363 if vxlan_uses_custom_udp_port: 364 options['dst_port'] = vxlan_udp_port 365 options['df_default'] = str(dont_fragment).lower() 366 options['remote_ip'] = remote_ip 367 options['local_ip'] = local_ip 368 options['in_key'] = 'flow' 369 options['out_key'] = 'flow' 370 if tunnel_csum: 371 options['csum'] = str(tunnel_csum).lower() 372 attrs.append(('options', options)) ++ 373 print(repr(attrs)) 374 return self.add_port(port_name, *attrs) ~~~ ~~~ ovs-vsctl del-port vxlan-ac100007 ovs-vsctl del-port vxlan-ac100006 crudini --set /etc/neutron/plugins/ml2/openvswitch_agent.ini agent vxlan_udp_port 9999 /usr/bin/python2 /usr/bin/neutron-openvswitch-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/openvswitch_agent.ini --config-dir /etc/neutron/conf.d/common --config-dir /etc/neutron/conf.d/neutron-openvswitch-agent --log-file /var/log/neutron/openvswitch-agent.log ~~~ Output: ~~~ Guru meditation now registers SIGUSR1 and SIGUSR2 by default for backward compatibility. SIGUSR1 will no longer be registered in a future release, so please use SIGUSR2 to generate reports. Option "verbose" from group "DEFAULT" is deprecated for removal. Its value may be silently ignored in the future. Option "rpc_backend" from group "DEFAULT" is deprecated for removal. Its value may be silently ignored in the future. Option "notification_driver" from group "DEFAULT" is deprecated. Use option "driver" from group "oslo_messaging_notifications". [('type', 'vxlan'), ('options', OrderedDict([('dst_port', 9999), ('df_default', 'true'), ('remote_ip', u'172.16.0.6'), ('local_ip', '172.16.0.5'), ('in_key', 'flow'), ('out_key', 'flow')]))] [('type', 'vxlan'), ('options', OrderedDict([('dst_port', 9999), ('df_default', 'true'), ('remote_ip', u'172.16.0.7'), ('local_ip', '172.16.0.5'), ('in_key', 'flow'), ('out_key', 'flow')]))] ~~~ ~~~ ovs-vsctl del-port vxlan-ac100007 ovs-vsctl del-port vxlan-ac100006 crudini --set /etc/neutron/plugins/ml2/openvswitch_agent.ini agent vxlan_udp_port 4789 /usr/bin/python2 /usr/bin/neutron-openvswitch-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/openvswitch_agent.ini --config-dir /etc/neutron/conf.d/common --config-dir /etc/neutron/conf.d/neutron-openvswitch-agent --log-file /var/log/neutron/openvswitch-agent.log ~~~ Output: ~~~ [root@overcloud-compute-0 neutron]# ovs-vsctl del-port vxlan-ac100007 ovs-vsctl: no port named vxlan-ac100007 [root@overcloud-compute-0 neutron]# ovs-vsctl del-port vxlan-ac100006 ovs-vsctl: no port named vxlan-ac100006 [root@overcloud-compute-0 neutron]# crudini --set /etc/neutron/plugins/ml2/openvswitch_agent.ini agent vxlan_udp_port 4789 [root@overcloud-compute-0 neutron]# /usr/bin/python2 /usr/bin/neutron-openvswitch-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/openvswitch_agent.ini --config-dir /etc/neutron/conf.d/common --config-dir /etc/neutron/conf.d/neutron-openvswitch-agent --log-file /var/log/neutron/openvswitch-agent.log Guru meditation now registers SIGUSR1 and SIGUSR2 by default for backward compatibility. SIGUSR1 will no longer be registered in a future release, so please use SIGUSR2 to generate reports. Option "verbose" from group "DEFAULT" is deprecated for removal. Its value may be silently ignored in the future. Option "rpc_backend" from group "DEFAULT" is deprecated for removal. Its value may be silently ignored in the future. Option "notification_driver" from group "DEFAULT" is deprecated. Use option "driver" from group "oslo_messaging_notifications". [('type', 'vxlan'), ('options', OrderedDict([('df_default', 'true'), ('remote_ip', u'172.16.0.6'), ('local_ip', '172.16.0.5'), ('in_key', 'flow'), ('out_key', 'flow')]))] [('type', 'vxlan'), ('options', OrderedDict([('df_default', 'true'), ('remote_ip', u'172.16.0.7'), ('local_ip', '172.16.0.5'), ('in_key', 'flow'), ('out_key', 'flow')]))] ^C[root@overcloud-compute-0 neutron]# ~~~ The problem is that 9999 is an integer and not a string: agent/common/ovs_lib.py ~~~ 240 def add_port(self, port_name, *interface_attr_tuples): 241 with self.ovsdb.transaction() as txn: 242 txn.add(self.ovsdb.add_port(self.br_name, port_name)) 243 if interface_attr_tuples: 244 if interface_attr_tuples[0][1] == 'vxlan': 245 import pdb; pdb.set_trace() 246 txn.add(self.ovsdb.db_set('Interface', port_name, 247 *interface_attr_tuples)) 248 return self.get_port_ofport(port_name) ~~~ ~~~ [root@overcloud-compute-0 neutron]# /usr/bin/python2 /usr/bin/neutron-openvswitch-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/openvswitch_agent.ini --config-dir /etc/neutron/conf.d/common --config-dir /etc/neutron/conf.d/neutron-openvswitch-agent --log-file /var/log/neutron/openvswitch-agent.log Guru meditation now registers SIGUSR1 and SIGUSR2 by default for backward compatibility. SIGUSR1 will no longer be registered in a future release, so please use SIGUSR2 to generate reports. Option "verbose" from group "DEFAULT" is deprecated for removal. Its value may be silently ignored in the future. Option "rpc_backend" from group "DEFAULT" is deprecated for removal. Its value may be silently ignored in the future. Option "notification_driver" from group "DEFAULT" is deprecated. Use option "driver" from group "oslo_messaging_notifications". > /usr/lib/python2.7/site-packages/neutron/agent/common/ovs_lib.py(246)add_port() -> txn.add(self.ovsdb.db_set('Interface', port_name, (Pdb) ? Documented commands (type help <topic>): ======================================== EOF bt cont enable jump pp run unt a c continue exit l q s until alias cl d h list quit step up args clear debug help n r tbreak w b commands disable ignore next restart u whatis break condition down j p return unalias where Miscellaneous help topics: ========================== exec pdb Undocumented commands: ====================== retval rv (Pdb) s > /usr/lib/python2.7/site-packages/neutron/agent/common/ovs_lib.py(247)add_port() -> *interface_attr_tuples)) (Pdb) s --Call-- > /usr/lib/python2.7/site-packages/neutron/agent/ovsdb/impl_idl.py(252)db_set() -> def db_set(self, table, record, *col_values): (Pdb) a self = <neutron.agent.ovsdb.impl_idl.OvsdbIdl object at 0x5a2e450> table = Interface record = vxlan-ac100006 col_values = (('type', 'vxlan'), ('options', OrderedDict([('dst_port', 9999), ('df_default', 'true'), ('remote_ip', u'172.16.0.6'), ('local_ip', '172.16.0.5'), ('in_key', 'flow'), ('out_key', 'flow')]))) (Pdb) s > /usr/lib/python2.7/site-packages/neutron/agent/ovsdb/impl_idl.py(253)db_set() -> return cmd.DbSetCommand(self, table, record, *col_values) (Pdb) a self = <neutron.agent.ovsdb.impl_idl.OvsdbIdl object at 0x5a2e450> table = Interface record = vxlan-ac100006 col_values = (('type', 'vxlan'), ('options', OrderedDict([('dst_port', 9999), ('df_default', 'true'), ('remote_ip', u'172.16.0.6'), ('local_ip', '172.16.0.5'), ('in_key', 'flow'), ('out_key', 'flow')]))) (Pdb) s --Call-- > /usr/lib/python2.7/site-packages/neutron/agent/ovsdb/native/commands.py(238)__init__() -> def __init__(self, api, table, record, *col_values): (Pdb) a self = DbSetCommand() api = <neutron.agent.ovsdb.impl_idl.OvsdbIdl object at 0x5a2e450> table = Interface record = vxlan-ac100006 col_values = (('type', 'vxlan'), ('options', OrderedDict([('dst_port', 9999), ('df_default', 'true'), ('remote_ip', u'172.16.0.6'), ('local_ip', '172.16.0.5'), ('in_key', 'flow'), ('out_key', 'flow')]))) (Pdb) s > /usr/lib/python2.7/site-packages/neutron/agent/ovsdb/native/commands.py(239)__init__() -> super(DbSetCommand, self).__init__(api) (Pdb) a self = DbSetCommand() api = <neutron.agent.ovsdb.impl_idl.OvsdbIdl object at 0x5a2e450> table = Interface record = vxlan-ac100006 col_values = (('type', 'vxlan'), ('options', OrderedDict([('dst_port', 9999), ('df_default', 'true'), ('remote_ip', u'172.16.0.6'), ('local_ip', '172.16.0.5'), ('in_key', 'flow'), ('out_key', 'flow')]))) (Pdb) s --Call-- > /usr/lib/python2.7/site-packages/neutron/agent/ovsdb/native/commands.py(28)__init__() -> def __init__(self, api): (Pdb) s > /usr/lib/python2.7/site-packages/neutron/agent/ovsdb/native/commands.py(29)__init__() -> self.api = api (Pdb) a self = DbSetCommand() api = <neutron.agent.ovsdb.impl_idl.OvsdbIdl object at 0x5a2e450> (Pdb) s > /usr/lib/python2.7/site-packages/neutron/agent/ovsdb/native/commands.py(30)__init__() -> self.result = None (Pdb) a self = DbSetCommand() api = <neutron.agent.ovsdb.impl_idl.OvsdbIdl object at 0x5a2e450> (Pdb) s --Return-- > /usr/lib/python2.7/site-packages/neutron/agent/ovsdb/native/commands.py(30)__init__()->None -> self.result = None (Pdb) a self = DbSetCommand() api = <neutron.agent.ovsdb.impl_idl.OvsdbIdl object at 0x5a2e450> (Pdb) s > /usr/lib/python2.7/site-packages/neutron/agent/ovsdb/native/commands.py(240)__init__() -> self.table = table (Pdb) s > /usr/lib/python2.7/site-packages/neutron/agent/ovsdb/native/commands.py(241)__init__() -> self.record = record (Pdb) n > /usr/lib/python2.7/site-packages/neutron/agent/ovsdb/native/commands.py(242)__init__() -> self.col_values = col_values (Pdb) n --Return-- > /usr/lib/python2.7/site-packages/neutron/agent/ovsdb/native/commands.py(242)__init__()->None -> self.col_values = col_values (Pdb) n --Return-- > /usr/lib/python2.7/site-packages/neutron/agent/ovsdb/impl_idl.py(253)db_set()->DbSetCom...ac100006) -> return cmd.DbSetCommand(self, table, record, *col_values) (Pdb) a self = <neutron.agent.ovsdb.impl_idl.OvsdbIdl object at 0x5a2e450> table = Interface record = vxlan-ac100006 col_values = (('type', 'vxlan'), ('options', OrderedDict([('dst_port', 9999), ('df_default', 'true'), ('remote_ip', u'172.16.0.6'), ('local_ip', '172.16.0.5'), ('in_key', 'flow'), ('out_key', 'flow')]))) (Pdb) p *** SyntaxError: SyntaxError('unexpected EOF while parsing', ('<string>', 0, 0, '')) (Pdb) ? Documented commands (type help <topic>): ======================================== EOF bt cont enable jump pp run unt a c continue exit l q s until alias cl d h list quit step up args clear debug help n r tbreak w b commands disable ignore next restart u whatis break condition down j p return unalias where Miscellaneous help topics: ========================== exec pdb Undocumented commands: ====================== retval rv (Pdb) w /usr/lib/python2.7/site-packages/eventlet/greenthread.py(214)main() -> result = function(*args, **kwargs) /usr/lib/python2.7/site-packages/ryu/lib/hub.py(54)_launch() -> return func(*args, **kwargs) /usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/ovs_ryuapp.py(43)agent_main_wrapper() -> ovs_agent.main(bridge_classes) /usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py(2185)main() -> agent.daemon_loop() /usr/lib/python2.7/site-packages/osprofiler/profiler.py(154)wrapper() -> return f(*args, **kwargs) /usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py(2103)daemon_loop() -> self.rpc_loop(polling_manager=pm) /usr/lib/python2.7/site-packages/osprofiler/profiler.py(154)wrapper() -> return f(*args, **kwargs) /usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py(2007)rpc_loop() -> tunnel_sync = self.tunnel_sync() /usr/lib/python2.7/site-packages/osprofiler/profiler.py(154)wrapper() -> return f(*args, **kwargs) /usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py(1734)tunnel_sync() -> tunnel_type) /usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py(1454)_setup_tunnel_port() -> self.tunnel_csum) /usr/lib/python2.7/site-packages/neutron/agent/common/ovs_lib.py(375)add_tunnel_port() -> return self.add_port(port_name, *attrs) /usr/lib/python2.7/site-packages/neutron/agent/common/ovs_lib.py(247)add_port() -> *interface_attr_tuples)) > /usr/lib/python2.7/site-packages/neutron/agent/ovsdb/impl_idl.py(253)db_set()->DbSetCom...ac100006) -> return cmd.DbSetCommand(self, table, record, *col_values) (Pdb) n --Call-- > /usr/lib/python2.7/site-packages/neutron/agent/ovsdb/impl_idl.py(55)add() -> def add(self, command): (Pdb) n > /usr/lib/python2.7/site-packages/neutron/agent/ovsdb/impl_idl.py(61)add() -> self.commands.append(command) (Pdb) n > /usr/lib/python2.7/site-packages/neutron/agent/ovsdb/impl_idl.py(62)add() -> return command (Pdb) n --Return-- > /usr/lib/python2.7/site-packages/neutron/agent/ovsdb/impl_idl.py(62)add()->DbSetCom...ac100006) -> return command (Pdb) --Call-- > /usr/lib/python2.7/site-packages/neutron/agent/ovsdb/api.py(74)__exit__() -> def __exit__(self, exc_type, exc_val, tb): (Pdb) > /usr/lib/python2.7/site-packages/neutron/agent/ovsdb/api.py(75)__exit__() -> if exc_type is None: (Pdb) > /usr/lib/python2.7/site-packages/neutron/agent/ovsdb/api.py(76)__exit__() -> self.result = self.commit() (Pdb) --Return-- > /usr/lib/python2.7/site-packages/neutron/agent/ovsdb/api.py(76)__exit__()->None -> self.result = self.commit() (Pdb) > /usr/lib/python2.7/site-packages/neutron/agent/common/ovs_lib.py(248)add_port() -> return self.get_port_ofport(port_name) (Pdb) --Return-- > /usr/lib/python2.7/site-packages/neutron/agent/common/ovs_lib.py(248)add_port()->-1 -> return self.get_port_ofport(port_name) (Pdb) --Return-- > /usr/lib/python2.7/site-packages/neutron/agent/common/ovs_lib.py(375)add_tunnel_port()->-1 -> return self.add_port(port_name, *attrs) (Pdb) > /usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py(1455)_setup_tunnel_port() -> if ofport == ovs_lib.INVALID_OFPORT: (Pdb) > /usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py(1456)_setup_tunnel_port() -> LOG.error(_LE("Failed to set-up %(type)s tunnel port to %(ip)s"), (Pdb) > /usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py(1457)_setup_tunnel_port() -> {'type': tunnel_type, 'ip': remote_ip}) (Pdb) ~~~ I changed the code to convert the input into a string, and it works now: plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py ~~~ 197 self.tunnel_count = 0 198 # akaris 199 self.vxlan_udp_port = str(agent_conf.vxlan_udp_port) 200 self.dont_fragment = agent_conf.dont_fragment 201 self.tunnel_csum = agent_conf.tunnel_csum 202 self.tun_br = None 203 self.patch_int_ofport = constants.OFPORT_INVALID ~~~ ~~~ [root@overcloud-compute-0 neutron]# /usr/bin/python2 /usr/bin/neutron-openvswitch-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/openvswitch_agent.ini --config-dir /etc/neutron/conf.d/common --config-dir /etc/neutron/conf.d/neutron-openvswitch-agent --log-file /var/log/neutron/openvswitch-agent.log Guru meditation now registers SIGUSR1 and SIGUSR2 by default for backward compatibility. SIGUSR1 will no longer be registered in a future release, so please use SIGUSR2 to generate reports. Option "verbose" from group "DEFAULT" is deprecated for removal. Its value may be silently ignored in the future. Option "rpc_backend" from group "DEFAULT" is deprecated for removal. Its value may be silently ignored in the future. Option "notification_driver" from group "DEFAULT" is deprecated. Use option "driver" from group "oslo_messaging_notifications". (('type', 'patch'), ('options', {'peer': 'patch-int'})) (('type', 'patch'), ('options', {'peer': 'patch-tun'})) (('type', 'vxlan'), ('options', OrderedDict([('dst_port', '9999'), ('df_default', 'true'), ('remote_ip', u'172.16.0.6'), ('local_ip', '172.16.0.5'), ('in_key', 'flow'), ('out_key', 'flow')]))) (('type', 'vxlan'), ('options', OrderedDict([('dst_port', '9999'), ('df_default', 'true'), ('remote_ip', u'172.16.0.7'), ('local_ip', '172.16.0.5'), ('in_key', 'flow'), ('out_key', 'flow')]))) ^C[root@overcloud-compute-0 neutron]# ~~~ ~~~ [root@overcloud-compute-0 site-packages]# ovs-vsctl show | grep vxlan Port "vxlan-ac100007" Interface "vxlan-ac100007" type: vxlan Port "vxlan-ac100006" Interface "vxlan-ac100006" type: vxlan [root@overcloud-compute-0 site-packages]# ~~~ I confirmed the behavior on a second OSP 10 test cluster: ~~~ [root@overcloud-compute-0 ~]# crudini --set /etc/neutron/plugins/ml2/openvswitch_agent.ini agent vxlan_udp_port 9999 [root@overcloud-compute-0 ~]# ovs-vsctl del-port vxlan-ac100006 [root@overcloud-compute-0 ~]# ovs-vsctl del-port vxlan-ac10000e [root@overcloud-compute-0 ~]# systemctl restart neutron-openvswitch-agent [root@overcloud-compute-0 ~]# ovs-vsctl show | grep vxlan Port "vxlan-ac100006" Interface "vxlan-ac100006" type: vxlan error: "vxlan-ac100006: could not set configuration (Invalid argument)" Port "vxlan-ac10000e" Interface "vxlan-ac10000e" type: vxlan error: "vxlan-ac10000e: could not set configuration (Invalid argument)" [root@overcloud-compute-0 ~]# ~~~ ~~~ [root@overcloud-compute-0 ~]# crudini --set /etc/neutron/plugins/ml2/openvswitch_agent.ini agent vxlan_udp_port 4789 [root@overcloud-compute-0 ~]# systemctl restart neutron-openvswitch-agent [root@overcloud-compute-0 ~]# ovs-vsctl show | grep vxlan Port "vxlan-ac100006" Interface "vxlan-ac100006" type: vxlan Port "vxlan-ac10000e" Interface "vxlan-ac10000e" type: vxlan ~~~ RPM version: openstack-neutron-openvswitch-9.4.1-5.el7ost.noarch It should be an integer, without quotes, according to: https://docs.openstack.org/mitaka/config-reference/networking/networking_options_reference.html https://docs.openstack.org/newton/config-reference/networking/samples/openvswitch_agent.ini.html It's the same in OSP 11: ~~~ [root@overcloud-compute-0 ~]# ovs-vsctl show | grep vxlan Port "vxlan-ac100009" Interface "vxlan-ac100009" type: vxlan Port "vxlan-ac10000e" Interface "vxlan-ac10000e" type: vxlan Port "vxlan-ac10000a" Interface "vxlan-ac10000a" type: vxlan [root@overcloud-compute-0 ~]# ovs-vsctl del-port vxlan-ac100009 [root@overcloud-compute-0 ~]# ovs-vsctl del-port vxlan-ac10000e [root@overcloud-compute-0 ~]# ovs-vsctl del-port vxlan-ac10000a [root@overcloud-compute-0 ~]# crudini --set /etc/neutron/plugins/ml2/openvswitch_agent.ini agent vxlan_udp_port 9999 [root@overcloud-compute-0 ~]# systemctl restart neutron-openvswitch-agent [root@overcloud-compute-0 ~]# sleep 15 ; ovs-vsctl show | grep vxlan Port "vxlan-ac100009" Interface "vxlan-ac100009" type: vxlan error: "vxlan-ac100009: could not set configuration (Invalid argument)" Port "vxlan-ac10000e" Interface "vxlan-ac10000e" type: vxlan error: "vxlan-ac10000e: could not set configuration (Invalid argument)" Port "vxlan-ac10000a" Interface "vxlan-ac10000a" type: vxlan error: "vxlan-ac10000a: could not set configuration (Invalid argument)" [root@overcloud-compute-0 ~]# [root@overcloud-compute-0 ~]# ovs-vsctl list interface vxlan-ac100009 | grep options options : {} ~~~ ~~~ [root@overcloud-compute-0 ~]# rpm -qa | grep neutron-open openstack-neutron-openvswitch-10.0.3-1.el7ost.noarch ~~~ Indeed, passing anything other than an integer causes a type verification error - we expect an integer. ~~~ [root@overcloud-compute-0 ~]# crudini --set /etc/neutron/plugins/ml2/openvswitch_agent.ini agent vxlan_udp_port "'\"9999\"'" (reverse-i-search)`rest': systemctl ^Cstart neutron-openvswitch-agent [root@overcloud-compute-0 ~]# ovs-vsctl del-port vxlan-ac100009 [root@overcloud-compute-0 ~]# ovs-vsctl del-port vxlan-ac10000e [root@overcloud-compute-0 ~]# ovs-vsctl del-port vxlan-ac10000a (reverse-i-search)`re': ovs-vsctl show | g^Cp vxlan [root@overcloud-compute-0 ~]# ^C [root@overcloud-compute-0 ~]# systemctl restart neutron-openvswitch-agent ~~~ ~~~ 2018-01-11 21:42:29.259 132901 ERROR neutron 2018-01-11 21:42:30.801 132923 ERROR neutron Traceback (most recent call last): 2018-01-11 21:42:30.801 132923 ERROR neutron File "/usr/bin/neutron-openvswitch-agent", line 10, in <module> 2018-01-11 21:42:30.801 132923 ERROR neutron sys.exit(main()) 2018-01-11 21:42:30.801 132923 ERROR neutron File "/usr/lib/python2.7/site-packages/neutron/cmd/eventlet/plugins/ovs_neutron_agent.py", line 20, in main 2018-01-11 21:42:30.801 132923 ERROR neutron agent_main.main() 2018-01-11 21:42:30.801 132923 ERROR neutron File "/usr/lib/python2.7/site-packages/neutron/plugins/ml2/drivers/openvswitch/agent/main.py", line 49, in main 2018-01-11 21:42:30.801 132923 ERROR neutron n_utils.log_opt_values(LOG) 2018-01-11 21:42:30.801 132923 ERROR neutron File "/usr/lib/python2.7/site-packages/neutron/common/utils.py", line 207, in log_opt_values 2018-01-11 21:42:30.801 132923 ERROR neutron cfg.CONF.log_opt_values(log, logging.DEBUG) 2018-01-11 21:42:30.801 132923 ERROR neutron File "/usr/lib/python2.7/site-packages/oslo_config/cfg.py", line 2748, in log_opt_values 2018-01-11 21:42:30.801 132923 ERROR neutron _sanitize(opt, getattr(group_attr, opt_name))) 2018-01-11 21:42:30.801 132923 ERROR neutron File "/usr/lib/python2.7/site-packages/oslo_config/cfg.py", line 3198, in __getattr__ 2018-01-11 21:42:30.801 132923 ERROR neutron return self._conf._get(name, self._group) 2018-01-11 21:42:30.801 132923 ERROR neutron File "/usr/lib/python2.7/site-packages/oslo_config/cfg.py", line 2790, in _get 2018-01-11 21:42:30.801 132923 ERROR neutron value = self._do_get(name, group, namespace) 2018-01-11 21:42:30.801 132923 ERROR neutron File "/usr/lib/python2.7/site-packages/oslo_config/cfg.py", line 2833, in _do_get 2018-01-11 21:42:30.801 132923 ERROR neutron % (opt.name, str(ve))) 2018-01-11 21:42:30.801 132923 ERROR neutron ConfigFileValueError: Value for option vxlan_udp_port is not valid: invalid literal for int() with base 10: '"9999"' 2018-01-11 21:42:30.801 132923 ERROR neutron ~~~ ~~~ [root@overcloud-compute-0 ~]# grep vxlan_udp_port /usr/lib/python2.7/site-packages/neutron/ -R /usr/lib/python2.7/site-packages/neutron/conf/plugins/ml2/drivers/ovs_conf.py: cfg.PortOpt('vxlan_udp_port', default=p_const.VXLAN_UDP_PORT, (...) ~~~ ~~~ 1358 class PortOpt(Opt): 1359 1360 """Option for a TCP/IP port number. Ports can range from 0 to 65535. 1361 1362 Option with ``type`` :class:`oslo_config.types.Integer` 1363 1364 :param name: the option's name 1365 :param choices: Optional sequence of valid values. 1366 :param \*\*kwargs: arbitrary keyword arguments passed to :class:`Opt` 1367 :param min: minimum value the port can take 1368 :param max: maximum value the port can take 1369 1370 .. versionadded:: 2.6 1371 .. versionchanged:: 3.2 1372 Added *choices* parameter. 1373 .. versionchanged:: 3.4 1374 Allow port number with 0. 1375 .. versionchanged:: 3.16 1376 Added *min* and *max* parameters. 1377 """ 1378 1379 def __init__(self, name, min=None, max=None, choices=None, **kwargs): 1380 type = types.Port(min=min, max=max, choices=choices, 1381 type_name='port value') 1382 super(PortOpt, self).__init__(name, type=type, **kwargs) ~~~ ~~~ class Port(Integer): """Port type Represents a L4 Port. :param type_name: Type name to be used in the sample config file. :param choices: Optional sequence of valid values. :param min: Optional check that value is greater than or equal to min. :param max: Optional check that value is less than or equal to max. .. versionadded:: 3.16 """ PORT_MIN = 0 PORT_MAX = 65535 def __init__(self, min=None, max=None, type_name='port', choices=None): min = self.PORT_MIN if min is None else min max = self.PORT_MAX if max is None else max if min < self.PORT_MIN: raise ValueError('Min value cannot be less than %(min)d', {'min': self.PORT_MIN}) if max > self.PORT_MAX: raise ValueError('Max value cannot be more than %(max)d', {'max': self.PORT_MAX}) super(Port, self).__init__(min=min, max=max, type_name=type_name, choices=choices) ~~~ The problem is that we have to send a sting to the OVS DB, and we're not doing that. By the way, if we didn't catch this, then it means that our unit tests are flawed, and we should fix them as well. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:0357 |