Skip to content
Open
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: 5 additions & 2 deletions pkg/slo/pod_create_failreason.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,14 @@ func getScheduleStatus(pod *v1.Pod) (int, time.Time) {
if pod == nil {
return -1, t
}
if pod.Spec.NodeName == "" {
return 0, t
if pod.Spec.NodeName != "" {
return 1, t
}
for _, condition := range pod.Status.Conditions {
if condition.Type == v1.PodScheduled && condition.Status == v1.ConditionTrue {
if pod.Spec.NodeName == "" {
return 0, t
}
return 1, condition.LastTransitionTime.Time
} else if condition.Type == v1.PodScheduled && condition.Status == v1.ConditionFalse &&
condition.Reason == v1.PodReasonUnschedulable {
Expand Down
4 changes: 0 additions & 4 deletions pkg/slo/pod_create_slo.go
Original file line number Diff line number Diff line change
Expand Up @@ -591,10 +591,6 @@ func (data *PodStartupMilestones) updateLatencyMetrics(milestone string, end tim
// IsComplete returns true is data is complete (ready to be included in the metric)
// and if it haven't been included in the metric yet.
func (data *PodStartupMilestones) IsComplete() bool {
if data.IsJob {
return !data.RunningAt.IsZero() || !data.SucceedAt.IsZero() || !data.FailedAt.IsZero()
}

return !data.ReadyAt.IsZero()
}

Expand Down