Bug 1762302 - foreman-maintain leaves fio test-files after running disk-benchmark
Summary: foreman-maintain leaves fio test-files after running disk-benchmark
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Satellite Maintain
Version: 6.5.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: 6.8.0
Assignee: Kavita
QA Contact: Jameer Pathan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-16 13:09 UTC by Andreas Bleischwitz
Modified: 2023-09-07 20:48 UTC (History)
6 users (show)

Fixed In Version: rubygem-foreman_maintain-0.5.3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 12:38:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 28184 0 Normal Closed foreman-maintain leaves fio test-files after running disk-benchmark 2020-12-14 15:12:42 UTC
Github SatelliteQE testfm pull 226 0 None closed qe_test_coverage bz1762302 2021-04-06 14:09:44 UTC
Red Hat Product Errata RHBA-2020:4365 0 None None None 2020-10-27 12:38:41 UTC

Description Andreas Bleischwitz 2019-10-16 13:09:11 UTC
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

# 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):
# 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

Comment 6 Kavita 2019-11-01 17:50:12 UTC
Created redmine issue https://projects.theforeman.org/issues/28184 from this bug

Comment 8 Bryan Kearney 2020-02-03 17:05:50 UTC
Upstream bug assigned to kgaikwad

Comment 9 Bryan Kearney 2020-02-03 17:05:52 UTC
Upstream bug assigned to kgaikwad

Comment 10 Bryan Kearney 2020-02-12 17:07:50 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/28184 has been resolved.

Comment 15 Kavita 2020-04-17 07:25:31 UTC
Hello Andreas, 

Updating package rubygem-foreman_maintain to 0.5.3 will resolve this.
As you mentioned, included in Satellite 6.7.

Moving this BZ to ON_QA for verification

Comment 16 Jameer Pathan 2020-06-10 07:31:56 UTC
Verified 

Verified with:
- Satellite 6.8.0 snap 3
- rubygem-foreman_maintain-0.6.4-1.el7sat.noarch

Test steps:
- Run foreman-maintain health check --label disk-performance
- ls -lh /var/lib/pulp/job1.0.0

Observation:
- While check is running it creates /var/lib/pulp/job1.0.0
- /var/lib/pulp/job1.0.0 is not present ones check finishes execution.

Note: disk-performance check won't run with other pre-upgrade checks.
Refer BZ#1827219 for more information.

Comment 19 errata-xmlrpc 2020-10-27 12:38:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Satellite 6.8 Satellite Maintenance Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4365


Note You need to log in before you can comment on or make changes to this bug.