From d774e70d6bd511ab52e387493f1fb18ae4975565 Mon Sep 17 00:00:00 2001 From: Stephen Eilert Date: Tue, 15 Mar 2016 13:54:23 -0700 Subject: [PATCH] Removes host file contents from DHCP agent logs The change I3ad7864eeb2f959549ed356a1e34fa18804395cc addressed a performance impact by removing logging calls from inside the loop that creates the hosts file in memory. However, it also introduced the dumping of said hosts file to the logs. On deployments with a very high number of ports(>5K), this increases the load of the node substantially. The problem is worse when a high number of port updates is received in a short amount of time. There is also the administrative burden caused by the sheer amount of data being logged. If the content of the host file is required for debugging purposes, it can be found at /opt/stack/data/neutron/dhcp//host This patch is trivial and only removes the logging of the file contents. The 'building'/'done building' logging calls may still provide useful information. Conflicts: neutron/agent/linux/dhcp.py Change-Id: Ie176ef123c194c22dca0967a6acfb9a48c959e6c Depends-On: I4041478ca09bd124827782774b8520908ef07be0 Closes-Bug: 1557640 (cherry picked from commit ed7411fa1c4d6a26cea3a8737b3c29ce6ff64363) --- neutron/agent/linux/dhcp.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/neutron/agent/linux/dhcp.py b/neutron/agent/linux/dhcp.py index 2dd96d98a8b..1da05981dc5 100644 --- a/neutron/agent/linux/dhcp.py +++ b/neutron/agent/linux/dhcp.py @@ -671,8 +671,7 @@ class Dnsmasq(DhcpLocalProcess): (port.mac_address, name, ip_address)) utils.replace_file(filename, buf.getvalue()) - LOG.debug('Done building host file %s with contents:\n%s', filename, - buf.getvalue()) + LOG.debug('Done building host file %s', filename) return filename def _get_client_id(self, port):