feat: make hugepages optional when using Longhorn V2 data engine#129
Draft
tserong wants to merge 2 commits into
Draft
feat: make hugepages optional when using Longhorn V2 data engine#129tserong wants to merge 2 commits into
tserong wants to merge 2 commits into
Conversation
84720dd to
57705d9
Compare
tserong
added a commit
to tserong/harvester
that referenced
this pull request
May 22, 2026
This pulls in the changes to NodeConfig from harvester/node-manager#129 (to do this correctly, we need to bump node-manager in go.mod once that PR goes in) Signed-off-by: Tim Serong <tserong@suse.com>
tserong
added a commit
to tserong/harvester
that referenced
this pull request
May 22, 2026
This pulls in the changes to NodeConfig from harvester/node-manager#129 (to do this correctly, we need to bump node-manager in go.mod once that PR goes in) Signed-off-by: Tim Serong <tserong@suse.com>
This refactors EnableV2DataEngine() slightly so that the config persistence is done in a separate function, which we can then write a unit test for. It also ensures the `modprobe` commands written are drawn from the `modulesToLoad` slice, so they're guaranteed to be consistent with whe modules we try to load at runtime. Signed-off-by: Tim Serong <tserong@suse.com>
Since Longhorn v1.10.0 it's now possible to use the Longhorn V2 data engine without hugepages (see longhorn/longhorn#7066). In order to support this, I've added another field to NodeConfig which is the number of hugepages we should try to allocate on each node. If we're running with hugepages disabled, Harvester will set this value to zero, and node-manager won't attempt to allocate any hugepages. Related-to: harvester/harvester#9390 Signed-off-by: Tim Serong <tserong@suse.com>
57705d9 to
7db212d
Compare
tserong
added a commit
to tserong/harvester
that referenced
this pull request
Jun 4, 2026
This pulls in the changes to NodeConfig from harvester/node-manager#129 (to do this correctly, we need to bump node-manager in go.mod once that PR goes in) Signed-off-by: Tim Serong <tserong@suse.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:
Since Longhorn v1.10.0 it's now possible to use the Longhorn V2 data engine without hugepages (see
longhorn/longhorn#7066).
Solution:
In order to support this, I've added another field to NodeConfig which is the number of hugepages we should try to allocate on each node. If we're running with hugepages disabled, Harvester will set this value to zero, and node-manager won't attempt to allocate any hugepages.
Related Issue(s):
harvester/harvester#9390
Test plan:
TBD
Additional documentation or context
This will require a matching change in https://github.com/harvester/charts.