Bug 1777874
| Summary: | RHEL-8.2 Tuned causes duplication of kernel comand line flags. | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Joe Mario <jmario> | |
| Component: | tuned | Assignee: | Jaroslav Škarvada <jskarvad> | |
| Status: | CLOSED ERRATA | QA Contact: | Robin Hack <rhack> | |
| Severity: | medium | Docs Contact: | Prerana Sharma <presharm> | |
| Priority: | high | |||
| Version: | 8.2 | CC: | alink, aratnapa, atheurer, ggrimaux, jeder, jskarvad, lcapitulino, mivollme, presharm, psklenar, pveiga, rcheerla, rhack, ttracy | |
| Target Milestone: | rc | Keywords: | Patch, TestCaseProvided, Triaged, Upstream, ZStream | |
| Target Release: | 8.0 | Flags: | pm-rhel:
mirror+
|
|
| Hardware: | All | |||
| OS: | Linux | |||
| URL: | https://github.com/redhat-performance/tuned/pull/311 | |||
| Whiteboard: | ||||
| Fixed In Version: | tuned-2.15.0-0.1.rc1.el8 | Doc Type: | No Doc Update | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1867736 1918995 1918998 (view as bug list) | Environment: | ||
| Last Closed: | 2021-05-18 15:05:25 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: | 1867736, 1883636, 1918995, 1918998 | |||
|
Description
Joe Mario
2019-11-28 14:44:44 UTC
I think the following is happening. Tuned sets GRUB_CMDLINE_LINUX_DEFAULT variable in the /etc/default/grub. It seems its content can be then written to the kernelopts by /etc/grub.d/10_linux script which is called by grub2-mkconfig. I think this bug was introduced the following way: - Tuned started to use /etc/default/grub config. In this time nothing like BLS existed and grub2-mkconfig was usually used to transform /etc/default/grub (with the help of /etc/grub.d/* scripts) to /boot/*/grub.cfg - BLS was introduced - Tuned started shipping /usr/lib/kernel/install.d/92-tuned.install script for BLS and BLS support was added to grub2-mkconfig and it started saving GRUB_CMDLINE_LINUX_DEFAULT from the /etc/default/grub as $kernelopts grubenv At the moment I think about two possible solutions of this problem in Tuned: a) If there is BLS enabled stop adding $tuned_params to GRUB_CMDLINE_LINUX_DEFAULT, this could have some side-effects which are currently unknown to me. b) Stop adding $tuned_params to 'options' in /boot/loader/entries and start adding it to $kernelopts grubenv - for me this is not so clear solution as the current state (and it also relies on recurive expansion of the grubenv variables, which seems to be supported at the moment by grub2;, but doesn't seem to be standardized anywhere), but it should work. Joe, I am just curious, what's your usecase for 'grub2-mkconfig -o /boot/grub2/grub.cfg' with BLS? With BLS there is probably no need to regenerate the grub2.cfg. Every change you save to the grubenv (e.g. kernelopts) will be taken automatically upon next reboot by grub. Hi Jaroslav: The use case is when we're adding kernel command line flags, we add them to the /etc/default/grub file and then run "grub2-mkconfig > /boot/grub2/grub.cfg" Joe (In reply to Joe Mario from comment #4) > Hi Jaroslav: > The use case is when we're adding kernel command line flags, we add them to > the /etc/default/grub file and then run "grub2-mkconfig > > /boot/grub2/grub.cfg" > > Joe Thanks for info. I think with BLS (RHEL-8) if anything you need is just adding kernel options, you could add them to kernelopts in grubenv and no configuration file needs to be regenerated with grub2-mkconfig. I just wanted to point this out. Regarding the duplication when grub2-mkconfig is used it's bug and we will fix it (somehow). Thanks Jaroslav: There was a time in the RHEL-8 development when editing the grubenv file directly would cause grub errors forcing a rebuild of grubenv. I never tracked down if that was a bug or feature. Thgough shouldn't using grub2-editenv always work? But back to editing /etc/default/grub directly, it is a common way to modify the kernel command line parameters. It's even documented as the way to do it in the RHEL-8 documentation. https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/managing_monitoring_and_updating_the_kernel/configuring-kernel-command-line-parameters_managing-monitoring-and-updating-the-kernel#changing-kernel-command-line-parameters-for-all-boot-entries_setting-kernel-command-line-parameters I can see from comment #2 that it will be a challenge to address this. Fortunately it's not a correctness problem. Thanks for doing whatever you can. Joe Seems there is nothing from kernelargs to do. Once this is fixed the OSP side will be too. Closing the dup, keeping this. *** Bug 1867831 has been marked as a duplicate of this bug. *** Upstream PR: https://github.com/redhat-performance/tuned/pull/311 In order to recover from the kernel cmdline dupes previously created by grub2-mkconfig, grub2-mkconfig has to be run after installation of the patched Tuned (we do not run it automatically, because it could break setup for users not using grub2-mkconfig). Jaroslav, What's the status of the z-stream request? (In reply to Luiz Capitulino from comment #34) > Jaroslav, > > What's the status of the z-stream request? LGTM, requesting clones. 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-2021:1671 |