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 1798183 - RFE: support post-loaded profile
Summary: RFE: support post-loaded profile
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: tuned
Version: 8.4
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: 8.0
Assignee: Jaroslav Škarvada
QA Contact: Robin Hack
URL:
Whiteboard:
Depends On:
Blocks: 1817044 1825061
TreeView+ depends on / blocked
 
Reported: 2020-02-04 18:27 UTC by Rich Megginson
Modified: 2020-11-04 02:07 UTC (History)
4 users (show)

Fixed In Version: tuned-2.14.0-0.1.rc1.el8
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 02:03:07 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github redhat-performance tuned pull 272 0 None closed Add support for a post-loaded profile 2020-10-15 09:19:03 UTC
Github redhat-performance tuned pull 279 0 None closed Make tuned-adm indicate which profile is post-loaded 2020-10-15 09:19:04 UTC
Github redhat-performance tuned pull 280 0 None open Fix test case for post-loaded profile feature 2020-10-15 09:19:04 UTC
Red Hat Product Errata RHBA-2020:4559 0 None None None 2020-11-04 02:03:27 UTC

Description Rich Megginson 2020-02-04 18:27:06 UTC
Description of problem:
Need to be able to configure tuned to always load a given profile first, before loading other profiles.

One possible implementation - add a file /etc/tuned/pre-loaded-profile - the name of the profile to pre-load is in this file - tuned will load this profile before loading any other profiles.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Jaroslav Škarvada 2020-02-04 18:33:46 UTC
Are you OK with the /etc/tuned-main.conf option like, e.g.:
preload_profile = your_preloaded_profile

or is special file better for you? In this case we could also add option to /etc/tuned-main.conf, e.g.:
preload_profile_file = /etc/tuned/pre-loaded-profile

Comment 2 Rich Megginson 2020-02-04 18:39:19 UTC
(In reply to Jaroslav Škarvada from comment #1)
> Are you OK with the /etc/tuned-main.conf option like, e.g.:
> preload_profile = your_preloaded_profile

It depends.  Is the /etc/tuned-main.conf in a strict INI file format?  If so, I can use the ansible ini module.  If not, then I would have to resort to using less optimal solutions such as the lineinfile module with a regexp.

> 
> or is special file better for you? In this case we could also add option to
> /etc/tuned-main.conf, e.g.:
> preload_profile_file = /etc/tuned/pre-loaded-profile

see above

Comment 3 Jaroslav Škarvada 2020-02-04 19:28:49 UTC
(In reply to Rich Megginson from comment #2)
> (In reply to Jaroslav Škarvada from comment #1)
> > Are you OK with the /etc/tuned-main.conf option like, e.g.:
> > preload_profile = your_preloaded_profile
> 
> It depends.  Is the /etc/tuned-main.conf in a strict INI file format?  If
> so, I can use the ansible ini module.  If not, then I would have to resort
> to using less optimal solutions such as the lineinfile module with a regexp.
> 
Yes, it's strict ini file, i.e. no special features, just 'option = value', whitespaces and comments.

Comment 4 Rich Megginson 2020-02-04 19:32:48 UTC
(In reply to Jaroslav Škarvada from comment #3)
> (In reply to Rich Megginson from comment #2)
> > (In reply to Jaroslav Škarvada from comment #1)
> > > Are you OK with the /etc/tuned-main.conf option like, e.g.:
> > > preload_profile = your_preloaded_profile
> > 
> > It depends.  Is the /etc/tuned-main.conf in a strict INI file format?  If
> > so, I can use the ansible ini module.  If not, then I would have to resort
> > to using less optimal solutions such as the lineinfile module with a regexp.
> > 
> Yes, it's strict ini file, i.e. no special features, just 'option = value',
> whitespaces and comments.

Ok.  Then yes, the implementation can be the addition of a new parameter to tuned-main.conf:

preload_profile = your_preloaded_profile

Thanks!

Comment 5 Ondřej Lysoněk 2020-02-05 10:28:17 UTC
(In reply to Jaroslav Škarvada from comment #1)
> Are you OK with the /etc/tuned-main.conf option like, e.g.:
> preload_profile = your_preloaded_profile
> 
> or is special file better for you? In this case we could also add option to
> /etc/tuned-main.conf, e.g.:
> preload_profile_file = /etc/tuned/pre-loaded-profile

What is the reason to do it this way? It seems like we're complicating things unnecessarily. And given that the preset profile is stored in a separate file, hiding the preloaded profile in tuned-main.conf might be considered inconsistent and a hard-to-discover easter egg.

Personally, I'd go with the original proposal to store it in something like /etc/tuned/pre-loaded-profile.

Comment 6 Rich Megginson 2020-02-05 15:05:07 UTC
(In reply to Ondřej Lysoněk from comment #5)
> (In reply to Jaroslav Škarvada from comment #1)
> > Are you OK with the /etc/tuned-main.conf option like, e.g.:
> > preload_profile = your_preloaded_profile
> > 
> > or is special file better for you? In this case we could also add option to
> > /etc/tuned-main.conf, e.g.:
> > preload_profile_file = /etc/tuned/pre-loaded-profile
> 
> What is the reason to do it this way? It seems like we're complicating
> things unnecessarily. And given that the preset profile is stored in a
> separate file, hiding the preloaded profile in tuned-main.conf might be
> considered inconsistent and a hard-to-discover easter egg.
> 
> Personally, I'd go with the original proposal to store it in something like
> /etc/tuned/pre-loaded-profile.

It doesn't matter to me - either way works fine with Ansible.  Do whatever you guys think is the right thing.

Comment 9 Ondřej Lysoněk 2020-05-04 09:32:02 UTC
It turns out that Rich needs the "pre-loaded profile" to be applied last, so that other profiles don't override its settings. So in my view, this is more like a "post-loaded profile".

Comment 10 Ondřej Lysoněk 2020-06-01 17:48:20 UTC
Upstream PR:
https://github.com/redhat-performance/tuned/pull/272

Comment 20 errata-xmlrpc 2020-11-04 02:03:07 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 (tuned bug fix and enhancement update), 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-2020:4559


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