Bug 1659917
| Summary: | Make request ID longer in production.log | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Pavel Moravec <pmoravec> |
| Component: | Logging | Assignee: | Lukas Zapletal <lzap> |
| Status: | CLOSED ERRATA | QA Contact: | Stephen Wadeley <swadeley> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.4 | CC: | mmccune |
| Target Milestone: | 6.5.0 | Keywords: | Triaged |
| Target Release: | Unused | ||
| Hardware: | x86_64 | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | foreman-1.20.1.3-1 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-05-14 12:39:36 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Created redmine issue https://projects.theforeman.org/issues/25709 from this bug Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25709 has been resolved. Hello "request id in logs is now 8 chars" says Revision 1653b190 [1] [1] https://projects.theforeman.org/projects/foreman/repository/revisions/1653b19061591180823a8d0d2183ce440072a2b1 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/RHSA-2019:1222 |
Description of problem: request ID is a 5 chars long (or rather short) hex string. This can be too small for more busier Satellites, where the same request ID can be repeated soon. Like I see in a customer's logfile: 2018-12-12T03:48:27 [I|app|e02d7] Processing by Katello::Api::V2::RootController#rhsm_resource_list as JSON 2018-12-12T03:48:27 [I|app|e02d7] Completed 200 OK in 25ms (Views: 4.0ms | ActiveRecord: 4.1ms) 2018-12-12T04:59:32 [I|app|e02d7] Completed 201 Created in 1356ms (Views: 8.7ms | ActiveRecord: 288.5ms) 2018-12-12T03:48:27 [I|app|663e7] Processing by Katello::Api::V2::RootController#rhsm_resource_list as JSON 2018-12-12T03:48:27 [I|app|663e7] Completed 200 OK in 29ms (Views: 4.8ms | ActiveRecord: 2.0ms) 2018-12-12T05:25:59 [I|app|663e7] Completed 200 OK in 145ms (Views: 15.8ms | ActiveRecord: 4.8ms) 2018-12-12T03:48:27 [I|app|0e70d] Processing by Katello::Api::V2::RootController#rhsm_resource_list as JSON 2018-12-12T03:48:27 [I|app|0e70d] Completed 200 OK in 29ms (Views: 4.8ms | ActiveRecord: 3.4ms) 2018-12-12T07:35:04 [I|app|0e70d] Processing by Katello::Api::V2::RootController#rhsm_resource_list as JSON The extra Processing/Completed belong to a different request, coincidentally with the request ID of same value. Those "duplicates" confuse investigation and makes troubles to bulk searching / processing the logs (i.e. here I wanted to find out the longest response time of "GET /rhsm/" requests, but some other "Completed" loglines apparently appear..). Please make the request ID longer, such that probability of hitting such duplicate request ID in one file is significantly smaller. Version-Release number of selected component (if applicable): Sat 6.4 How reproducible: ??? Steps to Reproduce: 1. Generate many requests against Satellite, the smaller the better 2. Check for uniques of the requests, e.g.: grep Completed /var/log/foreman/production.log | awk '{ print $2 }' | sort | uniq -c | sort -n | tail Actual results: 2. shows duplicate request IDs, like: 4 [I|app|fcff4] 5 [I|app|30d04] 5 [I|app|56d3e] 5 [I|app|57028] 5 [I|app|c622e] 5 [I|app|c6a30] 5 [I|app|c8391] 5 [I|app|eabcb] 5 [I|app|f23ba] 5 [I|app|f2e65] Expected results: 2. to show just unique requests IDs, like: 1 [I|app|00008] 1 [I|app|00014] 1 [I|app|00017] 1 [I|app|00022] .. Additional info: