Bug 1178166

Summary: [RFE] report on and ensure sufficient disk space exists before exporting repo
Product: Red Hat Satellite Reporter: Matt Reid <mreid>
Component: Inter Satellite SyncAssignee: Chris Duryee <cduryee>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.4CC: bbuckingham, bkearney, byodlows, cduryee, jcallaha, mmccune, pgervase, riehecky, rohoover
Target Milestone: UnspecifiedKeywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-18 17:24:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 260381, 1545876    

Description Matt Reid 2015-01-02 16:13:43 UTC
Description of problem:
Export and sync are both long running tasks that require a large amount of disk space, but don't help the user know if they have enough disk space to actually complete the task. When setting up a disconnected Satellite, there's no visibility into if the system has enough space to safely expand the archives when running the expand script.

We tried to export content from our content host, ended up running out of disk space during the process, and the export not only didn't warn us that would happen before we ran it, but it didn't realize that we had run out of space, and kept running, hoping that it would be able to continue. The only way we knew this was by checking the log files (which had a huge number of errors about it every 10 seconds or so) and running a disk space check manually. 

It would be much more user friendly if we were more upfront about disk space requirements, and tried harder to prevent issues like using the entire disk and not realizing it, from happening.

Version-Release number of selected component (if applicable):
katello-utils-1.5.16-1

How reproducible:
100%

Steps to Reproduce:
1. set up a content host
2. sync a few repositories to use most of your disk
3. run an export (from https://access.redhat.com/documentation/en-US/Red_Hat_Satellite/6.0/html/Installation_Guide/sect-Red_Hat_Satellite-Installation_Guide-Exporting_Content.html)

Actual results:
export process will use as much disk as it can, if it needs more than is available, it will continue to run until you blow up the processes

Expected results:
When trying to initiate the export, the katello-disconnected to realize that the 40gb of repos it has sync'd will require more than the 20gb (for example) of disk space left on the system to export, and fail, warning the user to add more disk space, or export to a different location.

Additional info:

Comment 1 RHEL Program Management 2015-01-02 16:24:16 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 8 Chris Duryee 2016-09-20 18:40:45 UTC
This bug may require a Pulp RFE to get the expected on-disk size of a repo before publishing. One possible option would be to just sum up all the sizes of all RPMs, which would work for yum but not for other types.

Comment 9 Chris Duryee 2017-01-10 19:52:30 UTC
*** Bug 1400766 has been marked as a duplicate of this bug. ***

Comment 10 Satellite Program 2017-01-10 21:08:21 UTC
Upstream bug assigned to cduryee

Comment 15 Bryan Kearney 2018-07-18 17:24:24 UTC

*** This bug has been marked as a duplicate of bug 1253702 ***