Skip to content

Commit

Permalink
checkup: Add fail logic
Browse files Browse the repository at this point in the history
The checkup will now fail if the oslat Maximum latency measured exceeded
the oslatLatencyThreshold, and issue the appropriate failure reason.

Signed-off-by: Ram Lavi <[email protected]>
  • Loading branch information
RamLavi committed Dec 18, 2023
1 parent 6e2e45c commit 2187938
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/internal/checkup/checkup.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ func (c *Checkup) Run(ctx context.Context) error {
}
c.results.VMUnderTestActualNodeName = c.vmi.Status.NodeName

if c.results.OslatMaxLatency > c.cfg.OslatLatencyThreshold {
return fmt.Errorf("oslat Max Latency measured %s exceeded the given threshold %s",
c.results.OslatMaxLatency.String(), c.cfg.OslatLatencyThreshold.String())
}
return nil
}

Expand Down

0 comments on commit 2187938

Please sign in to comment.