• 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: Fog 1.6.0.14 Master Storage Node not handing off to Slave Storage Nodes

      @FlareImp Thank you. This is a different problem from the storage nodes. Nothing that finds a host by its MAC, or saves the primary MAC, changed between 1.6.0.167 and the current dev-branch. My lab runs the current dev-branch, and its hosts boot as registered and keep their primary MAC. So I need to see what your server has.

      Please post these:

      1. The version on the main server: open http://<your-fog-server>/fog/service/getversion.php.
      2. The MAC flags in the database. On the main server, run:
        sudo mysql fog -e "SELECT hmPrimary, hmPending, COUNT(*) FROM hostMAC GROUP BY hmPrimary, hmPending; SHOW COLUMNS FROM hostMAC;"
      3. The web server error log right after you set a primary MAC and refresh. Mark a primary on one host, then post the last 30 lines of the PHP error log. On Debian or Ubuntu with Apache, that is /var/log/apache2/error.log. On Rocky, Alma or RHEL, it is /var/log/php-fpm/www-error.log.
      4. Did the installer finish on the main server, with no error at the end?

      When you save a primary MAC, FOG first clears the primary flag on all of the host’s MACs, then sets the one you chose. You see nothing selected after a refresh, so the second step fails on your server. The error log should say why.

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

      @lperoma The next stable will be auto promoted from dev-branch -> stable on December 11th at some point in the day.

      11th of every month is when dev-branch fixes get pulled into stable.

      As to the “Version” it will be, it’s however many commits since.

      Right now .14 means there were 14 commits after master containing 1.6.0, 158 is the current stable branch meaning 158 total commits since it’s original release.

      Some months will be less, some will be much more.

      If you wanted you can install dev-branch but I understand the feeling of “well it’s not stable”.

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

      @lperoma The agent fix is done (PR #2104).

      What changes: suppose the firmware of an enrolling machine matches no host, and only its MAC finds one. If the machine’s serial contradicts the serial stored for that host, FOG no longer binds it as that host’s first agent. The request is recorded as an identity conflict. The deploy window never approves a conflict, so it waits for an admin. An admin can still approve it on purpose, for example after a real motherboard swap. The directory identity check treats the same case as a conflict too.

      What does not change:

      • An enroll token still approves the request. A token is an admin’s explicit vouch.
      • A host with no inventory row has no stored serial to compare, so its MAC still binds as before. Run a full inventory on hosts that share an adapter.
      • A request that was already pending before you update keeps its old reason. Deny any such request that you do not recognize.

      To get it: it reaches the patches channel when the PR merges. After you update, you can set FOG_AGENT_ENROLL_DEPLOY_WINDOW back to its default (24) if you set it to 0.

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

      @lperoma Thank you for testing this so thoroughly. The SMBIOS wins line and the untouched inventories are exactly the expected result.

      The agent part is worth a look, yes. Agent enrollment falls back to the MAC when the firmware matches no host. So an unregistered machine with a known MAC lands on that MAC’s host. Within the deploy window after an image (FOG_AGENT_ENROLL_DEPLOY_WINDOW, 24 hours by default), that request can be approved without an admin click. I am fixing that so a machine whose serial contradicts the host is never bound to it by MAC.

      Until the fix is out, set FOG_AGENT_ENROLL_DEPLOY_WINDOW to 0 if you image through shared adapters. Every enrollment then waits for an approval or a token.

      Your last post looks cut off after “a few laptops that share one USB adapter,”. Did you mean to add more?

      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 Thank you, that test found it. The task list and the clients disagreed, and the clients were right.

      What happens: a client learns its storage node once, at PXE boot, and mounts that node. My earlier fix moved a waiting host to a free node later, at check-in. That changed the task list, but not the node the client had already mounted. Your location sends its hosts to the master, so all 30 imaged from the master while the task list showed 10 on each node.

      The fix: https://github.com/FOGProject/fogproject/pull/2103. The move now happens at PXE boot. When a host boots and its node already has more tasks than its Max Clients, it gets the node in the same storage group with the most free slots. The client mounts that node, and the task list shows the same node. The check-in move is removed. Captures and multicast still use the master.

      With your setup, hosts move off the master as they boot until it holds 10, and the other two nodes take 10 each. Hosts that PXE boot at the same instant can still land on the same node. Those extra hosts wait in line there.

      It goes to dev-branch first. After it merges, update the main server and the storage nodes with updatefog.sh --branch dev-branch, as before, and deploy the lab again.

      Until then: clear the Storage Node on that location and keep the Storage Group set. Then each host gets the least-loaded node in the group at PXE boot.

      Please let me know what the task list and the node bandwidth show on the next run.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: 1.6.0.158 unable to approve agent

      @chscduo Glad it works, and thanks for running each check so quickly.

      The fix is in dev-branch, so the next FOG update includes it. The update replaces the helper you installed by hand with the same code, so you have nothing to undo.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: 1.6.0.158 unable to approve agent

      @chscduo That error is the answer. Your web server’s service runs with /etc read-only, which is a systemd hardening setting. The signing helper runs through sudo from the web server, so it inherits that restriction. The old helper wrote a serial counter, .fogAgentCA.srl, next to the CA on every signing. That write failed. When you ran the same step by hand, you were outside that service, so it worked.

      The helper no longer writes there. It now gives each certificate a random serial number, which is how a CA normally assigns them. Please replace the helper again with the same commands:

      curl -fsSL https://raw.githubusercontent.com/FOGProject/fogproject/dev-branch/packages/pki/fog-sign-node-cert -o /tmp/fsnc
      sed -i 's|^CONF=.*|CONF="/opt/fog/.fog-pki"|' /tmp/fsnc
      install -o root -g root -m 0755 /tmp/fsnc /opt/fog/bin/fog-sign-node-cert
      rm -f /tmp/fsnc
      

      Then approve the agent again. You can delete /etc/fog/pki/agent/ca/.fogAgentCA.srl. Nothing reads it.

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

      @lperoma A follow-up. While I checked this case, I found a bug that affects shared adapters. It is now fixed.

      The bug: at each boot, FOG records the firmware identity onto the host it resolved. With a shared adapter, the MAC resolves to the host the adapter is registered on. So the laptop that booted wrote its UUID onto that other host. In the default log mode this happened on every boot through the adapter. Over time, it corrupts the identity data that enforce mode matches on.

      The fix: FOG now compares the serial numbers first. When the stored system serial and the reported one differ, it is a different machine. FOG writes nothing to that host and logs one FOG host identity line that says “another machine, nothing recorded”. A motherboard swap that keeps the service tag still updates the UUID as before.

      To get it: the fix is on the patches channel (dev-branch, PR #2100). Run the updater on that channel, or wait for the next release.

      After you update: run a full inventory on any host that a shared adapter booted as. That puts its own serials and UUID back. Then enforce matches each laptop reliably.

      posted in Feature Request
      Tom ElliottT
      Tom Elliott
    • RE: 1.6.0.158 unable to approve agent

      @chscduo Thanks. Your CA and the stored request both sign correctly by hand, so the failure happens only in the way the server runs the signing helper. The helper in 1.6.0.158 hides OpenSSL’s reason. The current helper shows it, and it is the only change to that file since 1.6.0.158.

      Please replace the helper as root on the FOG server:

      curl -fsSL https://raw.githubusercontent.com/FOGProject/fogproject/dev-branch/packages/pki/fog-sign-node-cert -o /tmp/fsnc
      sed -i 's|^CONF=.*|CONF="/opt/fog/.fog-pki"|' /tmp/fsnc
      install -o root -g root -m 0755 /tmp/fsnc /opt/fog/bin/fog-sign-node-cert
      rm -f /tmp/fsnc
      

      Then approve the agent again and post the full error message. It now ends with OpenSSL’s reason.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: 1.6.0.158 unable to approve agent

      @chscduo Thanks. The CA signs correctly, so the problem is the request the agent sent. This check runs the same signing step on that stored request. Please run these lines as root on the FOG server and post the whole output:

      mysql -N -B -r fog -e "SELECT aeCSR FROM agentEnrollment WHERE aeState='pending' ORDER BY aeID DESC LIMIT 1" > /tmp/r.csr
      openssl req -in /tmp/r.csr -noout -verify -subject
      openssl x509 -req -in /tmp/r.csr -CA /etc/fog/pki/agent/ca/.fogAgentCA.pem -CAkey /etc/fog/pki/agent/ca/.fogAgentCA.key -CAcreateserial -sha256 -days 1 -out /dev/null; echo rc=$?
      rm -f /tmp/r.csr
      

      If your database is not named fog, or mysql asks for a password, add -u and -p to the first line.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: 1.6.0.158 unable to approve agent

      @chscduo Thanks. The key matches the certificate, so that cause is ruled out.

      The next check runs the same signing step as the server, with a test request. Please run this as root on the FOG server and post the whole output:

      bash -c '. /opt/fog/.fog-pki; echo "cert=$PKI_AGENT_CA_CERT key=$PKI_AGENT_CA_KEY"; openssl req -new -newkey ec -pkeyopt ec_paramgen_curve:P-256 -nodes -keyout /dev/null -subj / -out /tmp/t.csr 2>/dev/null; openssl x509 -req -in /tmp/t.csr -CA "$PKI_AGENT_CA_CERT" -CAkey "$PKI_AGENT_CA_KEY" -CAcreateserial -sha256 -days 1 -out /dev/null; echo rc=$?; rm -f /tmp/t.csr'
      
      • rc=0 means the CA signs correctly. The problem is then the request the agent sent.
      • Any other result prints OpenSSL’s reason.

      The first line also shows which CA files the server uses. They must be the two files you checked.

      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 can already identify a host by its firmware instead of its MAC. That is the case a shared USB adapter breaks.

      At boot, iPXE sends the SMBIOS UUID, the system serial, the board serial and the asset tag. The server matches them against the inventory of every host. The setting FOG Configuration > FOG Settings > FOG_HOST_IDENTIFY_SMBIOS controls what happens with the result:

      • off: the MAC decides, as before.
      • log (the default): the MAC still decides. Each disagreement goes to the web server error log as a FOG host identity line.
      • enforce: when the firmware points at exactly one host, that host wins over the MAC.

      Set it to enforce. Then a laptop that FOG already knows by its firmware boots as itself, even with the adapter’s MAC. No MAC moves by hand, and the adapter MAC on another host no longer matters for that boot. A tie (for example two VMs with one UUID) is never trusted. FOG falls back to the MAC in that case.

      The precondition: each laptop needs its firmware identity in its host’s inventory. A full FOS inventory or a full registration stores it.

      One gap we know about: registering a brand-new laptop through an adapter whose MAC is already on another host. The MAC finds the other host first, so registration says “already registered”. We are looking at that case now. If you can test enforce on a few laptops that are already registered, the FOG host identity lines in the Apache/PHP error log show what FOG decided for each boot.

      posted in Feature Request
      Tom ElliottT
      Tom Elliott
    • RE: 1.6.0.158 Unable to join machine to he domain and change Hostname

      @Yoh Thanks, that confirms it. The agent needs HTTPS for every call after enrollment, because the server identifies each machine by the agent’s certificate. Plain HTTP cannot carry that certificate.

      Your server can stay on HTTP for imaging. A FOG 1.6 install normally serves HTTPS as well. The redirect from HTTP to HTTPS is optional. First, open https://<your-server>/fog/management in a browser on the master machine. It must load.

      Then reinstall the agent on the master image with the https:// address:

      msiexec /i fog-agent-x64.msi /qn SERVER=https://<your-server>/fog TOKEN=<your-token> /l*v C:\fog-agent-install.log
      

      Then run Sysprep and capture the image again. On machines you already deployed, run the same command.

      The next agent release also says this in its log. An http:// address will be named as the cause.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: 1.6.0.158 Unable to join machine to he domain and change Hostname

      @Yoh The agent enrolls, but the server then rejects every call that uses the agent’s certificate. The domain join and the rename never start, because they need those calls.

      The most likely cause is a server address that starts with http://. The certificate travels only over HTTPS. Over plain HTTP the server never sees it, so it rejects the call. The first line of your log points the same way: the agent checks the server’s features only over HTTPS.

      Please post the server_url line from this file on the deployed machine:

      C:\ProgramData\FOG\agent\config.json
      

      If it starts with http://, reinstall the agent with the https:// address of the server.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: 1.6.0.158 unable to approve agent

      @chscduo The approval fails at the step where the server signs the agent’s certificate. In 1.6.0.158 the server hides OpenSSL’s reason, so you see only “signing failed”. The next dev-branch build shows the reason.

      Please run these two commands as root on the FOG server and post both outputs:

      openssl x509 -noout -pubkey -in /etc/fog/pki/agent/ca/.fogAgentCA.pem | sha256sum
      openssl pkey -pubout -in /etc/fog/pki/agent/ca/.fogAgentCA.key | sha256sum
      

      The two hashes must be the same. If they are different, the agent CA key does not match its certificate.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: 1.6.0.167 Time wrong in logs

      @FlareImp yes, this is expected.

      All times are stored in UTC for consistency now and translated to whatever time is configured (by default) and each user can define their own timezone if they want it.

      https://docs.fogproject.org/en/latest/management/web/unadjusted-timestamps/

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: fogproject.org issue with the download tab.

      @IgniWarlock Must’ve been a github issue that was temporary as I’m seein ghte page load just fine now.

      Thanks!

      posted in General Problems
      Tom ElliottT
      Tom Elliott
    • RE: Fog 1.6.14 Driver Replication Issue

      @FlareImp That message is a warning, not a failure. The install continues past it. It does not affect replication.

      1.6 lets a storage node ask the main server for a web certificate signed by the main server’s CA. The CA permits only names in the main server’s own domain. Your main server is named tv-fog-main with no domain, so no node name fits, and the main server declines. The node then keeps its own self-signed certificate. That is what storage nodes have always used, and the installer prints “Skipped” and says so on the next lines.

      You do not need to do anything about it. Continue with the update on the other nodes. When all servers run dev-branch, enable the replicators on the storage nodes again and check one cycle of /opt/fog/log/fogreplicator.log on N01. It should now say “This is not the master node” instead of “We are node ID: 1”.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: Fog 1.6.14 Driver Replication Issue

      @FlareImp A correction to my last post: the fix is already in dev-branch. You do not need to wait for the next release. To use it now, update the main server and every storage node from dev-branch:

      cd /path/to/your/fogproject/checkout
      git fetch
      git checkout dev-branch
      git pull
      cd bin
      sudo ./installfog.sh -y
      

      Update every server, because the bug is on each node. After all of them run the new version, you can enable the replicators on the storage nodes again.

      posted in FOG Problems
      Tom ElliottT
      Tom Elliott
    • RE: Fog 1.6.14 Driver Replication Issue

      @FlareImp Thanks, that log shows the cause. Every cycle on TVNE-Fog-N01 starts with:

      We are node ID: 1. We are node name: TV-Fog-Main
      

      So N01 runs replication as if it were your main server. N01 has short copies of the large files, and every hour it pushes them to TVAE-Fog and TVNE-Fog. For example, it sends d1p3.img at 1323409736 bytes over the full 22556692664 byte file. That is the copy you saw, and that is why both nodes show the same short sizes. Your main server then deletes the short file and starts again, and the cycle repeats.

      This is a bug in 1.6. Each FOG server adds the FOG_WEB_HOST address (your main server) to the list of its own addresses. So every storage node matches the main server’s storage node entry and acts as the main server. 1.5 does not do this, which is why 1.5 replicated correctly. The fix is done and will be in the next release.

      The same bug explains the files that vanished during your rsync. A server that acts as the main server deletes each file on the other nodes that it does not have itself. While the rsync ran, N01 did not yet have the Win11_25H2_Smart26 files. So N01’s replicator deleted them on TVNE-Fog. To confirm, look in /opt/fog/log/fogreplicator.log on N01 for “File does not exist on master node, deleting” lines that name TVNE-Fog.

      Until the fix is released, stop the replicators on every storage node, but not on the main server:

      sudo systemctl stop FOGImageReplicator FOGSnapinReplicator
      sudo systemctl disable FOGImageReplicator FOGSnapinReplicator
      

      Run that on TVAE-Fog, TVNE-Fog and all four N01/N02 nodes before you copy anything else. Then start the replicator on the main server. It replaces the short and missing files on TVAE-Fog and TVNE-Fog, Win11_25H2_Smart26 included, on its next cycles. Leave N01 and N02 disabled in Storage Management until the fix is out, because their copies are short too.

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