See similar issue from nailgun-agent side: https://bugs.launchpad.net/fuel/+bug/1393115
api.log became almost 1Mb in 1.5h, which is way too much. Being archived into diag snapshot then, it makes snapshot too large and not very useful for support team.
Analysis of log file shows that it is mostly polluted by data from nailgun-agent, like:
2014-11-16 00:53:17.716 DEBUG [7fb4b2b95740] (logger) Request PUT /api/nodes/agent/ from 172.17.42.1:39247 {"manufacturer":"QEMU","os_platform":"centos","mac":"64:10:F4:76:B1:6E","is_agent":true,"agent_checksum":"fdcb2f84cfef53e8e7a97479b3e10cc4c6835292","platform_name":"Standard PC (i440FX + PIIX, 1996)","meta":{"disks":[{"model":null,"disk":"disk/by-path/pci-0000:00:0a.0-virtio-pci-virtio7","removable":"0","size":53687091200,"extra":[],"name":"vdc"},{"model":null,"disk":"disk/by-path/pci-0000:00:09.0-virtio-pci-virtio6","removable":"0","size":53687091200,"extra":[],"name":"vdb"},{"model":null,"disk":"disk/by-path/pci-0000:00:08.0-virtio-pci-virtio5","removable":"0","size":53687091200,"extra":[],"name":"vda"}],"memory":{"devices":[{"type":"RAM","size":2147483648}],"maximum_capacity":2147483648,"slots":1,"total":2147483648},"cpu":{"total":1,"real":1,"spec":[{"model":"Intel Xeon E312xx (Sandy Bridge)","frequency":3500}]},"system":{"manufacturer":"QEMU","version":"pc-i440fx-trusty","fqdn":"node-3.test.domain.local","product":"Standard PC (i440FX + PIIX, 1996)"},"interfaces":[{"mac":"64:7B:AA:D8:9F:E2","state":"up","current_speed":null,"name":"eth4"},{"mac":"64:DF:C3:24:6A:A4","state":"up","current_speed":null,"name":"eth3"},{"mac":"64:13:7C:70:EB:73","state":"up","current_speed":null,"name":"eth2"},{"mac":"64:59:E3:6F:3A:F9","state":"up","current_speed":null,"name":"eth1"},{"mac":"64:10:F4:76:B1:6E","netmask":"255.255.255.0","state":"up","current_speed":null,"name":"eth0","ip":"10.108.0.4"}]},"ip":"10.108.0.4"}
If we already log this data on nailgun-agent side, I propose to remove this verbosity and not to log data structure which comes from agent.
Instead, we have a tricky code which works on Nailgun side, and which updates internal data structure only if it changed. I propose to log only that moment: changed data, not everything.
Fix proposed to branch: master /review. openstack. org/137053
Review: https:/