Categories

  • 13k Topics
    115k Posts
    L

    @Tom-Elliott
    Test result with the agent log: software waits for the rename/join restart, but not while the rejoin is still blocked

    Thanks a lot, Tom, for the quick work on this, for the agent change and for #2214. I tested it on a fresh Deploy: image captured with agent 0.1.35, server 1.6.1.59 (27a1194fb, dev-branch with #2214). The deferral works, but software still ran twice before it kicked in. Times are UTC (web server and agent logs are UTC+1 and have been converted).

    14:02:30 Post_Stage3.php, deploy finished (task complete, software status list cleared by #2214) 14:02:41 PXE boot.php (reboot after imaging) 14:03:06 Agent 0.1.35 enrolls (GET enroll, identity/check 409, POST enroll 200, identity/check 200) 14:04:06 PXE boot.php (second reboot, before the domain join) 14:04:22 Agent contacts (enroll, identity/check, poll 14:04:23) 14:04:26 "Run before software" snapin downloaded; result rc 0 at 14:05:11 14:06:49 SOFTWARE PASS 1: our package downloaded from the Chocolatey feed (200) 14:07:43 8 x POST /agent/v1/result: six packages "installed", rc 0; our Avast package has no status row. Agent update payload downloaded 14:07:54 Agent is now 0.1.36, update state ok 14:08:07 SOFTWARE PASS 2: package downloaded again; at 14:08:20 the six packages are "converged", still no row for the Avast package 14:08:23 POST /fog/agent/v1/directory/rejoin/start 14:08:25 AD: computer account password set (pwdLastSet) = the domain join 14:08:39 PXE boot.php: the rename/join restart 14:08:48 AD: computer object changed (whenChanged), first boot under the new name 14:08:49 First agent contact after the restart (enroll, identity/check, poll 14:08:54) 14:09:11 SOFTWARE PASS 3 (first one after the restart): package downloaded again (200) 14:09:31 Avast console: NO_SERVICES / ANTIVIRUS: INSTALLING 14:09:37 Avast package reported "installed", rc 0 (first time it has a status row); the other six "converged" 14:10:01 Pass 4: all seven packages "converged" 14:13:17 Avast console: SAFE / ANTIVIRUS: ACTIVATED (3 min 46 s after INSTALLING)

    The matching agent log lines (fog-agent.log, local time +01:00):

    15:04:25 directory rejoin: blocked (directory_observation_required) 15:07:42 software "avast-business-agent": installed, exit 4294967295, outcome failed, installed "" 15:07:54 directory rejoin: blocked (directory_observation_required) 15:08:19 software "avast-business-agent": installed, exit 4294967295, outcome failed, installed "" 15:08:24 directory rejoin: native success; Windows restart and verification pending 15:08:25 software: deferred; a rename or domain join is waiting for its restart 15:08:25 reboot: applied (directory-rejoin: directory rejoin needs a Windows restart, mode reboot) 15:08:54 directory rejoin: verified after Windows restart 15:09:35 software "avast-business-agent": installed, exit 0, outcome success, installed "1.0.0"

    What I see:

    The deferral works. software: deferred appears right after the join, and pass 3 only ran after directory rejoin: verified after Windows restart. The gap is before the join. From enrollment (15:03) until 15:08:24 the rejoin was blocked (directory_observation_required), so nothing was pending and software ran twice while the computer was still named INSTALACION (the image name). What is that observation, and could software also wait while a join is expected but still blocked? The failed run was not stored. The agent logged outcome failed (exit 4294967295) for our package in both early passes, and the 7 results were posted, but the host had only 6 software status rows, none for that package, until after the restart (point 2 of my first post is still open). The Avast install worked, but only thanks to our own name check in the package script, which made it skip passes 1 and 2 and let pass 3 through. The status list was empty right after the deploy finished, so #2214 works. That one is a big help, thank you.

    Happy to test a patch or send more logs.

  • Get the latest news on what's happening.
    208 Topics
    849 Posts
    Tom ElliottT

    FOG 1.6.1 is released. It is on the stable and master branches, and the tag is 1.6.1.

    Upgrade from your FOG source checkout:

    sudo bin/updatefog.sh --channel stable

    Or run git pull on stable, then bin/installfog.sh. The schema moves from 446 to 473, so the web UI asks for the schema update after the upgrade. Installs from master use FOS 1.6.1.

    Highlights

    IPv6: IPv6 listeners, opt-in DHCPv6, boot to the IPv6 address, and multicast over IPv6. FOS 1.6.1 adds IPv6 and udpcast over IPv6. Software management through the fog-agent, per host and per group, with Flatpak, Snap, and winget. Storage nodes: deploys balance across a group, and a full node overflows at PXE boot. AD rejoin and OU placement for deployed images. Roles can limit the networks their members use the web UI and API from. The Imaging Report records deploys and multicast joins to unregistered hosts. “Deploy image now” after Full Registration deploys with no reboot. MySQL 8.0.13+ installs and upgrades.

    Security: 1.6.1 is the first stable release with the fix for GHSA-q38j-qx5x-w25v (a Legacy Restricted user could read the AD join password and product keys). If you moved to the Patches channel to get that fix early, you can switch back with --channel stable.

    Offline installs: the installer now downloads udpcast from FOGProject/udpcast and checks its sha256. Put udpcast-v20250223-fog.1.tar.gz and its .sha256 in packages/ before you run the installer.

    Thank you to ASPePeX on GitHub for the OIDC trailing-slash fix (fog-plugins #49), and to everyone who tested and reported issues.

    Full release notes: https://github.com/FOGProject/fogproject/releases/tag/1.6.1

  • View tutorials or talk about FOG in general.
    2k Topics
    19k Posts
    Tom ElliottT

    @DBailey635 Good questions.

    Release: waiting for stable is sensible. The stable channel gets a release on the 11th of each month, and this feature is in the next one, on December 11.

    Check-ins: both OSes share one host and one hostname. The host list shows the most recent check-in from either OS. The host’s edit page lists each OS on its own line, with its agent version, last check-in, and certificate expiry. So you can see when Windows and Linux each last checked in.

    Separate hostnames for the domain join: not today. FOG applies the host’s one name to every OS, and the domain join follows the Windows install. A per-OS suffix (host01-win / host01-lnx) is a reasonable feature request. It needs a second computer account per machine, so it is not a small change.

    Deploy window: the default is 24 hours after FOG completes a deploy to the host. You can change it in FOG Configuration > FOG Settings > General Settings > FOG_AGENT_ENROLL_DEPLOY_WINDOW (in hours). A longer window does work, but for that whole time any machine that presents that host’s identity enrolls with no approval. For an OS that first boots months later, two better routes:

    Approve it when it shows up. The second OS waits in pending agents until you approve it, and it keeps retrying, so a student’s first boot just queues it. Put an agent enrollment token in the Linux image’s agent install (--token). Give the token enough uses and an expiry past the point where the course switches OS. The agent then enrolls on its first boot, whenever that is, without an approval click.

    No need to walk the room after imaging.

  • Report bugs, request features, or get the latest progress.
    2k Topics
    21k Posts
    L

    @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!

49

Online

12.8k

Users

17.7k

Topics

157.6k

Posts