Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1659917 - Make request ID longer in production.log
Summary: Make request ID longer in production.log
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Logging
Version: 6.4
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: 6.5.0
Assignee: Lukas Zapletal
QA Contact: Stephen Wadeley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-17 08:10 UTC by Pavel Moravec
Modified: 2019-11-05 22:42 UTC (History)
1 user (show)

Fixed In Version: foreman-1.20.1.3-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-14 12:39:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 25709 0 None None None 2018-12-17 10:04:50 UTC
Red Hat Product Errata RHSA-2019:1222 0 None None None 2019-05-14 12:39:46 UTC

Description Pavel Moravec 2018-12-17 08:10:00 UTC
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:

Comment 3 Lukas Zapletal 2018-12-17 10:04:49 UTC
Created redmine issue https://projects.theforeman.org/issues/25709 from this bug

Comment 4 Satellite Program 2018-12-17 13:04:40 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25709 has been resolved.

Comment 6 Stephen Wadeley 2019-01-08 10:07:58 UTC
Hello


"request id in logs is now 8 chars" says Revision 1653b190 [1]

[1] https://projects.theforeman.org/projects/foreman/repository/revisions/1653b19061591180823a8d0d2183ce440072a2b1

Comment 10 errata-xmlrpc 2019-05-14 12:39:36 UTC
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


Note You need to log in before you can comment on or make changes to this bug.