Skip to content

Commit

Permalink
remove old file create code
Browse files Browse the repository at this point in the history
  • Loading branch information
adamancini committed Oct 3, 2023
1 parent 54304ed commit 0feb7b0
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions pkg/collect/host_filesystem_performance_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0feb7b0

Please sign in to comment.