• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. Tom Elliott
    3. Posts
    • Profile
    • Following 27
    • Followers 83
    • Topics 141
    • Posts 19,427
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: A reimaged host stays stuck on an old directory join plan ("marker absent; automatic retry refused")

      @lperoma Thanks for the detailed report. Your reading of the code is right. I opened https://github.com/FOGProject/fogproject/pull/2122 to fix both problems.

      On your open question: the first attempt did run. The server stores awaiting_reboot only when the agent reports that Windows accepted the join. Your state also has last_deploy_task_id equal to trigger_task_id (16923), and that is set only when the agent claims the plan. So the join ran after Deploy 16923, and Windows waited for a restart. The disk was reimaged by 16927 before that restart, so the agent never reported “verified”. That also explains why the computer account in AD looked healthy.

      What changes in #2122:

      • A newer Deploy now supersedes an old attempt in started, awaiting_reboot, unknown or failed. Three things must be true: the agent has no marker for the old attempt, a newer Deploy has completed, and the machine booted after that Deploy ended. FOG then drops the old attempt, writes an audit entry, and plans a new join from the new Deploy. If the agent still has the marker, the old attempt stays.
      • The “Clear directory operation review” checkbox no longer marks the newest Deploy as used. It uses up only the cleared attempt’s own Deploy. It also keeps the workgroup flag and the observation. If a newer Deploy exists, the next check-in can plan the join again.
      • With the first change, a reimaged host no longer needs the checkbox, so I did not add a hint to the Active Directory panel.

      On queued tasks and snapins from the previous install: this PR changes only the directory join plans.

      The fix reaches the patches channel after the PR merges. Your hand-written state on test-uefi does no harm.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: FOG 1.6: Can you install agent in each dual- or multiple-boot operating system or just one OS?

      @DBailey635 Not in the current release. The agent identifies the machine by its firmware ID and MACs, so both OSes map to the same FOG host. Today a host holds one agent key. When the second OS enrolls, it waits for approval as a re-bind, and approving it retires the first OS’s key. So for now the agent works in one OS per host, the same as the old client.

      We are adding support for this. Each OS on a host gets its own agent key. Snapins can target an OS, so a Windows snapin waits until Windows boots. The product key and the domain join go only to the Windows install. If you deploy the image with FOG, both OSes enroll on their own within the deploy window. You can follow the work here: https://github.com/FOGProject/fog-agent/issues/53

      I’ll update this thread when it is in a release.

      posted in General
      Tom ElliottT
      Tom Elliott
    • RE: Feature request: a way to handle USB Ethernet adapters shared between many hosts

      @lperoma Thanks for the detail. There are two server fixes and one agent fix.

      Please update instead of copying files this time. This fix changes the database (schema step 465), and the code depends on it. Copied files without that step make enrollment saves fail in a new way. Your server is also now several changes past 1.6.0.158. Run the updater on the patches channel. It installs the files and runs the schema update together. Or wait for the stable release on December 11.

      Server (FOG PRs #2116 and #2118):

      • Agent enrollment now follows the boot rule for a shared adapter. The firmware names one host, and the adapter’s MAC is on another host. If that other host’s stored serial differs from the reported serial, the firmware’s host wins. Your laptop then enrolls as its own host, with the normal “known-host-no-agent” reason.
      • The firmware host must match the serial too. A copied UUID alone never wins over a MAC.
      • Any other disagreement stays an identity conflict. The row is now saved with no host, instead of host 0, so the foreign key no longer refuses it. The agent gets “pending”, not 409, and the row shows in All Pending Agents.
      • For a conflict, All Pending Agents now shows which other host has the MAC. After you remove the cause (for example the stray MAC), the next agent poll binds the request to the right host. Then you approve it. A conflict is never approved automatically, not by a token and not by a recent deploy (#2118 closes this for older agents too).

      Agent (fog-agent PR FOGProject/fog-agent#52): a key whose first request went in without the directory feature cannot add the feature later. That is deliberate on the server. The agent now makes a new key once when the server answers enrollment_upgrade_requires_new_key, and enrolls again. This is in agent v0.1.28. Agents update to it on their own.

      posted in Feature Request
      Tom ElliottT
      Tom Elliott
    • RE: FOG 1.6.0.158 - Multicast error (session has already started with 0 clients)

      @Mikeee89 Good to hear that seconds work. The fix is now merged into dev-branch, so a dev-branch update makes the field take minutes again.

      1.5.10.2518 and 1.5.10.2534 have the same multicast code, so this bug cannot be in one and not the other. 1.5 has no per-session timeout. Its session waits FOG_UDPCAST_MAXWAIT minutes (10 by default).

      Can you post the udp-sender line from /opt/fog/log/multicast.log on the 1.5.10.2534 server? The --max-wait value on the first stream shows what that server waited.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: FOG 1.6.0.158 - Multicast error (session has already started with 0 clients)

      @Mikeee89 Thanks for the log, it shows the cause. The first line of the udp-sender command has --max-wait 10. That value is seconds, not minutes.

      The Session Timeout field on the Multicast page asks for minutes, but FOG stored the number as seconds. So your 10-minute session waited only 10 seconds after it started. After that, the PXE menu treats the session as already started and refuses the join, even with 0 clients connected.

      The fix is in https://github.com/FOGProject/fogproject/pull/2114 and goes to dev-branch.

      Until you update, either of these works on your current install:

      • Enter the timeout in seconds. For 10 minutes, enter 600.
      • Or leave the timeout blank. FOG then uses the global setting FOG_UDPCAST_MAXWAIT (in minutes) and converts it correctly.

      Cancel the stuck session first, then create a new one.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: FOG 1.6 – Dependencies between Software Management and Snapins?

      @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.
      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: FOG 1.6 – Dependencies between Software Management and Snapins?

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

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: FOG 1.6 – Dependencies between Software Management and Snapins?

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

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: FOG 1.6 – Dependencies between Software Management and Snapins?

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

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: Feature request: a way to handle USB Ethernet adapters shared between many hosts

      @lperoma 1.6.0.14 is an early 1.6.0 build. The current stable release is 1.6.0.158 (November 11), and it has MachineIdentity.php. #2100 and #2104 are on the patches channel now. They reach stable with the next monthly release on the 11th.

      On the registration question: yes, iPXE sends sysuuid, sysserial and mbserial with every boot, through any NIC. They come from the laptop’s firmware, not from the adapter.

      PR #2111 adds what you asked for, as a new value for FOG_HOST_IDENTIFY_SMBIOS: register. It works like enforce, plus one rule. Suppose a laptop boots on an adapter whose MAC belongs to host Y, and the laptop’s serial is different from Y’s stored serial. Then:

      • The boot shows the “not registered” menu, so the laptop never runs Y’s task.
      • Registration creates a new host for the laptop. Y keeps its MAC.
      • The new host gets a generated MAC that starts with 02:. During a task, FOS identifies itself to the server by the host’s MAC, so every host needs one of its own. The network never sees the generated MAC.
      • After that, the laptop is found by its firmware through any adapter.

      Two things to know:

      • Y needs a stored serial, so run a full inventory on hosts that share an adapter. With no stored serial, the MAC still decides.
      • In register mode, a motherboard swap that changes the system serial looks like a new machine.

      It is on the patches channel now. It reaches stable with the next monthly release on December 11.

      posted in Feature Request
      Tom ElliottT
      Tom Elliott
    • RE: Fog 1.6.0.14 Master Storage Node not handing off to Slave Storage Nodes

      @FlareImp No problem at all, thanks for tracking it down. Now that those two servers point at the main server’s database, you can start their replicators again:

      sudo systemctl enable --now FOGImageReplicator FOGSnapinReplicator
      

      After one cycle, /opt/fog/log/fogreplicator.log on each should show its own node and group, not node 1.

      For the two hosts that waited in the queue: the next time you deploy that lab, post the FOG storage node overflow lines from /var/log/apache2/error.log if any host waits.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: Fog 1.6.0.14 Master Storage Node not handing off to Slave Storage Nodes

      @FlareImp Thanks, that shows it. Your real database has no group “default” and no node “DefaultMember”. So TVMS-Fog is not reading your main server’s database. It reads a database on TVMS-Fog itself. The FOG installer fills a new database with that group and node, and gives the node the server’s own IP. So TVMS-Fog matches node 1 in its own database, and that database has no images.

      A storage node must use the main server’s database. Please run this on TVMS-Fog and post the output. It shows no passwords:

      grep -E '^(installtype|snmysqlhost|snmysqluser)=' /opt/fog/.fogsettings
      grep DATABASE_HOST /var/www/html/fog/commons/config.class.php
      

      On a storage node, installtype should be ‘S’, and snmysqlhost and DATABASE_HOST should be your main server’s IP. If they are not, that server was installed or updated as a full server. Please run the same two commands on your other storage nodes too.

      Keep the replicators on the storage nodes stopped until this is fixed.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: Fog 1.6.0.14 Master Storage Node not handing off to Slave Storage Nodes

      @FlareImp Thanks. That line means the replicator on that server thinks it is node 1. On 11-13, after the fix in your other thread, your nodes showed their own IDs, for example node 13 TVNE-Fog. Nothing between 1.6.0.181 and 1.6.0.188 changed how a server finds its own node.

      One detail stands out. On 11-13, node 1 was named TV-Fog-Main. Now the log calls node 1 “DefaultMember”, in group “default”. Those are the names FOG gives the first node and group when it creates them.

      Please post:

      • From Storage Node Management: the name, IP address, storage group and Is Master setting of node 1. If no node is named DefaultMember, say so.
      • Which server you read each log on, and how: the Log Viewer page, or the file /opt/fog/log/fogreplicator.log on that server.
      • On one storage node that shows node ID 1, the output of:
      hostname; hostname -I; grep -v '^#' /etc/hosts
      head -20 /opt/fog/log/fogreplicator.log
      

      Your log says group “default” has no images, so these runs copy nothing. As a precaution until we know why, stop the replicators on the storage nodes again, but not on the main server. On 11-13, a node that acted as the main server deleted files on the other nodes:

      sudo systemctl stop FOGImageReplicator FOGSnapinReplicator
      
      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: Fog 1.6.0.14 Master Storage Node not handing off to Slave Storage Nodes

      @FlareImp Thanks for checking all of that. With those settings, the two hosts should have moved, and I cannot make my lab hold them back. So I need FOG to tell us why.

      Until now, when a host could not move, FOG wrote nothing about the reason. I added a log line for that case: https://github.com/FOGProject/fogproject/pull/2108. It names the node the host waits on, its task count and Max Clients, and each other node in the group with the reason it was passed over.

      When it is in dev-branch:

      • Run updatefog.sh --branch dev-branch on the main server.
      • Deploy the same 12 hosts again.
      • If any host waits, post the output of this, from the main server:
      grep "FOG storage node overflow" /var/log/apache2/error.log | tail -5
      
      • Also post the Storage Node column from the Active Tasks page for the hosts that wait.

      If a host waits and the grep finds nothing, that is useful too. It means FOG did not see the node as over its Max Clients at PXE boot.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: Fog 1.6.0.14 Master Storage Node not handing off to Slave Storage Nodes

      @FlareImp Thanks. That should not happen on 1.6.0.181: when a host PXE boots and the master already has 10 tasks, the host should get a free node in the same group. I ran the same setup on my lab, 12 hosts with Max Clients 10, booted one at a time and all at once. Every time, the extra hosts moved to the free node.

      When FOG looks for a free node, it skips a node without a message if any of these is true:

      • The node is not enabled, or its Max Clients is 0.
      • The node is not in the location’s Storage Group.
      • The main server cannot reach the node. FOG tests the node’s SSH port (22 unless you changed it) first, then port 443 (or 80 if you use http).

      Please check these for the Adamsville storage group:

      • In Storage Node Management, for each of the three nodes: Storage Group, Is Enabled, Is Master Node, Max Clients.
      • In Location Management, for that location: Storage Group and Storage Node.
      • On the main server, run this for each of the two other nodes (replace the IP):
      nc -zv -w 1 <node-ip> 22; nc -zv -w 1 <node-ip> 443; nc -zv -w 1 <node-ip> 80
      

      If all three fail for a node, FOG treats that node as offline, and that is why the hosts stayed in the queue.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: Fog 1.6.0.14 Master Storage Node not handing off to Slave Storage Nodes

      @FlareImp Great, thank you for testing it.

      Both fixes are now in dev-branch. Run updatefog.sh --branch dev-branch again on the main server to get them:

      • The MAC tab shows the primary MAC as selected.
      • A location whose Storage Group has no nodes no longer stops the PXE boot. FOG uses its own node and writes one line to the error log that names the location.

      Let me know how the other sites do, and whether the deploys spread across the nodes.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: Fog 1.6.0.14 Master Storage Node not handing off to Slave Storage Nodes

      @FlareImp Thank you, that log shows the cause.

      What happens: your hosts belong to a location with “Boot files from” turned on. That location has no Storage Node set, so FOG picks a node from the location’s Storage Group. That group has no storage nodes in it, or it no longer exists. FOG finds no node, and the boot page stops with “No nodes available”. So the host cannot load its boot menu and shows as not registered. I made the same setup on my lab and got the same error.

      My earlier suggestion to clear the location’s Storage Node is what sent FOG down this path. I’m sorry for that.

      Fix it now: open Location Management, then the location those hosts use. Set its Storage Group to the group that holds the Adamsville nodes, then save. Or set its Storage Node back to the node it had before. Then PXE boot one host.

      What I’m changing: a location set up like this should not stop every PXE boot. I’m fixing the location plugin, so it skips that location’s node and writes one line to the error log instead.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: Fog 1.6.0.14 Master Storage Node not handing off to Slave Storage Nodes

      @FlareImp Thank you. A correction first: I said my lab shows the primary MAC. I had checked the database and the data feed, not the page. On the page, my lab shows the same problem you see.

      The MAC tab: your primary MACs are saved correctly. The page fails to show them. When the grid measures its columns, it briefly adds a copy of the table, and that copy unchecks the real radio button. The fix is https://github.com/FOGProject/fogproject/pull/2105. It changes only the page. Your saved data needs no change.

      The PXE boot: this is a separate problem. Your boot.php page answered with HTTP 500, which means PHP stopped with an error. Please open that boot.php?mac= address again. Then, right away, post the last 20 lines of /var/log/apache2/error.log. The error should be there.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: Fog 1.6.0.14 Master Storage Node not handing off to Slave Storage Nodes

      @FlareImp Thank you, that helps. Your database is correct: 1295 MACs are marked primary. So the flag is lost after FOG reads it. My lab runs the same code and shows the primary MAC, so I need to see what your server sends back.

      Please post these:

      1. Sign in to the FOG UI. Open a host that shows no primary MAC, and note the id= number in its address bar. Then open this address in the same browser, with that number at the end, and post what the page shows:
        https://tv-fog-main.tvschools.local/fog/management/index.php?node=host&sub=getMacaddressesList&id=<id>
      2. Open this address, with one of that host’s MACs, and post what the page shows. It is the boot script the host gets at PXE boot:
        https://tv-fog-main.tvschools.local/fog/service/ipxe/boot.php?mac=<mac>
      3. The PHP and database versions, and whether the update upgraded them:
        php -v; mysql --version; grep -E " (upgrade|install) .*(php|mysql|mariadb)" /var/log/dpkg.log | tail -20

      One separate item from your log: “the group has no enabled master node” for Adamsville Storage Group (id 2). Every storage group needs one enabled master node. Captures upload to the master, and replication copies images from it. Open that storage group’s nodes and set one of them as the master.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: FOG Agent on new image PC not communicating with server

      @rogalskij The host shows the agent enrolled, but it has not checked in since you approved it. On 0.1.24, two things cause that.

      • Audit mode. If this PC is a reference machine in audit mode, or has not finished OOBE, the agent waits on purpose. It does nothing until Windows setup finishes. Check HKLM\SYSTEM\Setup\State\ImageState. Any value other than IMAGE_STATE_COMPLETE means the agent is waiting. It starts by itself after Sysprep and OOBE complete. You can capture the image with the agent in it. On each deployed PC, the agent sees a different hardware identity. It drops the reference machine’s certificate and enrolls as itself.
      • An http:// server address. The server knows the agent only by its client certificate, and that works only over https. With an http:// address, enrollment works, but every check-in after approval fails. Install the 0.1.25 MSI by hand: it switches an http:// address to https:// on its own. Or reinstall with SERVER=https://your-server/fog.

      C:\ProgramData\FOG\fog-agent.log tells you which one it is. “Windows setup has not finished” means the first. “server refused this certificate” means the second. Please post that log if neither line is there.

      Two side notes. The agent opens no listening port, so it needs no firewall rule. The “No such device or address” ping status is the server failing to resolve the host name. It is not related to the agent.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • 1 / 1