This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
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 1901910 - cmdline vars get corrupted when set via tuned
Summary: cmdline vars get corrupted when set via tuned
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: tuned
Version: 8.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: 8.0
Assignee: Jaroslav Škarvada
QA Contact: Robin Hack
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-11-26 12:14 UTC by Christophe Besson
Modified: 2024-03-25 17:15 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-09-21 21:07:33 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   RHEL-6812 0 None Migrated None 2023-09-21 21:07:14 UTC

Description Christophe Besson 2020-11-26 12:14:50 UTC
Description of problem:
A customer tried to add the following kernel args through tuned:
elevator=none

After generating again grub.cfg with grub2-mkconfig and rebooting, it leads to the truncated cmdline below:
<other args> =none

Version-Release number of selected component (if applicable):
2.02-87.el8_2.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Add a bootloader section into a tuned profile:
# cat << EOF >>/usr/lib/tuned/virtual-guest/tuned.conf
[bootloader]
cmdline = elevator=none
EOF

2. Enable that profile
# tuned-adm profile virtual-guest

3. Generate grub.cfg
# grub2-mkconfig -o /boot/grub2/grub.cfg

Actual results:
BOOT_IMAGE=(hd0,msdos1)/vmlinuz-4.18.0-193.28.1.el8_2.x86_64 root=/dev/mapper/rhel_foo-root ro crashkernel=auto resume=/dev/mapper/rhel_foo-swap rd.lvm.lv=rhel_foo/root rd.lvm.lv=rhel_foo/swap console=tty0 console=ttyS1,115200n8 systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M rd.debug crashkernel=256M =none

Expected results:
BOOT_IMAGE=(hd0,msdos1)/vmlinuz-4.18.0-193.28.1.el8_2.x86_64 root=/dev/mapper/rhel_foo-root ro crashkernel=auto resume=/dev/mapper/rhel_foo-swap rd.lvm.lv=rhel_foo/root rd.lvm.lv=rhel_foo/swap console=tty0 console=ttyS1,115200n8 systemd.log_level=debug systemd.log_target=kmsg log_buf_len=1M rd.debug crashkernel=256M elevator=none


Additional info:
When tuned is executed, the following line is added to `/etc/default/grub`:
~~~
GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_DEFAULT:+$GRUB_CMDLINE_LINUX_DEFAULT }\$tuned_params"
~~~

It's added by _grub2_default_env_patch() in `/usr/lib/python3.6/site-packages/tuned/plugins/plugin_bootloader.py`.
I can note commenting out this line fixes the issue (but tuned will add it later dynamically as it runs as a daemon).
When this line is present, it affects the `kernelopts` variable from `/boot/grub2/grubenv`, $tuned_params is added at the end of this line after running `grub2-mkconfig`.

To fix permanently this issue, restoring the previous grubenv (that is to say, removing the "$tuned_params" in the kernelopts var) and then running grub2-mkconfig with the option below leads to the expected behaviour:
~~~
# grub2-mkconfig --no-grubenv-update -o /boot/grub2/grub.cfg
~~~

Please also note using a first arg like "noop", which doesn't contain the '=' sign, does not lead to that issue.

This issue looks close to:
https://bugzilla.redhat.com/show_bug.cgi?id=1669252

Which has been fixed by the errata below:
https://access.redhat.com/errata/RHBA-2020:1869

But a more recent version is used in this case.

Comment 3 Jaroslav Škarvada 2022-10-11 13:45:49 UTC
I think we have already fixed this problem, with tuned-2.19.0-1.el8.noarch I am unable to reproduce it. Could you please retest and let me know?

Comment 5 Jaroslav Škarvada 2023-02-08 14:54:25 UTC
Unable to reproduce, dropping the acks until we got more info.

Comment 8 RHEL Program Management 2023-09-21 20:51:29 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 9 RHEL Program Management 2023-09-21 21:07:33 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


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