Project

General

Profile

Actions

Bug #28184

closed

foreman-maintain leaves fio test-files after running disk-benchmark

Added by Kavita Gaikwad over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
-
Difficulty:
trivial
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1762302

Description of problem:
After running foreman-maintain, /var/lib/pulp/job1.0.0 is still on the disk. This file was created by the fio disk-benchmark.

fio --name=job1 --rw=read --size=1g --output-format=json --directory=/var/lib/pulp --direct=1

  1. ls lh /var/lib/pulp/job1.0.0
    -rw-r--r-
    . 1 root root 1.0G Oct 16 12:51 /var/lib/pulp/job1.0.0
Version-Release number of selected component (if applicable):
  1. rpm -qa |grep maintain
    rubygem-foreman_maintain-0.3.5-1.el7sat.noarch
    satellite-maintain-0.0.1-1.el7sat.noarch

How reproducible:
Always

Steps to Reproduce:
1. run "foreman-maintain health check --label disk-performance"
2. see "/var/lib/pulp/job1.0.0" created, but never removed
3.

Actual results:
Leftovers from those benchmark tests.

Expected results:
Leftovers removed after benchmark has been run

Additional info:

/usr/share/gems/gems/foreman_maintain-0.3.5/lib/foreman_maintain/utils/disk/io_device.rb should probably add a file-removal after fio finished.

28         def fio
29 cmd = "fio --name=job1 --rw=read --size=1g --output-format=json\
30 --directory=#{dir} --direct=1"
31 stdout = execute(cmd)
32 output = JSON.parse(stdout)
33 @fio ||= output['jobs'].first['read']['bw'].to_i

probably here??

34 end

Additional, I see that /usr/share/gems/gems/foreman_maintain-0.3.5/definitions/checks/disk/performance.rb should test pulp, mongo and pgsql directories for speed, I only saw pulp being tested.

17       DEFAULT_DIRS   = ['/var/lib/pulp', '/var/lib/mongodb', '/var/lib/pgsql'].freeze
Actions #1

Updated by Andreas Bleischwitz over 4 years ago

  • Difficulty set to trivial

Adding "--unlink=true" to the command line should already do the trick.

man fio:

       unlink=bool
              Unlink the job files when done. Not the default, as repeated runs of that job would then waste time recreating the file set again and again. Default: false.

Actions #2

Updated by The Foreman Bot over 4 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_maintain/pull/303 added
Actions #3

Updated by Kavita Gaikwad over 4 years ago

  • Assignee changed from Anurag Patel to Kavita Gaikwad
Actions #4

Updated by Kavita Gaikwad over 4 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF