Merge pull request #46801 from dashpole/summary_container_restart

Automatic merge from submit-queue

[Flaky PR Test] Fix summary test

fixes issue: #46797 

As we can see in the [example failure build log](https://storage.googleapis.com/kubernetes-jenkins/logs/ci-kubernetes-node-kubelet/4319/build-log.txt), the summary containers are pinging google 100s of times a second.  This causes the summary container to be killed occasionally, and fail the test.  The summary containers are only supposed to ping every 10 seconds according to the current test.  As it turns out, we were missing a semicolon, and were not sleeping between pings.  For background, we ping google to generate network traffic, so that the summary test can validate network metrics.

This PR adds the semicolon to make the container sleep between calls, and decreases the sleep time from 10 seconds to 1 second, as 1 call / 10 seconds did not produce enough activity.

cc @kubernetes/kubernetes-build-cops @dchen1107
pull/6/head
Kubernetes Submit Queue 2017-06-02 18:02:19 -07:00 committed by GitHub
commit d063ce213f
2 changed files with 2 additions and 2 deletions

View File

@ -312,7 +312,7 @@ func getRestartingContainerCommand(path string, containerNum int, restarts int32
if [ $count -lt %d ]; then if [ $count -lt %d ]; then
exit 0 exit 0
fi fi
while true; do %s sleep 10; done`, while true; do %s sleep 1; done`,
path, strconv.Itoa(containerNum), restarts+1, loopingCommand), path, strconv.Itoa(containerNum), restarts+1, loopingCommand),
} }
} }

View File

@ -285,7 +285,7 @@ func getSummaryTestPods(f *framework.Framework, numRestarts int32, names ...stri
{ {
Name: "busybox-container", Name: "busybox-container",
Image: "gcr.io/google_containers/busybox:1.24", Image: "gcr.io/google_containers/busybox:1.24",
Command: getRestartingContainerCommand("/test-empty-dir-mnt", 0, numRestarts, "ping -c 1 google.com; echo 'hello world' >> /test-empty-dir-mnt/file"), Command: getRestartingContainerCommand("/test-empty-dir-mnt", 0, numRestarts, "ping -c 1 google.com; echo 'hello world' >> /test-empty-dir-mnt/file;"),
Resources: v1.ResourceRequirements{ Resources: v1.ResourceRequirements{
Limits: v1.ResourceList{ Limits: v1.ResourceList{
// Must set memory limit to get MemoryStats.AvailableBytes // Must set memory limit to get MemoryStats.AvailableBytes