Merge pull request #38789 from jessfraz/cleanup-temp-dirs

Automatic merge from submit-queue (batch tested with PRs 37228, 40146, 40075, 38789, 40189)

Cleanup temp dirs

So funny story my /tmp ran out of space running the unit tests so I am cleaning up all the temp dirs we create.
This commit is contained in:
Kubernetes Submit Queue
2017-01-20 12:34:58 -08:00
committed by GitHub
21 changed files with 130 additions and 18 deletions

View File

@@ -508,6 +508,7 @@ func FindEmptyDirectoryUsageOnTmpfs() (*resource.Quantity, error) {
if err != nil {
return nil, err
}
defer os.RemoveAll(tmpDir)
out, err := exec.Command("nice", "-n", "19", "du", "-s", "-B", "1", tmpDir).CombinedOutput()
if err != nil {
return nil, fmt.Errorf("failed command 'du' on %s with error %v", tmpDir, err)