mirror of https://github.com/k3s-io/k3s
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"pull/8/head
parent
5ae7bba496
commit
351a70b60e
|
@ -324,7 +324,7 @@ func getSummaryTestPods(f *framework.Framework, numRestarts int32, names ...stri
|
||||||
{
|
{
|
||||||
Name: "busybox-container",
|
Name: "busybox-container",
|
||||||
Image: busyboxImage,
|
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{
|
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
|
||||||
|
|
Loading…
Reference in New Issue