Skip to content

Commit

Permalink
fix(datastore): skip disabled nodes in ValidateV2DataEngineEnabled
Browse files Browse the repository at this point in the history
Related issue: longhorn/longhorn#9319

Signed-off-by: Tim Serong <tserong@suse.com>
  • Loading branch information
tserong authored and derekbit committed Aug 27, 2024
1 parent 1bbd143 commit 52b7383
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions datastore/longhorn.go
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,11 @@ func (s *DataStore) ValidateV2DataEngineEnabled(dataEngineEnabled bool) (ims []*
continue
}

if val, ok := node.Labels[types.NodeDisableV2DataEngineLabelKey]; ok && val == types.NodeDisableV2DataEngineLabelKeyTrue {
// V2 data engine is disabled on this node, don't worry about hugepages
continue
}

if dataEngineEnabled {
capacity, ok := node.Status.Capacity["hugepages-2Mi"]
if !ok {
Expand Down

0 comments on commit 52b7383

Please sign in to comment.