Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions pkg/engines/slinky/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ const (

ConfigUpdateModeNone = "none"
ConfigUpdateModeSkeletonOnly = "skeleton-only"

dynamicShowPartitionNodes = "\tNodes=NONE"
)

type SlinkyEngine struct {
Expand Down Expand Up @@ -428,6 +430,11 @@ func (eng *SlinkyEngine) listPartitionNodes(ctx context.Context, sel *metav1.Lab
}

func (eng *SlinkyEngine) getPartitionNodes(ctx context.Context, partition string, params []any) (string, error) {
if eng.params.UseDynamicNodes {
klog.Infof("Skipping - scontrol show partition - when using useDynamicNodes flag")
return dynamicShowPartitionNodes, nil
}
Comment thread
ravisoundar marked this conversation as resolved.
Comment thread
ravisoundar marked this conversation as resolved.

if len(params) != 1 {
return "", fmt.Errorf("getPartitionNodes expects a namespace as a parameter")
}
Expand Down
4 changes: 4 additions & 0 deletions pkg/engines/slurm/slurm.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,10 @@ func GetPartitionNodes(ctx context.Context, partition string, f *TopologyNodeFin
func parsePartitionNodes(partition string, data string) ([]string, error) {
match := partitionNodesRe.FindStringSubmatch(data)
if len(match) > 1 {
// If the nodes are NONE, return an empty list
if match[1] == "NONE" {
return []string{}, nil
}
return cluset.Compact(cluset.ExpandList(match[1])), nil
}

Expand Down
Loading