fix issue that pattern matching broken on node set

Signed-off-by: xu yang <xyang@ciq.com>
This commit is contained in:
xu yang
2024-10-11 02:27:33 +00:00
parent f102bb9a72
commit f51808bc75
2 changed files with 3 additions and 1 deletions

View File

@@ -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 - Return non-zero exit code on node sub-commands #1421
- Fix panic when getting a long container list before building the container. #1391 - Fix panic when getting a long container list before building the container. #1391
- Return non-zero exit code on power sub-commands #1439 - 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 ## v4.5.8, 2024-10-01

View File

@@ -234,7 +234,8 @@ func NodeSetParameterCheck(set *wwapiv1.NodeSetParameter, console bool) (nodeDB
fmt.Printf("\n*** WARNING: This command will modify all nodes! ***\n\n") fmt.Printf("\n*** WARNING: This command will modify all nodes! ***\n\n")
} }
} else { } else {
nodes = node.FilterByName(nodes, set.NodeNames) expandNodes := hostlist.Expand(set.NodeNames)
nodes = node.FilterByName(nodes, expandNodes)
} }
if len(nodes) == 0 { if len(nodes) == 0 {