neutron/neutron/agent/linux
Rodolfo Alonso Hernandez cc9b849bf3 Improve "get_devices_with_ip" performance
As reported in LP#1896734, there is a limit in the size of information
that can be transmitted in one single message between an application
and the privsep daemon. The read socket buffer is limited in size;
a message exceeding this size will generate an exception.

In order to limit the amount of information to be sent, this patch
improves the performance of "get_devices_with_ip". In the previous
implementation, the whole list of network devices from a namespace
was retrieved. In some environments, the list of devices could be
so big that the list returned by "privileged.get_link_devices" can
exceed the read buffer size (as reported in the LP bug when the
OVS agent tries to retrieve the list of IP addresses in the system).

Now the function calls "privileged.get_ip_addresses", that returns
a much smaller list. This patch is also reducing the number of system
calls to just one; the previous implementation was retrieving first
the devices link information list (that method was returning a much
bigger blob) and then, per device, retrieving the IP address
information.

Conflicts:
    neutron/tests/functional/agent/linux/test_ip_lib.py

Change-Id: I97ada62484023b9833ed12afd68eb4c8d337fd1f
Related-Bug: #1896734
(cherry picked from commit a6cdf273c0)
2021-03-02 09:44:53 +00:00
..
openvswitch_firewall Fix losses of ovs flows when ovs is restarted 2021-02-05 12:10:56 +00:00
__init__.py Empty files should not contain copyright or license 2014-10-20 00:50:32 +00:00
bridge_lib.py Add namespace support for "bridge" commands 2019-04-29 07:52:18 +00:00
daemon.py Set neutron-keepalived-state-change proctitle 2019-05-23 15:22:35 +08:00
dhcp.py Default dnsmasq --conf-file to /dev/null 2020-10-08 19:29:25 +00:00
dibbler.py use PROVISIONAL_IPV6_PD_PREFIX from neutron-lib 2017-11-14 12:26:43 -07:00
ethtool.py Workaround for TCP checksum issue with ovs-dpdk and veth pair 2020-06-29 12:56:39 -05:00
external_process.py Fix formatting error in agent/linux/external_process.py 2020-11-05 02:04:10 +00:00
interface.py Merge "Workaround for TCP checksum issue with ovs-dpdk and veth pair" into stable/train 2020-07-01 03:10:18 +00:00
ip_conntrack.py Merge "Use '-p ip' instead of '-p 0' with conntrack" 2019-04-12 13:02:24 +00:00
ip_lib.py Improve "get_devices_with_ip" performance 2021-03-02 09:44:53 +00:00
ipset_manager.py Revert "[Security] fix allowed-address-pair 0.0.0.0/0 issue" 2021-01-20 17:02:06 +01:00
iptables_comments.py Iptables firewall driver adds forward rules for trusted ports 2018-03-06 10:13:44 +01:00
iptables_firewall.py Revert "[Security] fix allowed-address-pair 0.0.0.0/0 issue" 2021-01-20 17:02:06 +01:00
iptables_manager.py Merge "Do not initialize the iptables nat table in the dhcp-agent" 2019-04-26 06:42:34 +00:00
keepalived.py Ensure "keepalived" is correcly disabled 2021-01-15 17:53:29 +00:00
l3_tc_lib.py Use Pyroute2 "add_tc_qdisc" function in l3_tc_lib 2019-07-05 08:13:07 +00:00
pd.py Handle properly existing LLA address during l3 agent restart 2020-08-25 09:09:25 +00:00
pd_driver.py use PROVISIONAL_IPV6_PD_PREFIX from neutron-lib 2017-11-14 12:26:43 -07:00
ra.py Add radvd_user config option 2019-10-25 08:14:45 +00:00
tc_lib.py Fix the wrong value for QoS rate conversion to bytes/s 2020-06-24 17:22:02 +00:00
utils.py Fix race condition when getting cmdline 2019-09-18 21:32:33 -04:00
xenapi_root_helper.py Fix bandit warning 2019-05-10 08:38:34 -04:00