From 351a70b60e5091fd0c6c089091fb5fd122e3a73d Mon Sep 17 00:00:00 2001 From: Filipe Brandenburger Date: Tue, 20 Mar 2018 17:26:48 -0700 Subject: [PATCH] In summary_test, create a file outside the test volume too. This is necessary to show any RootFs usage on systems where the backing filesystem of overlay2 is xfs. The current test only created directories (for mount points) in the upper layer of the overlay. Outside of the mount namespace, only the directories are visible. When running `du` on those, usually filesystems will show some usage, but not xfs, which shows a disk usage of 0 for directories. Fix this by creating a file in the root directory, outside the volumes, in order to trigger some disk usage that can be measured by `du`. Tested: make test-e2e-node REMOTE=true HOSTS=centos-e2e-node FOCUS="Summary API" --- test/e2e_node/summary_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e_node/summary_test.go b/test/e2e_node/summary_test.go index 5cfdccaffad..80581e17e6e 100644 --- a/test/e2e_node/summary_test.go +++ b/test/e2e_node/summary_test.go @@ -324,7 +324,7 @@ func getSummaryTestPods(f *framework.Framework, numRestarts int32, names ...stri { Name: "busybox-container", Image: busyboxImage, - 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, "echo 'some bytes' >/outside_the_volume.txt; ping -c 1 google.com; echo 'hello world' >> /test-empty-dir-mnt/file;"), Resources: v1.ResourceRequirements{ Limits: v1.ResourceList{ // Must set memory limit to get MemoryStats.AvailableBytes