neutron/neutron/tests
Rodolfo Alonso Hernandez 577d5bd977 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.

Change-Id: I97ada62484023b9833ed12afd68eb4c8d337fd1f
Related-Bug: #1896734
(cherry picked from commit a6cdf273c0)
2021-03-01 10:31:10 +00:00
..
common Remove "six" library 2020-07-28 16:55:52 +00:00
contrib [OVN] Unify OVN/OVS compilation 2020-07-07 22:05:59 +00:00
etc Convert policy.json into policy-in-code 2018-12-13 20:37:53 +00:00
fullstack Merge "Limit usage of resources in the fullstack tests job" into stable/victoria 2021-01-29 19:10:02 +00:00
functional Improve "get_devices_with_ip" performance 2021-03-01 10:31:10 +00:00
unit Improve "get_devices_with_ip" performance 2021-03-01 10:31:10 +00:00
var
__init__.py
base.py Remove "six" library 2020-07-28 16:55:52 +00:00
post_mortem_debug.py
tools.py Remove references to unittest2 library 2020-01-14 09:03:26 +00:00