Bug 2029405

Summary: tuned should not depend on subscription-manager
Product: Red Hat Enterprise Linux 9 Reporter: Jaroslav Škarvada <jskarvad>
Component: tunedAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED ERRATA QA Contact: Robin Hack <rhack>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 9.0CC: amoralej, bstinson, jeder, jskarvad, jwboyer, jzerdik, rhack, sam
Target Milestone: rcKeywords: TestCaseNotNeeded, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2028865 Environment:
Last Closed: 2022-05-17 15:59:36 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: 2028865    
Bug Blocks:    

Description Jaroslav Škarvada 2021-12-06 12:12:16 UTC
+++ This bug was initially created as a clone of Bug #2028865 +++

Description of problem:
I've installed tuned and it's pulled in subscription-manager which serves no purpose on CentOS Stream.



  [admin@ipa-test0 ~]$ dnf repoquery --whatrequires subscription-manager --installed
  Not root, Subscription Management repositories not updated
  This system is not registered with an entitlement server. You can use subscription-manager to register.
  tuned-0:2.16.0-3.el9.noarch


Version-Release number of selected component (if applicable):
tuned-0:2.16.0-3.el9.noarch


How reproducible:
Very


Steps to Reproduce:
1. Install CentOS stream
2. Install tuned


Actual results:
subscription-manager is installed


Expected results:
subscription-manager shouldn't be pulled in just because tuned is installed.

--- Additional comment from Jaroslav Škarvada on 2021-12-06 12:11:42 CET ---

Is there some macro to distinguish between centos and rhel? If yes, we could add it as conditional. We need subscription manager in rhel and currently it's softdep.

--- Additional comment from Jaroslav Škarvada on 2021-12-06 12:31:44 CET ---

It seems there is %centos macro:
centos:
$ rpm --eval %rhel
8
$ --eval %centos
8

rhel:
$ rpm --eval %rhel
8
$ rpm --eval %centos
%centos

--- Additional comment from Jaroslav Škarvada on 2021-12-06 12:45:45 CET ---

Upstream PR:
https://github.com/redhat-performance/tuned/pull/391

--- Additional comment from Jaroslav Škarvada on 2021-12-06 13:07:56 CET ---

To be honest I have no idea how to get this fix to the CentOS stream. The Zuul CI is failing that it needs approved RHEL bugzilla, so we will probably need RHEL bug.

Comment 2 Jaroslav Škarvada 2021-12-06 15:43:09 UTC
*** Bug 2028865 has been marked as a duplicate of this bug. ***

Comment 6 Alfredo Moralejo 2022-02-03 09:12:02 UTC
This change seems to have broken tuned automatic detection when subscription-manager is not installed:

With tuned-2.17.0-1.el9.noarch

2022-02-03 09:06:52,805 INFO     tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration.
2022-02-03 09:06:52,873 ERROR    tuned.utils.profile_recommender: Failed to process 'syspurpose_role' in '/usr/lib/tuned/recommend.d/50-tuned.conf'                                                            , the syspurpose module is not available
2022-02-03 09:06:52,874 INFO     tuned.daemon.daemon: Using 'atomic-host' profile
2022-02-03 09:06:52,875 ERROR    tuned.daemon.daemon: Cannot set initial profile. No tunings will be enabled: Requested profile 'atomic-host' doesn't exist.
2022-02-03 09:06:52,877 INFO     tuned.daemon.controller: starting controller

[root@n36 log]# tuned-adm active
No current active profile.


When i install subscription-manager:


2022-02-03 09:09:45,855 INFO     tuned.daemon.application: dynamic tuning is globally disabled
2022-02-03 09:09:45,862 INFO     tuned.daemon.daemon: using sleep interval of 1 second(s)
2022-02-03 09:09:45,863 INFO     tuned.daemon.daemon: Running in automatic mode, checking what profile is recommended for your configuration.
2022-02-03 09:09:46,056 INFO     tuned.daemon.daemon: Using 'throughput-performance' profile
2022-02-03 09:09:46,058 INFO     tuned.profiles.loader: loading profile: throughput-performance
2022-02-03 09:09:46,064 INFO     tuned.daemon.controller: starting controller
2022-02-03 09:09:46,064 INFO     tuned.daemon.daemon: starting tuning
2022-02-03 09:09:46,085 INFO     tuned.plugins.base: instance cpu: assigning devices cpu7, cpu0, cpu4, cpu2, cpu1, cpu3, cpu6, cpu5
2022-02-03 09:09:46,088 INFO     tuned.plugins.plugin_cpu: We are running on an x86 AuthenticAMD platform
2022-02-03 09:09:46,093 INFO     tuned.plugins.base: instance disk: assigning devices dm-3, dm-1, sdb, sda, dm-4, dm-0, dm-2
2022-02-03 09:09:46,095 INFO     tuned.plugins.plugin_cpu: setting governor 'performance' on cpu 'cpu7'
2022-02-03 09:09:46,095 INFO     tuned.plugins.plugin_cpu: setting governor 'performance' on cpu 'cpu0'
2022-02-03 09:09:46,096 INFO     tuned.plugins.plugin_cpu: setting governor 'performance' on cpu 'cpu4'
2022-02-03 09:09:46,096 INFO     tuned.plugins.plugin_cpu: setting governor 'performance' on cpu 'cpu2'
2022-02-03 09:09:46,097 INFO     tuned.plugins.plugin_cpu: setting governor 'performance' on cpu 'cpu1'
2022-02-03 09:09:46,097 INFO     tuned.plugins.plugin_cpu: setting governor 'performance' on cpu 'cpu3'
2022-02-03 09:09:46,098 INFO     tuned.plugins.plugin_cpu: setting governor 'performance' on cpu 'cpu6'
2022-02-03 09:09:46,098 INFO     tuned.plugins.plugin_cpu: setting governor 'performance' on cpu 'cpu5'
2022-02-03 09:09:46,102 INFO     tuned.plugins.plugin_sysctl: reapplying system sysctl
2022-02-03 09:09:46,102 INFO     tuned.daemon.daemon: static tuning from profile 'throughput-performance' applied


[root@n36 log]# tuned-adm active
Current active profile: throughput-performance

Comment 8 errata-xmlrpc 2022-05-17 15:59:36 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 (new packages: tuned), 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-2022:4000