Bug 1263572 - print more details about inhibit lock when user wants to power off the system
print more details about inhibit lock when user wants to power off the system
Status: NEW
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gnome-shell (Show other bugs)
7.1
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Florian Müllner
Desktop QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-16 04:38 EDT by Karel Srot
Modified: 2017-09-27 23:55 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Karel Srot 2015-09-16 04:38:14 EDT
Description of problem:

When a user wants to shut down a system while the shutdown is prevented by systemd inhibit lock the message displayed is not very helpful in clarifying the reason for the lock (or that there is any lock at all)

The actual message is:
With RHEL-7.1, gnome-shell-3.8.4-45.el7.x86_64
Authentication is required for powering off the system while an application asked to inhibit it

With RHEL-7.2, gnome-shell-3.14.4-24.el7.x86_64
no window/message is displayed at all

Version-Release number of selected component (if applicable):
gnome-shell-3.8.4-45.el7.x86_64
gnome-shell-3.14.4-24.el7.x86_64


How reproducible:
always

Steps to Reproduce:
1. ### set up an inhibit lock, e.g. by installing rpm-plugin-systemd-inhibit and executing rpm/yum transaction or
# systemd-inhibit --what=shutdown --who=root --why="because I can" --mode=block sleep 60
2. try to shutdown a system from gnome-shell
3.

Actual results:
Authentication is required for powering off the system while an application asked to inhibit it
or
No information at all that the shutdown was prevented (gnome-shell-3.14.4-24.el7.x86_64)

Expected results:
Authentication is required for powering off the system while an application asked to inhibit it:
     Who: RPM (UID 0/root, PID 3401/yum)
     Why: Transaction running


Additional info:

This information is visible in the console

[root@localhost ~]# systemd-inhibit --list
     Who: NetworkManager (UID 0/root, PID 728/NetworkManager)
    What: sleep
     Why: NetworkManager needs to turn off networks
    Mode: delay

     Who: test (UID 1001/test, PID 2835/gnome-settings-)
    What: sleep
     Why: GNOME needs to lock the screen
    Mode: delay

     Who: test (UID 1001/test, PID 2835/gnome-settings-)
    What: handle-lid-switch
     Why: Multiple displays attached
    Mode: block

     Who: test (UID 1001/test, PID 2835/gnome-settings-)
    What: handle-power-key:handle-suspend-key:handle-hibernate-key
     Why: GNOME handling keypresses
    Mode: block

     Who: GNOME Shell (UID 1001/test, PID 2979/gnome-shell)
    What: sleep
     Why: GNOME needs to lock the screen
    Mode: delay

     Who: RPM (UID 0/root, PID 3401/yum)
    What: shutdown
     Why: Transaction running
    Mode: block

     Who: RPM (UID 0/root, PID 3401/yum)
    What: shutdown
     Why: Transaction running
    Mode: block

7 inhibitors listed.

[test@localhost root]$ reboot
Operation inhibited by "RPM" (PID 3401 "yum", user root), reason is "Transaction running".
Operation inhibited by "RPM" (PID 3401 "yum", user root), reason is "Transaction running".
User root is logged in on sshd.
User root is logged in on sshd.
Please retry operation after closing inhibitors and logging out other users.
Alternatively, ignore inhibitors and users with 'systemctl reboot -i'.

Note You need to log in before you can comment on or make changes to this bug.