Bug 2096103

Summary: [RFE] Add a foreman-maintain stage to verify sufficient disk space.
Product: Red Hat Satellite Reporter: Jessica Hanley <jhanley>
Component: Foreman MaintainAssignee: satellite6-bugs <satellite6-bugs>
Status: NEW --- QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.7.0CC: aupadhye, ehelms, gtalreja, jrichards2
Target Milestone: UnspecifiedKeywords: FutureFeature
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:

Description Jessica Hanley 2022-06-12 20:43:26 UTC
1. Proposed title of this feature request

[RFE]  Add a foreman-maintain stage to verify sufficient disk space.

3. What is the nature and description of the request?

Please add a foreman-maintain stage to verify that there is sufficient disk space to either install or to upgrade Red Hat Satellite.  It should check for these questions:

- Are the maximum sizes of the volumes underlying the target directories large enough to hold the recommended runtime sizes of various satellite components? (warning)
- Are the maximum sizes of the volumes underlying the target directories large enough to hold the recommended installation sizes of various satellite components? (fail)
- Are the available sizes of the volumes underlying the target directories large enough to hold the data that needs to be migrated? (fail)

This logic will need to be smart enough to give a useful result even if the target directory doesn't yet exist, since in some cases the target directory _won't_ exist until after satellite-installer runs successfully.

Note:  We actually need this to be offered in foreman-maintain for Satellite versions 6.7 and above, because it will facilitate customer upgrades to supported versions, and many customers insist on upgrading in-place.

4. Why does the customer need this? (List the business requirements here)

On occasion, support receives cases from customers who are unable to install or upgrade Red Hat Satellite because their disks have filled up (and they haven't figured this out on their own).  This is especially common for customers who upgrade from versions of Satellite older than version 6.8, because the path to the postgres databases changed, and for customers who upgrade to version 6.10, because of both the mongodb to postgres transition and the pulp2 to pulp3 transition.

In addition to failed upgrades, these transition "gotchas" can also result in database corruption during the upgrade process, which can be difficult to recover from, and at times difficult to predict or to quickly detect.

5. How would the customer like to achieve this? (List the functional requirements here)

- use our published Satellite documentation as guidelines to determine how large should be the underlying volumes for the target directories
- when migrating pulp2 content to pulp3, check the size of "/var/lib/pulp/published/yum/master/yum_distributor/" when estimating how much disk space will be required to fill "/var/lib/pulp/media/artifact/"
- when migrating the mongodb database to postgres, use the existing size of the mongodb databases as an estimate of how much additional disk space might be required by postgres

6. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.

- create a RHEL 7 VM with just enough storage to install Satellite 6.7
- attempt to upgrade to Satellite 6.8; the disk checks should fail because more space will be needed to install the new version of postgres

- create a RHEL 7 VM with just enough storage to install Satellite 6.9
- attempt to upgrade to Satellite 6.10; the disk checks should fail because more space will be needed to migrate pulp content and to migrate the mongodb database to postgres

7. Is there already an existing RFE upstream or in Red Hat Bugzilla?

no

8. Does the customer have any specific time-line dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?

no

9. Is the sales team involved in this request and do they have any additional input?

no

10. List any affected packages or components.

satellite-installer

11. Would the customer be able to assist in testing this functionality if implemented?

yes

Comment 1 Brad Buckingham 2023-07-21 21:06:39 UTC
Upon review of our valid but aging backlog the Satellite Team has concluded that this Bugzilla does not meet the criteria for a resolution in the near term, and are planning to close in a month. This message may be a repeat of a previous update and the bug is again being considered to be closed. If you have any concerns about this, please contact your Red Hat Account team.  Thank you.