From f51808bc75126e6a9dfe7a4e4de2b4291cfc7858 Mon Sep 17 00:00:00 2001 From: xu yang Date: Fri, 11 Oct 2024 02:27:33 +0000 Subject: [PATCH] fix issue that pattern matching broken on node set Signed-off-by: xu yang --- CHANGELOG.md | 1 + internal/pkg/api/node/node.go | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a456946a..1a698b5a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -52,6 +52,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Return non-zero exit code on node sub-commands #1421 - Fix panic when getting a long container list before building the container. #1391 - Return non-zero exit code on power sub-commands #1439 +- Fix issue that pattern matching broken on `node set` #964 ## v4.5.8, 2024-10-01 diff --git a/internal/pkg/api/node/node.go b/internal/pkg/api/node/node.go index 3981ab1f0..ca68daa04 100644 --- a/internal/pkg/api/node/node.go +++ b/internal/pkg/api/node/node.go @@ -234,7 +234,8 @@ func NodeSetParameterCheck(set *wwapiv1.NodeSetParameter, console bool) (nodeDB fmt.Printf("\n*** WARNING: This command will modify all nodes! ***\n\n") } } else { - nodes = node.FilterByName(nodes, set.NodeNames) + expandNodes := hostlist.Expand(set.NodeNames) + nodes = node.FilterByName(nodes, expandNodes) } if len(nodes) == 0 {