Bug 1779717

Summary: Failed to get unit file state for ksm.service: No such file or directory
Product: Red Hat Enterprise Linux 8 Reporter: Jaroslav Škarvada <jskarvad>
Component: tunedAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED NOTABUG QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: medium    
Version: 8.2CC: jeder, jskarvad, lcapitulino, pezhang, ppandit, qe-baseos-daemons
Target Milestone: rcKeywords: Triaged
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1591431 Environment:
Last Closed: 2021-06-02 06:44:46 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: 1591431    
Bug Blocks: 1932086    

Comment 1 Ondřej Lysoněk 2020-09-02 15:18:52 UTC
The issue is still reproducible with tuned-2.14.0-3.el8.noarch, but the error is a bit different:

2020-09-02 11:14:26,870 ERROR    tuned.plugins.plugin_script: script '/usr/lib/tuned/cpu-partitioning/script.sh' error output: 'Unit ksm.service does not exist, proceeding anyway.
Unit ksmtuned.service does not exist, proceeding anyway.'

We should be able to fix it with a similar patch as posted here
https://bugzilla.redhat.com/show_bug.cgi?id=1591431#c2

Comment 4 Prasad Pandit 2021-06-02 06:44:46 UTC
===
# systemctl mask ksm ksmtuned
Unit ksm.service does not exist, proceeding anyway.
Unit ksmtuned.service does not exist, proceeding anyway.
Created symlink /etc/systemd/system/ksm.service → /dev/null.
Created symlink /etc/systemd/system/ksmtuned.service → /dev/null.

# systemctl unmask ksm ksmtuned
Removed /etc/systemd/system/ksm.service.
Removed /etc/systemd/system/ksmtuned.service.
#
===

* Above error is reported by systemctl(1) if ksm/ksmtuned services are not installed.

* ksm/ksmtuned services are installed via qemu-kvm-common package
  qemu-kvm-common package is installed as dependency for qemu-kvm package

   qemu-kvm -> qemu-kvm-core -> qemu-kvm-common

* Above error is unlikely to occur on virt-rt systems which will have
  above packages installed.

* Recent tuned(8) upstream change removes usage of enable_ksm/disable_ksm functions
  from -realtime profile

* ie. this issue does does not seem relevant for RHEL-8/virt-rt scenario.

* A possible solution is to define 'qemu-kvm-common' package as 'Requirement'
  for tuned-profiles package which use ksm, ksmtuned services.

* Closing this bug here.