From 0feb7b0804bfe1c0d2810fc81c6e4eebbe85f462 Mon Sep 17 00:00:00 2001 From: ada mancini Date: Tue, 3 Oct 2023 13:18:20 -0400 Subject: [PATCH] remove old file create code --- .../host_filesystem_performance_linux.go | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/pkg/collect/host_filesystem_performance_linux.go b/pkg/collect/host_filesystem_performance_linux.go index c37c68169..abcb98603 100644 --- a/pkg/collect/host_filesystem_performance_linux.go +++ b/pkg/collect/host_filesystem_performance_linux.go @@ -46,27 +46,6 @@ func collectHostFilesystemPerformance(hostCollector *troubleshootv1beta2.Filesys return nil, errors.Wrapf(err, "failed to mkdir %q", hostCollector.Directory) } - // filename := filepath.Join(hostCollector.Directory, fioJobOptions.Name) - // // Create file handle - // f, err := os.OpenFile(filename, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0600) - // if err != nil { - // if os.IsPermission(err) { - // return nil, errors.Wrapf(err, "open %s permission denied; please run this collector as root", filename) - // } else if os.IsNotExist(err) { - // return nil, errors.Wrapf(err, "open %s no such file or directory", filename) - // } else { - // return nil, errors.Wrapf(err, "open %s for writing failed", filename) - // } - // } - // defer func() { - // if err := f.Close(); err != nil { - // log.Println(err.Error()) - // } - // if err := os.Remove(filename); err != nil { - // log.Println(err.Error()) - // } - // }() - // Start the background IOPS task and wait for warmup if hostCollector.EnableBackgroundIOPS { // The done channel waits for all jobs to delete their work file after the context is