Skip to content

feat: make hugepages optional when using Longhorn V2 data engine#129

Draft
tserong wants to merge 2 commits into
harvester:masterfrom
tserong:wip-lhv2-hugepage-settings
Draft

feat: make hugepages optional when using Longhorn V2 data engine#129
tserong wants to merge 2 commits into
harvester:masterfrom
tserong:wip-lhv2-hugepage-settings

Conversation

@tserong
Copy link
Copy Markdown
Member

@tserong tserong commented May 22, 2026

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.

@tserong tserong requested review from a team and brandboat as code owners May 22, 2026 04:20
@tserong tserong marked this pull request as draft May 22, 2026 04:20
@tserong tserong force-pushed the wip-lhv2-hugepage-settings branch 2 times, most recently from 84720dd to 57705d9 Compare May 22, 2026 04:28
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>
tserong added 2 commits June 4, 2026 18:07
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>
@tserong tserong force-pushed the wip-lhv2-hugepage-settings branch from 57705d9 to 7db212d Compare June 4, 2026 08:31
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>
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