Bug 2062051

Summary: power-button-action doesn't work on RHEL8.5 KVM
Product: Red Hat Enterprise Linux 8 Reporter: Lili Huang <lilhuang>
Component: gnome-settings-daemonAssignee: Felipe Borges <feborges>
Status: CLOSED ERRATA QA Contact: Jiri Prajzner <jprajzne>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.5CC: feborges, jprajzne, mboisver, sbarcomb, tpelka
Target Milestone: rcKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gnome-settings-daemon-3.32.0-18.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-16 08:42:37 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:

Description Lili Huang 2022-03-09 03:21:39 UTC
Description of problem:

power-button-action doesn't work on RHEL8.5 KVM. 

Host OS:
-----------------
# virsh shutdown --mode=acpi <KVM name>
-----------------

Guest OS:
-----------------
# gsettings get org.gnome.settings-daemon.plugins.power power-button-action
'nothing'
# cat /etc/systemd/logind.conf | grep -v ^#

[Login]
HandlePowerKey=ignore
-----------------

The test result is,

RHEL8.4 Host + RHEL8.4 Guest, "power-button-action=nothing" works fine, when trying to shutdown the KVM via --mode=acpi , the KVM dose nothing (will not shutdown).

RHEL8.4 Host + RHEL8.5 Guest, "power-button-action=nothing" doesn't work. KVM shutdown even if use --mode=acpi.

BTW, "HandlePowerKey=ignore" is effective because boot the RHEL8.5 Guest to runlevel 3, the KVM will not shutdown when use acpi mode.

But When the host machine is updated to 8.5, both on 8.4 guest and 8.5 guest, the "power-button-action=nothing" doesn't take effect.

I'm not sure it's an issue of power-button-action key or virt of 8.5


Version-Release number of selected component (if applicable):


How reproducible:
100% reproducible.

Steps to Reproduce:

1. On KVM guest machine, setup as below,

/etc/dconf/db/local.d/01-power
[org/gnome/settings-daemon/plugins/power]
power-button-action='nothing'

/etc/dconf/db/local.d/locks/01-power
/org/gnome/settings-daemon/plugins/power/power-button-action

# dconf update

/etc/systemd/logind.conf 
[Login]
HandlePowerKey=ignore

2. On Host machine run # virsh shutdown --mode=acpi <KVM name>

3. Check if the guest is shutdown or not.

Actual results:
the guest OS is shutdown even if set power-button-action to nothing.

Expected results:
the guest OS should not shutdown when power-button-action='nothing'

Additional info:

Comment 12 errata-xmlrpc 2023-05-16 08:42:37 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 (gnome-settings-daemon 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-2023:2905