Bug 1726514
| Summary: | grubby is expanding variables in the BLS entries which it shouldn't do | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Pei Zhang <pezhang> |
| Component: | grubby | Assignee: | Bootloader engineering team <bootloader-eng-team> |
| Status: | CLOSED ERRATA | QA Contact: | Release Test Team <release-test-team-automation> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 8.1 | CC: | bhu, chayang, fmartine, jeder, jskarvad, juzhang, lcapitulino, olysonek, peterx, pezhang, pjanda, thozza, zveleba |
| Target Milestone: | rc | Keywords: | Regression |
| Target Release: | 8.0 | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | grubby-8.40-38.el8 | Doc Type: | No Doc Update |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-04-28 16:59:27 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: | 1640832, 1755139 | ||
|
Description
Pei Zhang
2019-07-03 05:28:52 UTC
This is a regression bug: tuned-2.12.0-1.el8.noarch fail tuned-2.10.0-15.el8.noarch fail tuned-2.10.0-12.el8.noarch fail tuned-2.10.0-11.el8.noarch fail tuned-2.10.0-10.el8.noarch works well Pei, I have a few questions: 1. Do you observe any issues because of the command-line duplication? For example, a spike or any error in the logs? I'm asking this because it may be that this is not harmful 2. If you find this is harmful, would you test this against tuned in RHEL7? My thinking is: if this is harmful and it is present in RHEL7, then this is urgent for RHEL7 and we need the BZ cloned there. If this is not harmful, then we may skip fixing it in RHEL7 even if it's present there. Thanks. (In reply to Luiz Capitulino from comment #2) > Pei, > > I have a few questions: > > 1. Do you observe any issues because of the command-line duplication? > For example, a spike or any error in the logs? I'm asking this because > it may be that this is not harmful Hi Luiz, In my latest rhel8 testing, the huge spike come back again, but I need more time to confirm which component(tuned or kernel-rt or others) cause huge spike. So I'll update once I have a certain conclusion and confirm if this duplication issue is harmless. > > 2. If you find this is harmful, would you test this against tuned in RHEL7? > > My thinking is: if this is harmful and it is present in RHEL7, then this is > urgent for RHEL7 and we need the BZ cloned there. If this is not harmful, > then we may skip fixing it in RHEL7 even if it's present there. I can confirm it works well in RHEL7. This issue only exists in RHEL8. Thanks. Best regards, Pei > > Thanks. (In reply to Pei Zhang from comment #3) > (In reply to Luiz Capitulino from comment #2) > > Pei, > > > > I have a few questions: > > > > 1. Do you observe any issues because of the command-line duplication? > > For example, a spike or any error in the logs? I'm asking this because > > it may be that this is not harmful > > Hi Luiz, > > In my latest rhel8 testing, the huge spike come back again, but I need more > time to confirm which component(tuned or kernel-rt or others) cause huge > spike. So I'll update once I have a certain conclusion and confirm if this > duplication issue is harmless. Just update the latest rhel8 1h cyclictest results. I'll try to find out which component cause this spike, results will be updated soon. ==Versions== tuned-2.12.0-1.el8.noarch libvirt-5.4.0-2.module+el8.1.0+3523+b348b848.x86_64 qemu-kvm-4.0.0-4.module+el8.1.0+3523+b348b848.x86_64 kernel-rt-4.18.0-109.rt20.50.el8.x86_64 ==Results== (2)Single VM with 8 rt vCPUs: # Min Latencies: 00021 00024 00023 00026 00040 00036 00045 00055 # Avg Latencies: 00060 00060 00059 00060 00059 00075 00056 00057 # Max Latencies: 120881 120757 120750 120767 120773 120780 120813 120602 (3)Multiple VMs each with 1 rt vCPU: - VM1 # Min Latencies: 00008 # Avg Latencies: 00064 # Max Latencies: 120688 - VM2 # Min Latencies: 00021 # Avg Latencies: 00060 # Max Latencies: 40522 - VM3 # Min Latencies: 00021 # Avg Latencies: 00058 # Max Latencies: 160658 - VM4 # Min Latencies: 00020 # Avg Latencies: 00058 # Max Latencies: 160836 (1)Single VM with 1 rt vCPU: # Min Latencies: 00021 # Avg Latencies: 00063 # Max Latencies: 80950 This is grubby fault, it seems it expands variables in the BLS entries which it shouldn't do. Reproducer on cleanly provisioned RHEL-8 machine: # MID=`cat /etc/machine-id` # KVER=`uname -r` # BENTRY=/boot/loader/entries/$MID-$KVER.conf # cat $BENTRY | grep options options $kernelopts $tuned_params ^^^ notice there are variables $kernelopts and $tuned_params, which are normally expanded by grub from the grub environment, e.g.: # grep kernelopts /boot/grub2/grubenv kernelopts=root=UUID=78f056cb-1868-4fad-9ca1-67a25313709a ro console=tty0 console=ttyS0,115200 crashkernel=auto net.ifnames=0 rhgb quiet ^^^ this is what will be expanded by grub for $kernelopts Let's set tuned_params to something: # grub2-editenv /boot/grub2/grubenv set 'tuned_params=quiet' Then run grubby: # grubby --args="default_hugepagesz=1G" --update-kernel=`grubby --default-kernel` And re-check kernel options in the BLS entry: # cat $BENTRY | grep options options root=UUID=78f056cb-1868-4fad-9ca1-67a25313709a ro console=tty0 console=ttyS0,115200 crashkernel=auto net.ifnames=0 rhgb quiet quiet default_hugepagesz=1G ^^^ notice $kernelopts and $tuned_params got expanded and their content were written literally to the BLS entry. This shouldn't happen and it's the source of duplication described in the comment 0. (In reply to Jaroslav Škarvada from comment #10) > This is grubby fault, it seems it expands variables in the BLS entries which > it shouldn't do. Reproducer on cleanly provisioned RHEL-8 machine: > > # MID=`cat /etc/machine-id` > # KVER=`uname -r` > # BENTRY=/boot/loader/entries/$MID-$KVER.conf > # cat $BENTRY | grep options > options $kernelopts $tuned_params > > ^^^ notice there are variables $kernelopts and $tuned_params, which are > normally expanded by grub from the grub environment, e.g.: > > # grep kernelopts /boot/grub2/grubenv > kernelopts=root=UUID=78f056cb-1868-4fad-9ca1-67a25313709a ro console=tty0 > console=ttyS0,115200 crashkernel=auto net.ifnames=0 rhgb quiet > > ^^^ this is what will be expanded by grub for $kernelopts > > Let's set tuned_params to something: > # grub2-editenv /boot/grub2/grubenv set 'tuned_params=quiet' > > Then run grubby: > # grubby --args="default_hugepagesz=1G" --update-kernel=`grubby > --default-kernel` > > And re-check kernel options in the BLS entry: > # cat $BENTRY | grep options > options root=UUID=78f056cb-1868-4fad-9ca1-67a25313709a ro console=tty0 > console=ttyS0,115200 crashkernel=auto net.ifnames=0 rhgb quiet quiet > default_hugepagesz=1G > > ^^^ notice $kernelopts and $tuned_params got expanded and their content were > written literally to the BLS entry. This shouldn't happen and it's the > source of duplication described in the comment 0. I think it should either ignore the variables and add/remove grubby content after them or maybe it could read the variables and edit their content in the grubenv, but it shouldn't expand it into options. When updating a single BLS entry I think that grubby is going the correct thing, since the expected behavior there is to expand all the variables and write in the BLS entry. This is done because updating the variables in grubenv will change the kernel command line parameters of all the entries and only a single entry should be changed. Now, the grubby --update-kernel=ALL option should update the $kernelopts variable in the grubenv instead but there is a bug there since it's also expanding the variables and writing the result in the BLS entry. reproduced on RHEL-8.2-20191120.0 x86_64 1) install RHEL-8.2 2) backup /boot/loader/entries: # cp -a /boot/loader/entries /boot/loader/entries/backup 3) check that options are unexpanded in entry # MID=`cat /etc/machine-id` # KVER=`uname -r` # BENTRY=/boot/loader/entries/$MID-$KVER.conf # grep options $BENTRY options $kernelopts $tuned_params 4) run grubby # grubby --update-kernel=ALL --args="default_hugepagesz=1G" 5) check options again # grep options $BENTRY expanded options are present instead of $kernelopts etc. qa_ack+ Verified grubby-8.40-38.el8.x86_64 RHEL-8.2.0-20200227.0 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/RHBA-2020:1882 |