Bug 1702724

Summary: tuned doesn't react to SIGHUP when wrong profile has been selected
Product: Red Hat Enterprise Linux 7 Reporter: Robin Hack <rhack>
Component: tunedAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED ERRATA QA Contact: Robin Hack <rhack>
Severity: unspecified Docs Contact: Katerina Nemcova <knemcova>
Priority: unspecified    
Version: 7.7CC: jeder, jmencak, jskarvad, knemcova, lkuprova, olysonek, thozza
Target Milestone: rcKeywords: AutoVerified, Patch, Triaged, Upstream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tuned-2.11.0-9.el7 Doc Type: Bug Fix
Doc Text:
.`tuned` no longer hangs on SIGHUP when a non-existent profile is selected When the `tuned` service receives the SIGHUP signal, it attempts to reload the profile. Prior to this update, `tuned` was unable to correctly handle situations when: * The `tuned` profile was set to a non-existent profile, or * The automatic profile selection mode was active and the recommended profile was non-existent. As a consequence, the `tuned` service became unresponsive and had to be restarted. This bug has been fixed, and the `tuned` service no longer hangs in the described scenarios. Note that the `tuned` behavior has changed with this update. Previously, when the user executed the `tuned-adm off` command and restarted the `tuned` service, `tuned` tried to load the recommended profile. Now, `tuned` loads no profile even if the recommended profile exists.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-29 19:36:52 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: 1757052, 1780577    

Description Robin Hack 2019-04-24 14:51:34 UTC
Description of problem:


Version-Release number of selected component (if applicable):
tuned-2.11.0-1.el7.noarch

How reproducible:
always

Steps to Reproduce:

# USE WRONG NONEXISTENT PROFILE
pushd /etc/tuned
echo "wrongdaybabenonexistentprofile" > active_profile
echo "manual" > profile_mode
popd

TUNED_PID=$(systemctl show -p MainPID tuned | cut -f2 -d'=')
kill -HUP $TUNED_PID

tuned-adm profile
...
No active profile selected

# TRY TO FIX PREVIOUS WRONG PROFILE
pushd /etc/tuned
echo "desktop" > active_profile
echo "manual" > profile_mode
popd

tuned-adm profile
...
No active profile selected


Actual results:
No active profile selected

Expected results:
Should load existing profile

Additional info:

Comment 2 Ondřej Lysoněk 2019-04-24 15:01:55 UTC
Good catch, thanks!

Comment 3 Ondřej Lysoněk 2019-11-27 10:43:46 UTC
*** Bug 1774645 has been marked as a duplicate of this bug. ***

Comment 5 Ondřej Lysoněk 2019-11-27 10:47:18 UTC
Upstream PR:
https://github.com/redhat-performance/tuned/pull/225

Comment 6 Ondřej Lysoněk 2019-12-02 11:49:31 UTC
(In reply to Ondřej Lysoněk from comment #5)
> Upstream PR:
> https://github.com/redhat-performance/tuned/pull/225

It got merged.

Comment 22 errata-xmlrpc 2020-09-29 19:36:52 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:3884