mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
Merge pull request #22440 from gmarek/more_flake
Auto commit by PR queue bot
This commit is contained in:
commit
17b5ac4808
@ -406,6 +406,27 @@ func GetKubeletPods(c *client.Client, node string) (*api.PodList, error) {
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func PrintAllKubeletPods(c *client.Client, nodeName string) {
|
||||
result, err := nodeProxyRequest(c, nodeName, "pods")
|
||||
if err != nil {
|
||||
Logf("Unable to retrieve kubelet pods for node %v", nodeName)
|
||||
return
|
||||
}
|
||||
podList := &api.PodList{}
|
||||
err = result.Into(podList)
|
||||
if err != nil {
|
||||
Logf("Unable to cast result to pods for node %v", nodeName)
|
||||
return
|
||||
}
|
||||
for _, p := range podList.Items {
|
||||
Logf("%v from %v started at %v (%d container statuses recorded)", p.Name, p.Namespace, p.Status.StartTime, len(p.Status.ContainerStatuses))
|
||||
for _, c := range p.Status.ContainerStatuses {
|
||||
Logf("\tContainer %v ready: %v, restart count %v",
|
||||
c.Name, c.Ready, c.RestartCount)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func computeContainerResourceUsage(name string, oldStats, newStats *cadvisorapi.ContainerStats) *containerResourceUsage {
|
||||
return &containerResourceUsage{
|
||||
Name: name,
|
||||
|
@ -169,6 +169,12 @@ var _ = Describe("SchedulerPredicates [Serial]", func() {
|
||||
|
||||
err = waitForPodsRunningReady(api.NamespaceSystem, systemPodsNo, podReadyBeforeTimeout)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
for _, node := range nodeList.Items {
|
||||
Logf("\nLogging pods the kubelet thinks is on node %v before test", node.Name)
|
||||
PrintAllKubeletPods(c, node.Name)
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
// This test verifies that max-pods flag works as advertised. It assumes that cluster add-on pods stay stable
|
||||
|
Loading…
Reference in New Issue
Block a user