Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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 1766236

Summary: [RFE] Persistent configurable RandomizedDelaySec for insights timer
Product: Red Hat Enterprise Linux 7 Reporter: Kenny Tordeurs <ktordeur>
Component: insights-clientAssignee: Link Dupont <link>
Status: CLOSED WONTFIX QA Contact: Pavol Kotvan <pakotvan>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.7CC: cww, link, nicampbe, wclark
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: pm_ack
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-11 21:52:10 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:
Bug Depends On:    
Bug Blocks: 1679986    

Description Kenny Tordeurs 2019-10-28 16:06:58 UTC
1.Proposed title of this feature request
Persistent configurable RandomizedDelaySec for insights timer

2.What is the nature and description of the request?
How can we add a random delay to this schedule in our RHEL 6 or RHEL 7 Insights clients to prevent large spikes in utilization caused by all clients uploading at the same time?

3.Why does the customer need this? (List the business requirements
here)
Prevent large spikes in utilization caused by all clients uploading at the same time?

4.How would the customer like to achieve this? (List the functional
requirements here)
Add persistent configurable  RandomizedDelaySec for Insights timer.

Comment 3 Kenny Tordeurs 2019-10-28 16:18:19 UTC
This solution is needed for Satellite 6 as we see lots of cases where insights traffic was causing load that satellite couldn't handle

Comment 4 Link Dupont 2019-11-04 20:39:31 UTC
For systemd-based hosts (RHEL7 and up), systemd has a native solution that allows clients to override values in shipped unit files. This excerpt from the systemd.unit man page[1] explains it.

> Along with a unit file foo.service, a drop-in directory foo.service.d/ may 
> exist. All files with the suffix .conf from this directory will be parsed 
> after the unit file itself is parsed. This is useful to alter or add 
> configuration settings for a unit, without having to modify unit files. 
> Drop-in files must contain appropriate section headers. For instantiated 
> units, this logic will first look for the instance .d/ subdirectory (e.g. 
> foo.d/) and read its .conf files, followed by the template .d/ 
> subdirectory (e.g. foo@.service.d/) and the .conf files there. Moreover for 
> units names containing dashes (-), the set of directories generated by 
> truncating the unit name after all dashes is searched too. Specifically, for 
> a unit name foo-bar-baz.service not only the regular drop-in directory 
> foo-bar-baz.service.d/ is searched but also both foo-bar-.service.d/ and 
> foo-.service.d/. This is useful for defining common drop-ins for a set of 
> related units, whose names begin with a common prefix. This scheme is 
> particularly useful for mount, automount and slice units, whose systematic 
> naming structure is built around dashes as component separators. Note that 
> equally named drop-in files further down the prefix hierarchy override those 
> further up, i.e. foo-bar-.service.d/10-override.conf overrides 
> foo-.service.d/10-override.conf.

So to override the RandomizedDelaySec value, create a file at: /etc/systemd/system/insights-client.timer.d/override.conf with the contents:

RandomizedDelaySec=1337

This playbook should perform the same two steps described above:

> - name: Create insights-client.timer drop-in directory
>   file:
>     path: /etc/systemd/system/insights-client.timer.d/
>     state: directory
> - name: Override insights-client.timer RandomizedDelaySec value
>   copy:
>     content: "RandomizedDelaySec=1337"
>     dest: /etc/systemd/system/insights-client.timer.d/override.conf

These drop-in files can be created interactively via the `systemctl edit` command[2].

I'm still investigating a solution for RHEL6. I'll comment when I find something.

1: https://www.freedesktop.org/software/systemd/man/systemd.unit.html
2: https://www.freedesktop.org/software/systemd/man/systemctl.html#edit%20UNIT%E2%80%A6

Comment 8 Chris Williams 2020-11-11 21:52:10 UTC
Red Hat Enterprise Linux 7 shipped it's final minor release on September 29th, 2020. 7.9 was the last minor releases scheduled for RHEL 7.
From intial triage it does not appear the remaining Bugzillas meet the inclusion criteria for Maintenance Phase 2 and will now be closed. 

From the RHEL life cycle page:
https://access.redhat.com/support/policy/updates/errata#Maintenance_Support_2_Phase
"During Maintenance Support 2 Phase for Red Hat Enterprise Linux version 7,Red Hat defined Critical and Important impact Security Advisories (RHSAs) and selected (at Red Hat discretion) Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available."

If this BZ was closed in error and meets the above criteria please re-open it flag for 7.9.z, provide suitable business and technical justifications, and follow the process for Accelerated Fixes:
https://source.redhat.com/groups/public/pnt-cxno/pnt_customer_experience_and_operations_wiki/support_delivery_accelerated_fix_release_handbook  

Feature Requests can re-opened and moved to RHEL 8 if the desired functionality is not already present in the product. 

Please reach out to the applicable Product Experience Engineer[0] if you have any questions or concerns.  

[0] https://bugzilla.redhat.com/page.cgi?id=agile_component_mapping.html&product=Red+Hat+Enterprise+Linux+7