Skip to content

fog-agent unable to reboot a Linux computer due to active block inhibitor #30

Closed

Description

@Sempyos

Describe the bug
When the fog-agent is installed on a Linux computer that has an active systemd inhibitor (systemd-inhibit --list), it will be unable to be rebooted.

To Reproduce
Steps to reproduce the behavior:

  1. Install the fog-agent onto Fedora Workstation
  2. Run a deploy task from FOG
  3. Check the fog-agent.service logs on your client after it receives the request
  4. See it output reboot: Failed to schedule shutdown: Operation denied due to active block inhibitor

Expected behavior
The fog-agent should force a reboot regardless

Screenshots
N/A

Software (please complete the following information):

  • FOG version: 1.6 RC 11
  • OS: Rocky Linux 10.2

Additional context
Unsure if Windows clients have a similar issue

Also unsure which repo to put this in, as apologies if I should have used the fog-agent one

Activity

  1. mastacontrola commented on Oct 14, 2026

    @mastacontrola
    Member

    Thanks for the report. I moved it here from the fogproject repo, since the problem is in the agent.

    Cause: logind enforces systemd block inhibitor locks. The agent reboots through logind (shutdown +N or systemctl reboot), so logind refused it. The agent then retried on every poll and never rebooted. Root also cannot skip the lock with systemctl -i, because logind then asks polkit for an interactive answer.

    Fix: v0.1.16 (#31). When logind refuses, the agent now starts reboot.target directly through systemd. This is the same orderly reboot logind runs when it allows one. If a reboot has a warning delay, the agent creates fog-agent-reboot.timer for the countdown and sends the warning with wall. To cancel it, run systemctl stop fog-agent-reboot.timer. Windows already worked this way with shutdown /f.

    To get it: an agent on the "latest" update ring updates itself to v0.1.16. You can also install it from the v0.1.16 release.

    Can you tell us which program held the lock? Run systemd-inhibit --list while the reboot is blocked and paste the output. A package manager in the middle of a transaction would be cut off by the new behavior, and we want to know if that is the case you hit.

  2. Sempyos commented on Oct 14, 2026

    @Sempyos
    Author

    It was just the gnome session

    ModemManager   0    root 1138 ModemManager    sleep                                                    ModemManager needs to reset devices                         delay
    NetworkManager 0    root 1233 NetworkManager  sleep                                                    NetworkManager needs to turn off networks                   delay
    UPower         0    root 1050 upowerd         sleep                                                    Pause device polling                                        delay
    GNOME Shell    1000 user 3340 gnome-shell     sleep                                                    GNOME needs to lock the screen                              delay
    GNOME Shell    1000 user 3340 gnome-shell     sleep                                                    GNOME needs to save screen time data                        delay
    user           1000 user 3481 gsd-power       handle-lid-switch                                        External monitor attached or configuration changed recently block
    user           1000 user 3480 gsd-media-keys  handle-power-key:handle-suspend-key:handle-hibernate-key GNOME handling keypresses                                   block
    user           1000 user 3316 gnome-session-s shutdown                                                 user session inhibited                                      block
    user           1000 user 3480 gsd-media-keys  sleep                                                    GNOME handling keypresses                                   delay
    user           1000 user 3481 gsd-power       sleep                                                    GNOME needs to lock the screen                              delay
    
  3. Sempyos commented on Oct 14, 2026

    @Sempyos
    Author

    Tested the new version, works perfectly

    However, we are running into a new issue:
    Our entirely stock Fedora 44 Workstation is not updating the client. All of our Windows 11 images were able to. There was no logs on the machine itself from journalctl or systemctl and history items > agent activity showed nothing about updating. I'm unsure if this is a known issue, so just saying here for now.

    Also if there is a more preferred communication channel for this, please let me know

  4. Sempyos commented on Oct 14, 2026

    @Sempyos
    Author

    Nevermind that update issue, seems something caused the agent to just lock up, rebooting twice fixed it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions