Repository navigation
Storage nodes: overflow a full node at PXE boot, not at check-in - #2103
Merged
Merged
Conversation
#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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 argumentstorage=, 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
checkIn()is back to its pre-Storage nodes: balance deploys across a group, and move waiting hosts #2082 behavior.BootMenuBasecalls the newStorageGroup::getOverflowNode()after bothBOOT_TASK_NEW_SETTINGSevents, so it checks the node a plugin set last. A node is over capacity when its active tasks (queued, checked in, running) exceedmaxClients. 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 intostorage=and into the task. Captures and multicast never move.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
storage=, as before.service/hostinfo.php) buildsstorage=on its own and never saves the node into the task.Tests
tests/deploy-overflow-at-pxe-boot.test.phprenders the realIpxeBootMenu. It checks that the overflow node is instorage=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.phpaddsgetOverflowNode()cases against the realStorageGroup. The at-limit case fails when<=becomes<.Hostdoes. 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 newRoute::$rowsuse inbootmenu-render.php.Not verified on a live multi-node lab group.
🤖 Generated with Claude Code