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

    FOG 1.6 – Dependencies between Software Management and Snapins?

    Scheduled Pinned Locked Moved Unsolved FOG Problems
    6 Posts 3 Posters 35 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.
    • Y
      Yuuki
      last edited by

      Hi.

      I’m using FOG 1.6 with the new FOG Agent and both the Software Management (Chocolatey) and Snapin modules.

      My problem is that there doesn’t seem to be a shared execution order or dependency system between Software and Snapins.

      Example:

      Software Management installs several applications via Chocolatey.

      Snapins perform additional configurations.

      My final Snapin runs Sysprep and shuts down Windows for image capture.

      Unfortunately, the Sysprep Snapin sometimes runs before all software packages have finished installing, resulting in an incomplete image.

      My question:

      Is there a way to make a Snapin wait until all assigned software packages and other Snapins have successfully completed?

      Ideally, I would like to configure dependencies across both modules or ensure Sysprep always runs last.

      Thanks!

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

        @Yuuki You found a real ordering problem. The FOG Agent runs its modules one at a time, in the order the server sends them, and on 1.6 that order puts snapins before software. So on any check-in that carries both, your Sysprep snapin runs before Chocolatey starts.

        The fix is in progress:

        • Software will always run before snapins. This is fixed in both the server and the agent, so updating either one gets you the order.
        • Each software entry gets a new option, Stop snapins if this fails (off by default). With it on, a failed install holds the host’s snapins. At the next check-in the agent tries the software again, and it runs the snapins only after the install succeeds.
        • Snapins already have Abort snapin sequence on failure on the snapin task. Turn it on when you queue the snapins, so Sysprep does not run after a failed configuration snapin.

        Until the fix reaches you, there are two workarounds:

        • Assign the software first. Wait until the host’s Software Status tab shows every entry as installed or converged. Then queue the snapins.
        • Or install those packages with the Chocolatey snapin templates instead of Software Management. Snapins run in their queue order, so put Sysprep last.

        I will post here when it is in a release.

        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 @Yuuki
          last edited by

          @Yuuki FOG Agent v0.1.26 is released. It always runs software before snapins, whatever FOG server version you have. So your Sysprep snapin no longer starts before Chocolatey has finished.

          Agents update themselves when FOG Configuration → FOG Agent → update mode is Latest, which is the default from 1.6.0.158. Updates go out in rings (default 0,3,7 days), and a host with no ring uses the last one. So your PCs pick up v0.1.26 on their own within about a week.

          To get it on your build machines now, do one of these on each host:

          • Set Agent Update Ring to 0.
          • Or set Desired Agent Version to 0.1.26.

          If the update mode shows Off, set it to Latest, or use the per-host Desired Agent Version above.

          The server half, the Stop snapins if this fails option on a software entry, is going into dev-branch now. It reaches stable with the next monthly release, on December 11. Until then, the agent gives you the right order, but a failed package does not hold the snapins. So check the host’s Software Status tab before you capture.

          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

          L 1 Reply Last reply Reply Quote 0
          • L
            lperoma @Tom Elliott
            last edited by lperoma

            @Tom-Elliott

            Thanks Tom, this is useful for us too. We use the same modules, and we have the opposite constraint to the one in the first post. We haven’t hit it yet (our hosts are still on 0.1.24, and we’ll test 0.1.26 on a VM first), but it follows directly from the new order.

            Our setup

            • One group with Chocolatey packages, including Avast Business (its own package generated by us).
            • In the same group, one snapin run with powershell.exe that checks the Windows activation.

            What we expect

            • Once Avast is installed it generally blocks PowerShell on our machines, so PowerShell snapins stop working.
            • Until now the snapin ran first and the software after, so they never collided. With software always before snapins, the Avast package may install first and block the snapin.

            Two suggestions, both as a per-snapin flag on the group’s snapin grant (so only the snapins that need it are affected, and other groups behave as today):

            1. Run before software. A flag on a snapin granted by a group, to run it before the host’s software instead of after.
            2. Run when a host joins the group. Today a group’s snapins are only used when a task is created (Deploy, Single Snapin, All Snapins). Software is applied as soon as a host is in the group; it would be handy for such a flagged snapin to be queued once when a host joins, if the host never completed it before.

            Both default to off, so nothing changes for anyone who doesn’t set them. We’re happy to test any patch on our server.

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

              @lperoma Thanks for raising this before you hit it. You’re right: with software always first, the Avast package can install before your PowerShell snapin runs.

              Run before software is coming, close to what you asked for. It is a checkbox on the snapin itself, off by default. On a host with both, the agent then works in three steps:

              • snapins marked Run before software, in their queue order;
              • the software set;
              • every other snapin.

              I put the flag on the snapin rather than on each group grant. “This snapin must run before packages” is a fact about the snapin, so you set it once and every group follows it. If a snapin marked this way has not finished, for example a retry, the software waits for it until the next check-in.

              It needs both halves: the next FOG Agent release, and the server change, which reaches stable with the December 11 release. I’ll post here when both are out, and we’d welcome your VM test then.

              One thing to know in the meantime: the old order only protected you when the software and the snapin task arrived in the same check-in. Software is applied as soon as a host joins the group, and a snapin runs only when a task is created. So a host that joined the group earlier already had Avast before the snapin ran.

              Run when a host joins the group is a bigger change. It turns a group’s snapins into something like desired state, so FOG would have to track “this host completed it” and decide when to re-run. That is the job Software Management does for packages, so it needs its own design. I’m not building it now. If you open a GitHub issue with your use case, it has a place to land.

              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 @lperoma
                last edited by

                @lperoma Run before software is ready to test.

                • Agent: FOG Agent v0.1.27 is released. It runs snapins marked Run before software first, then the software set, then the other snapins.
                • Server: the Run before software checkbox is going into dev-branch now. You find it on the snapin’s General tab, under Snapin Arguments Hidden. It reaches stable with the December 11 release.

                For your VM test before then:

                • Put the test server on dev-branch.
                • Get the VM on v0.1.27. Set its Agent Update Ring to 0, or set its Desired Agent Version to 0.1.27.
                • On the activation snapin, turn on Run before software, and queue it with the Avast package assigned.

                What you should see in the agent log on that check-in:

                • the activation snapin’s result first;
                • then the software lines, Avast included;
                • then any other snapins.

                If the activation snapin comes back as a retry, the agent holds the software until the next check-in, so Avast does not install ahead of it.

                Two things to know:

                • An agent older than v0.1.27 ignores the flag and still runs the snapin after the software. So check the agent version before you judge the result.
                • If you import snapins from a CSV with no header row, the new column shifts the columns after Snapin Arguments Hidden. An export from the UI has a header row and is not affected.

                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
                • 1 / 1
                • First post
                  Last post

                40

                Online

                12.8k

                Users

                17.7k

                Topics

                157.5k

                Posts
                Copyright © 2012-2026 FOG Project