• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Feature request: Option to resume/re-run snapins interrupted by an installer-initiated reboot (behavior changed since 1.6)

    Scheduled Pinned Locked Moved Feature Request
    4 Posts 2 Posters 17 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      lf88
      last edited by

      Hi everyone,

      we use FOG to fully automate the installation of our PCs at the university, including several snapins for larger software packages. Some of these installers require a reboot in the middle of the installation and trigger that reboot themselves.

      Behavior up to FOG 1.5.10:
      When an installer rebooted the machine during the snapin run, the snapin task stayed open. After the reboot, the FOG client checked in again, received the same snapin task and the installation continued. This worked reliably for us and was an important part of our deployment workflow.

      Behavior since FOG 1.6:
      After the installer-initiated reboot, the snapin is no longer delivered again. The installation is left incomplete and has to be finished manually.

      I understand that the recommended approach is to suppress the installer’s reboot and use the “Reboot after install” option instead, and that the old behavior was probably more of a side effect than an intended feature. However, for complex installers with multiple stages this means splitting them into several snapins or writing wrapper scripts for each package, which is a lot of extra work and maintenance.

      Feature request:
      It would be very helpful to have a per-snapin option like “Resume after reboot” (or “Re-run if interrupted by a reboot”). If enabled, a snapin task that was started but never reported completion before the client rebooted would be delivered again on the next check-in. To prevent endless reboot loops, a configurable maximum number of retries (e.g. 3) would make sense, after which the task is marked as failed.

      Optionally, the client could also treat the common “reboot required” exit codes (3010 / 1641) as “success, reboot needed” and handle the reboot itself.

      Environment:
      FOG server version: 1.6.0.158
      FOG agent version: 0.1.2X
      Server OS: Ubuntu 24.04 LTS
      Client OS: Windows 11
      Example snapins affected: Siemens TIA Portal

      Finally, I’d like to say a big thank you to the whole FOG team. FOG has been a core part of our deployment workflow for years, and it’s impressive how much you’ve built and maintained as an open-source project, along with the support you provide here in the forum. Your work saves us countless hours every week, and we really appreciate it!

      Tom ElliottT 2 Replies Last reply Reply Quote 0
      • Tom ElliottT
        Tom Elliott @lf88
        last edited by

        @lf88 Thanks for the detailed report. On 1.6 the server still sends an interrupted snapin again, but the new agent can report the installer’s exit before Windows stops the agent, and that report closes the task. We are confirming this in the lab and will fix it in the agent, with a retry limit so a looping installer ends as failed. To help confirm: on the host’s snapin task, what exit code and status does the UI show for the TIA Portal run? The agent log line starting snapin “<name>” (task N): shows the same thing. Also, 3010 and 1641 are already treated as “success, reboot needed” by default, and the agent then reboots the machine.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 0
        • Tom ElliottT
          Tom Elliott @lf88
          last edited by

          @lf88 Update: in our lab, an installer that reboots the machine mid-run did get its snapin run again after the reboot, so the cause I described is not confirmed. The exit code you see on the TIA Portal snapin task is now the key piece. If the installer exits with a code before the reboot, the agent reports it and the task closes. Please also post the agent log lines around the reboot (C:\ProgramData\FOG\ log, lines starting snapin " and snapin result:).

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

          1 Reply Last reply Reply Quote 0
          • L
            lf88
            last edited by

            @Tom-Elliott Thanks a lot for looking into this so quickly!

            One detail I should have mentioned: the snapin is not the installer itself but a PowerShell script. The script reads the installation data directly from an SMB share and starts the installer, so the agent only sees the exit code of my script. I do it this way on purpose: the installation sources for TIA Portal and LabVIEW are around 50 GB, and this way they don’t have to be copied to every PC (possibly several times) as snapin files.

            Here are the relevant lines from C:\ProgramData\FOG\fogagent.log from a test run:

            2026-12-01T15:01:11+01:00 snapin “Siemens TiaPortal V19” (task 20183): ran, exit 11641, outcome failed (Enabling Windows Feature NetFX3)
            2026-12-01T15:01:11+01:00 update: deferred, a reboot is pending
            2026-12-01T15:01:11+01:00 reboot: applied (1 user(s) logged in, 60s warning (snapin: snapin “Siemens TiaPortal V19”), mode reboot)

            So your first theory is confirmed: my script passes the installer’s exit code back to the agent, the agent reports it as failed and closes the task, and then the agent itself reboots the machine. After the reboot the task is already closed, so the snapin isn’t run again. Unfortunately I can no longer reproduce exactly what was different under 1.5.10, since we’ve already migrated all our systems. My guess is that the old client simply didn’t get to report the exit code before the shutdown, but I can’t verify that anymore.

            The installers we use have dedicated exit codes for “not finished yet, reboot needed”:

            Siemens TIA Portal: 11641 = NotCompleteReboot, 13010 = NotCompleteRebootRequired (plus the usual 0 / 1641 / 3010 and error codes)
            NI Package Manager (LabVIEW): -125071 = “A system reboot is needed to complete the transaction”, -125804 = “The transaction finished successfully. A system reboot was triggered.”

            Both installers allow suppressing their own reboot, so I could handle this entirely in my script. But the cleaner way would be for FOG to do the reboot and keep track of it: the agent already reboots the machine in this case anyway, and with FOG in charge, every stage (run, reboot, re-run, final result) would be logged and visible on the snapin task.

            So it would be great if a snapin could tell the agent “reboot and run me again”, for example via configurable exit codes per snapin, with the retry limit you mentioned. Then my script could simply pass these codes through and FOG would handle the rest.

            Thanks again for the quick help and for all your work on FOG!

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post

            50

            Online

            12.8k

            Users

            17.7k

            Topics

            157.6k

            Posts
            Copyright © 2012-2026 FOG Project