Skip to content

Commit

Permalink
debug: fix node count bug in GH-9566
Browse files Browse the repository at this point in the history
  • Loading branch information
davemay99 committed Dec 11, 2020
1 parent ce16d90 commit f641717
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions command/operator_debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,13 +328,14 @@ func (c *OperatorDebugCommand) Run(args []string) int {
}

// Increment fail count if no nodes are found
nodesFound = len(nodes)
if nodesFound == 0 {
if len(nodes) == 0 {
c.Ui.Error(fmt.Sprintf("No node(s) with prefix %q found", id))
nodeLookupFailCount++
continue
}

nodesFound += len(nodes)

// Apply constraints to nodes found
for _, n := range nodes {
// Ignore nodes that do not match specified class
Expand Down

0 comments on commit f641717

Please sign in to comment.