Red Hat Bugzilla – Bug 1429642
Remove package profile JSON from production.log
Last modified: 2017-05-01 10:00:55 EDT
Description of problem: The entire package profile json is logged in production.log. This makes the log extremely painful to read. These lines can be over 110K characters long. Version-Release number of selected component (if applicable): 6.2.7 How reproducible: every time Steps to Reproduce: 1. start a satellite and upload a package profile 2. view production.log via 'less' 3. Actual results: extremely large log message, log takes about 5-10 seconds to page through for each package profile line Expected results: package profile lines are not logged
Upstream bug assigned to jsherril@redhat.com
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/15940 has been resolved.
Just for better clarity, I am renaming to prevent confusion. We are removing one element from log that floods it. I also think this consumes a lot of memory because hash structures are large and causes lot of allocations on the Ruby VM stack.
No large messages on 6.2.9. Log after uploading a package on production.log: 2017-03-23 11:42:43 40abcce7 [app] [I] Processing by Katello::Api::V2::RepositoriesController#upload_content as HTML 2017-03-23 11:42:43 40abcce7 [app] [I] Parameters: {"content"=>[#<ActionDispatch::Http::UploadedFile:0x000000090e8f18 @tempfile=#<Tempfile:/tmp/RackMultipart20170323-17654-11tbe62>, @original_filename="PyPAM-0.5.0-12.el6.src.rpm", @content_type="application/x-rpm", @headers="Content-Disposition: form-data; name=\"content[]\"; filename=\"PyPAM-0.5.0-12.el6.src.rpm\"\r\nContent-Type: application/x-rpm\r\n">], "authenticity_token"=>"voDq5tertDzrjK8v9YoHpadOtYVH9ABp4LurGk+suLE=", "api_version"=>"v2", "id"=>"1"} 2017-03-23 11:42:48 40abcce7 [app] [I] Completed 200 OK in 5095ms (Views: 0.7ms | ActiveRecord: 63.7ms) 2017-03-23 11:42:48 40abcce7 [app] [I] Started GET "/katello/api/v2/repositories/1?organization_id=1" for 10.10.120.229 at 2017-03-23 11:42:48 -0400 2017-03-23 11:42:48 40abcce7 [app] [I] Processing by Katello::Api::V2::RepositoriesController#show as JSON 2017-03-23 11:42:48 40abcce7 [app] [I] Parameters: {"organization_id"=>"1", "api_version"=>"v2", "id"=>"1"} 2017-03-23 11:42:49 40abcce7 [app] [I] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.117/app/views/katello/api/v2/repositories/show.json.rabl within katello/api/v2/layouts/resource (215.6ms) 2017-03-23 11:42:49 40abcce7 [app] [I] Completed 200 OK in 233ms (Views: 184.1ms | ActiveRecord: 39.0ms)
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2017:1191