mirror of https://github.com/k3s-io/k3s
Merge pull request #74744 from Huang-Wei/debug-gke-cos
print out verbose info for a scheduler e2e testpull/564/head
commit
1c71f6b078
|
@ -385,6 +385,20 @@ var _ = SIGDescribe("PreemptionExecutionPath", func() {
|
||||||
priorityPairs := make([]priorityPair, 0)
|
priorityPairs := make([]priorityPair, 0)
|
||||||
|
|
||||||
AfterEach(func() {
|
AfterEach(func() {
|
||||||
|
// print out additional info if tests failed
|
||||||
|
if CurrentGinkgoTestDescription().Failed {
|
||||||
|
// list existing priorities
|
||||||
|
priorityList, err := cs.SchedulingV1().PriorityClasses().List(metav1.ListOptions{})
|
||||||
|
if err != nil {
|
||||||
|
framework.Logf("Unable to list priorities: %v", err)
|
||||||
|
} else {
|
||||||
|
framework.Logf("List existing priorities:")
|
||||||
|
for _, p := range priorityList.Items {
|
||||||
|
framework.Logf("%v/%v created at %v", p.Name, p.Value, p.CreationTimestamp)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if node != nil {
|
if node != nil {
|
||||||
nodeCopy := node.DeepCopy()
|
nodeCopy := node.DeepCopy()
|
||||||
// force it to update
|
// force it to update
|
||||||
|
@ -428,6 +442,10 @@ var _ = SIGDescribe("PreemptionExecutionPath", func() {
|
||||||
priorityVal := int32(i)
|
priorityVal := int32(i)
|
||||||
priorityPairs = append(priorityPairs, priorityPair{name: priorityName, value: priorityVal})
|
priorityPairs = append(priorityPairs, priorityPair{name: priorityName, value: priorityVal})
|
||||||
_, err := cs.SchedulingV1().PriorityClasses().Create(&schedulerapi.PriorityClass{ObjectMeta: metav1.ObjectMeta{Name: priorityName}, Value: priorityVal})
|
_, err := cs.SchedulingV1().PriorityClasses().Create(&schedulerapi.PriorityClass{ObjectMeta: metav1.ObjectMeta{Name: priorityName}, Value: priorityVal})
|
||||||
|
if err != nil {
|
||||||
|
framework.Logf("Failed to create priority '%v/%v': %v", priorityName, priorityVal, err)
|
||||||
|
framework.Logf("Reason: %v. Msg: %v", errors.ReasonForError(err), err)
|
||||||
|
}
|
||||||
Expect(err == nil || errors.IsAlreadyExists(err)).To(Equal(true))
|
Expect(err == nil || errors.IsAlreadyExists(err)).To(Equal(true))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -557,7 +575,6 @@ var _ = SIGDescribe("PreemptionExecutionPath", func() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
type pauseRSConfig struct {
|
type pauseRSConfig struct {
|
||||||
|
|
Loading…
Reference in New Issue