Bug 1461279
Summary: | Heredity of cmdline works wrong when using 'replace=false' | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Tereza Cerna <tcerna> |
Component: | tuned | Assignee: | Jaroslav Škarvada <jskarvad> |
Status: | CLOSED ERRATA | QA Contact: | Tereza Cerna <tcerna> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.4 | CC: | jeder, jskarvad, olysonek, psklenar |
Target Milestone: | rc | Keywords: | Patch, Upstream |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | tuned-2.9.0-0.1.rc1.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2018-04-10 16:04:16 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: | 1465887, 1467576, 1485946 |
Description
Tereza Cerna
2017-06-14 06:29:46 UTC
Info for QA: This bug was found in automated test case /CoreOS/tuned/Regression/add-bootloader-plugin-for-heredity-of-cmdline-options in phase 'TEST 3' I am currently not sure whether it's actually bug. The line "cmdline2=-quiet intel_pstate=disable" tries to match and remove string "quiet intel_pstate=disable" which is not there, the following will do the trick: # cat /usr/lib/tuned/child-profile/tuned.conf [main] include=parent-profile [bootloader] replace=false cmdline1=+nosoftlockup cmdline2=-quiet cmdline2.5=-intel_pstate=disable cmdline3=nmi_watchdog=1 I.e. it will try to remove strings "quiet" and "intel_pstate=disable". Of course we could learn the plugin to automatically split it which will be probably more user friendly. RFE implemented upstream: https://github.com/redhat-performance/tuned/commit/f068a031a820ae48426cb8c99e38a8873988a570 Actually it's not a bug, it's meant to be a feature :). The reason I implemented it this way is to account for the following: # cat /usr/lib/tuned/parent-profile/tuned.conf [bootloader] cmdline=some_option 1 other_option 1 # cat /usr/lib/tuned/child-profile/tuned.conf [main] include=parent-profile [bootloader] cmdline1=-other_option 1 Where the '1' belongs to the options 'some_option' and 'other_option'. After applying the child profile with the new implementation, you would get 'cmdline=some_option', which is not what you want. I'm not sure if such options exist in the kernel though. (In reply to Ondřej Lysoněk from comment #6) > Actually it's not a bug, it's meant to be a feature :). The reason I > implemented it this way is to account for the following: > > # cat /usr/lib/tuned/parent-profile/tuned.conf > [bootloader] > cmdline=some_option 1 other_option 1 > > # cat /usr/lib/tuned/child-profile/tuned.conf > [main] > include=parent-profile > > [bootloader] > cmdline1=-other_option 1 > > > Where the '1' belongs to the options 'some_option' and 'other_option'. After > applying the child profile with the new implementation, you would get > 'cmdline=some_option', which is not what you want. I'm not sure if such > options exist in the kernel though. I thought it's not a bug. If I am not mistaken it should be safe to split the cmdline by spaces (and also more user friendly). IMHO the cmdline is free text, interpreted by dracut, it's scripts, kernel modules (or builtins) and AFAIK space is taken as a separator. At the moment I am not aware of anything interpreting it different way, but of course such thing can exists. To be 100% safe we could add modifier for not doing the auto-split. tuned-2.9.0-0.1.rc1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-d9c6b990df tuned-2.9.0-0.1.rc1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-d9c6b990df tuned-2.9.0-0.1.rc1.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-5f0849d207 tuned-2.9.0-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-0e45ce4685 tuned-2.9.0-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-c30e9bd1ea ============================ Verified in: tuned-2.9.0-1.el7.noarch PASS ============================ :: [ LOG ] :: ===== Apply child profile ===== :: [ PASS ] :: Command 'tuned-adm profile test3-child-profile' (Expected 0, got 0) :: [ PASS ] :: Command 'grep ERROR /var/log/tuned/tuned.log' (Expected 1, got 1) :: [ PASS ] :: Command 'grep 'set tuned_params=' /boot/grub2/grub.cfg > output' (Expected 0, got 0) :: [ LOG ] :: There should be: noexec=on nosoftlockup nmi_watchdog=1 :: [ PASS ] :: Command 'grep noexec=on output' (Expected 0, got 0) :: [ PASS ] :: Command 'grep nosoftlockup output' (Expected 0, got 0) :: [ PASS ] :: Command 'grep nmi_watchdog=1 output' (Expected 0, got 0) :: [ LOG ] :: There shouldn't be: intel_pstate=disable quiet :: [ PASS ] :: Command 'grep intel_pstate=disable output' (Expected 1, got 1) :: [ PASS ] :: Command 'grep quiet output' (Expected 1, got 1) ============================ Reproduced in: tuned-2.8.0-5.el7.noarch FAIL ============================ :: [ LOG ] :: ===== Apply child profile ===== :: [ PASS ] :: Command 'tuned-adm profile test3-child-profile' (Expected 0, got 0) :: [ PASS ] :: Command 'grep ERROR /var/log/tuned/tuned.log' (Expected 1, got 1) :: [ PASS ] :: Command 'grep 'set tuned_params=' /boot/grub2/grub.cfg > output' (Expected 0, got 0) :: [ LOG ] :: There should be: noexec=on nosoftlockup nmi_watchdog=1 :: [ PASS ] :: Command 'grep noexec=on output' (Expected 0, got 0) :: [ PASS ] :: Command 'grep nosoftlockup output' (Expected 0, got 0) :: [ PASS ] :: Command 'grep nmi_watchdog=1 output' (Expected 0, got 0) :: [ LOG ] :: There shouldn't be: intel_pstate=disable quiet :: [ FAIL ] :: Command 'grep intel_pstate=disable output' (Expected 1, got 0) :: [ FAIL ] :: Command 'grep quiet output' (Expected 1, got 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-2018:0879 |