Skip to content

Storage nodes: overflow a full node at PXE boot, not at check-in - #2103

Merged
fog-workflows[bot] merged 1 commit into
dev-branchfrom
fix/storage-overflow-at-pxe-boot
Nov 17, 2026
Merged

fog-workflows[bot] merged 1 commit into
dev-branchfrom
fix/storage-overflow-at-pxe-boot

Conversation

@mastacontrola

Copy link
Copy Markdown
Member

Problem

Forums 18310, on dev-branch 1.6.0.167: a 30-host deploy on a 3-node group. The task list showed 10 hosts on each node. Partclone and the node bandwidth showed all 30 imaging from the master.

Cause

#2082 moved a waiting unicast host to a free node at check-in (TaskQueue::checkIn()). That changes only the task record. FOS mounts the node from the PXE kernel argument storage=, which the boot menu writes, and does not ask again (fos: bin/fog.mount). The poster's location has a fixed Storage Node (the master), so every host got the master at PXE boot.

Change

  • Check-in: the node move is removed. checkIn() is back to its pre-Storage nodes: balance deploys across a group, and move waiting hosts #2082 behavior.
  • PXE boot: BootMenuBase calls the new StorageGroup::getOverflowNode() after both BOOT_TASK_NEW_SETTINGS events, so it checks the node a plugin set last. A node is over capacity when its active tasks (queued, checked in, running) exceed maxClients. The count includes the booting host. The host then moves to the node in the group with the most free slots, skipping disabled, offline and recently failed nodes. That node goes into storage= and into the task. Captures and multicast never move.
  • Behavior change: the boot menu now also saves the task's node when the second hook changed it, for every task type. Before, a node set by the second hook went into storage= but not into the task.
  • getOptimalStorageNode() (least-loaded, from Storage nodes: balance deploys across a group, and move waiting hosts #2082) is unchanged.

With a location pinned to the master and 30 tasks, hosts move off the master as they boot until it holds 10. The other two nodes fill alternately.

Notes

  • Hosts that PXE boot in the same instant can read the same count. The extras wait in line on the node in their storage=, as before.
  • Pre-existing, not changed: the USB boot path (service/hostinfo.php) builds storage= on its own and never saves the node into the task.

Tests

  • tests/deploy-overflow-at-pxe-boot.test.php renders the real IpxeBootMenu. It checks that the overflow node is in storage= and in the task, including when a hook pins the full node. A capture is never moved. It fails with the dev-branch boot menu, and fails when the check runs before the second hook.
  • tests/optimal-node-balances-load.test.php adds getOverflowNode() cases against the real StorageGroup. The at-limit case fails when <= becomes <.
  • The boot menu harness keeps the host's task as one object, as the real Host does. Every existing golden output is unchanged.
  • tests/run-all.sh: 487 passed, 0 failed. Both phpstan passes are clean. One baseline count went from 4 to 5 for the new Route::$rows use in bootmenu-render.php.

Not verified on a live multi-node lab group.

🤖 Generated with Claude Code

#2082 moved a waiting unicast host to a free node at check-in. FOS
never learns that: it mounts the node from the PXE kernel argument
storage=, built by the boot menu, and does not ask again. The task
list showed hosts spread over three nodes while every client imaged
from the master (forums 18310).

The check-in move is removed. The boot menu now asks
StorageGroup::getOverflowNode() after the BOOT_TASK_NEW_SETTINGS
hooks, so a node a plugin pins (a location's fixed node) is the one
checked. When that node holds more active tasks than its maxClients,
the deploy moves to the node in the group with the most free slots,
and that node goes into storage= and into the task. Captures and
multicast never move.

The boot menu also saves the task's node when the second hook
changed it, so the task always names the node in storage=.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fog-workflows
fog-workflows Bot enabled auto-merge November 17, 2026 14:26
@fog-workflows
fog-workflows Bot added this pull request to the merge queue Nov 17, 2026
Merged via the queue into dev-branch with commit d0ed855 Nov 17, 2026
12 checks passed
@fog-workflows
fog-workflows Bot deleted the fix/storage-overflow-at-pxe-boot branch November 17, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant