From 52b7383715e356422dd0d636af73d933c8a89a5f Mon Sep 17 00:00:00 2001 From: Tim Serong Date: Tue, 27 Aug 2024 15:24:10 +1000 Subject: [PATCH] fix(datastore): skip disabled nodes in ValidateV2DataEngineEnabled Related issue: https://github.com/longhorn/longhorn/issues/9319 Signed-off-by: Tim Serong --- datastore/longhorn.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/datastore/longhorn.go b/datastore/longhorn.go index 663c07ebf1..486e6b7ed2 100644 --- a/datastore/longhorn.go +++ b/datastore/longhorn.go @@ -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 {