Skip to content

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

Merged
tserong merged 2 commits into
harvester:masterfrom
tserong:wip-lhv2-hugepage-settings
Jun 16, 2026
Merged

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

Conversation

@tserong

@tserong tserong commented May 22, 2026

Copy link
Copy Markdown
Member

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:

See test plan in harvester/harvester#10655

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 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>
tserong added 2 commits June 11, 2026 19:09
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 7db212d to aa0d3cf Compare June 11, 2026 09:10
tserong added a commit to tserong/harvester that referenced this pull request Jun 11, 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 tserong marked this pull request as ready for review June 11, 2026 09:10

@brandboat brandboat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch! I only have one concern.

Comment thread pkg/controller/nodeconfig/config/longhorn.go
tserong added a commit to tserong/harvester that referenced this pull request Jun 15, 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>

@brandboat brandboat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

2 participants