yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #63336
[Bug 1652729] Re: OFPort's _get_allowed_pairs method fails when there is CIDR in allowed_address_pairs
Reviewed: https://review.openstack.org/415180
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=864a8a7ce8edf15f3aedddc881f75cfa9d425e38
Submitter: Jenkins
Branch: master
commit 864a8a7ce8edf15f3aedddc881f75cfa9d425e38
Author: Ravi Kota <ravkota3@xxxxxxxxxx>
Date: Tue Dec 27 05:34:19 2016 -0500
Handle CIDR IP address in allowed address pairs
A CIDR IP address in allowed address pairs causing init
and update operation failures on OFPort.
This is because those operations are not handling CIDR IP addresses.
This patch fixes that problem.
Change-Id: Ic4513859364403555e13593fb34bd2e58ea6377b
Closes-Bug: #1652729
** Changed in: neutron
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1652729
Title:
OFPort's _get_allowed_pairs method fails when there is CIDR in
allowed_address_pairs
Status in neutron:
Fix Released
Bug description:
The following code throws an exception when CIDR is provided in
allowed_address_pairs.
https://github.com/openstack/neutron/blob/49d614895f44c44f9e1735210498facf1886c404/neutron/agent/linux/openvswitch_firewall/firewall.py#L102
StackTrace:
----------
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent [req-f0e9bdd1-5f4a-4f35-87de-3eecded79154 - - - - -] Error while processing VIF ports
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent Traceback (most recent call last):
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent File "/usr/lib/python2.7/dist-packages/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py", line 2047, in rpc_loop
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent port_info, ovs_restarted)
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent File "/usr/lib/python2.7/dist-packages/osprofiler/profiler.py", line 154, in wrapper
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent return f(*args, **kwargs)
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent File "/usr/lib/python2.7/dist-packages/neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py", line 1655, in process_network_ports
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent port_info.get('updated', set()))
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent File "/usr/lib/python2.7/dist-packages/neutron/agent/securitygroups_rpc.py", line 265, in setup_port_filters
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent self.prepare_devices_filter(new_devices)
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent File "/usr/lib/python2.7/dist-packages/neutron/agent/securitygroups_rpc.py", line 130, in decorated_function
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent *args, **kwargs)
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent File "/usr/lib/python2.7/dist-packages/neutron/agent/securitygroups_rpc.py", line 138, in prepare_devices_filter
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent self._apply_port_filter(device_ids)
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent File "/usr/lib/python2.7/dist-packages/neutron/agent/securitygroups_rpc.py", line 163, in _apply_port_filter
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent self.firewall.prepare_port_filter(device)
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent File "/usr/lib/python2.7/dist-packages/neutron/agent/linux/openvswitch_firewall/firewall.py", line 273, in prepare_port_filter
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent of_port = self.get_or_create_ofport(port)
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent File "/usr/lib/python2.7/dist-packages/neutron/agent/linux/openvswitch_firewall/firewall.py", line 262, in get_or_create_ofport
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent self.sg_port_map.update_port(of_port, port)
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent File "/usr/lib/python2.7/dist-packages/neutron/agent/linux/openvswitch_firewall/firewall.py", line 151, in update_port
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent port.update(port_dict)
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent File "/usr/lib/python2.7/dist-packages/neutron/agent/linux/openvswitch_firewall/firewall.py", line 116, in update
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent version=4)
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent File "/usr/lib/python2.7/dist-packages/neutron/agent/linux/openvswitch_firewall/firewall.py", line 101, in _get_allowed_pairs
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent return {(aap['mac_address'], aap['ip_address']) for aap in aap_dict
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent File "/usr/lib/python2.7/dist-packages/neutron/agent/linux/openvswitch_firewall/firewall.py", line 102, in <setcomp>
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent if netaddr.IPNetwork(aap['ip_address']).version == version}
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent File "/usr/lib/python2.7/dist-packages/netaddr/ip/__init__.py", line 280, in __init__
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent % self.__class__.__name__)
2016-12-27 01:32:51.434 2737 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent ValueError: IPAddress() does not support netmasks or subnet prefixes! See documentation for details.
Similiar bug fixed at a different place.
https://bugs.launchpad.net/neutron/+bug/1382562
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1652729/+subscriptions
References