Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2071553

Summary: LEAPP upgrade fails to run installer due to insufficient resources
Product: Red Hat Enterprise Linux 7 Reporter: Evgeni Golov <egolov>
Component: leapp-repositoryAssignee: Leapp team <leapp-notifications>
Status: CLOSED ERRATA QA Contact: Lukas Pramuk <lpramuk>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.9CC: ahumbe, ehelms, jbhatia, lpramuk, mhecko, pstodulk
Target Milestone: rcKeywords: OtherQA, Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: leapp-repository-0.17.0-1.el7_9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2092122 (view as bug list) Environment:
Last Closed: 2022-11-09 12:33:16 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: 2092122    

Description Evgeni Golov 2022-04-04 08:06:34 UTC
Description of problem:
In certain setups, the installer decides that the system has insufficient resources (memory, CPU, etc) and refuses to operate unless the administrator passes the --disable-system-checks option.

When trying to upgrade such a setup from EL7 to EL8 in place using leapp, the final step of the upgrade fails:

2022-04-01 16:27:45.297 INFO     PID: 1198 leapp.workflow.FirstBoot: Executing actor satellite_upgrader 
2022-04-01 16:27:45.320 DEBUG    PID: 1632 leapp.workflow.FirstBoot.satellite_upgrader: External command has started: ['foreman-installer']
2022-04-01 16:27:46.711 DEBUG    PID: 1632 leapp.workflow.FirstBoot.satellite_upgrader: 2022-04-01 16:27:46 [NOTICE] [root] Loading installer configuration. This will take some time.
2022-04-01 16:27:50.597 DEBUG    PID: 1632 leapp.workflow.FirstBoot.satellite_upgrader: 2022-04-01 16:27:50 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2022-04-01 16:27:50.598 DEBUG    PID: 1632 leapp.workflow.FirstBoot.satellite_upgrader: 2022-04-01 16:27:50 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
2022-04-01 16:27:54.490 DEBUG    PID: 1632 leapp.workflow.FirstBoot.satellite_upgrader: Insufficient memory for tuning size
2022-04-01 16:27:54.493 DEBUG    PID: 1632 leapp.workflow.FirstBoot.satellite_upgrader: Tuning profile 'default' requires at least 8 GB of memory and 1 CPU cores
2022-04-01 16:27:54.494 DEBUG    PID: 1632 leapp.workflow.FirstBoot.satellite_upgrader: Command ['foreman-installer'] failed with exit code 103.
2022-04-01 16:27:54.496 DEBUG    PID: 1632 leapp.workflow.FirstBoot.satellite_upgrader: External command has finished: ['foreman-installer']
2022-04-01 16:27:54.497 ERROR    PID: 1632 leapp.workflow.FirstBoot.satellite_upgrader: Could not run the installer, please inspect the logs in /var/log/foreman-installer!


(from /var/log/leapp/leapp-upgrade.log)

When calling the installer non-interactively after an initial installation, we should always ensure that it can pass/ignore those checks, as the system is obviously already working.

Other tools (foreman-maintain) pass --disable-system-checks to the installer, and so should our LEAPP actors.


Version-Release number of selected component (if applicable):
leapp-0.14.0-1.el7_9
leapp-repository-0.16.0-1.el7_9

How reproducible:
100% on a system with too low resources, like 2CPU/6GB RAM for the "default" tuning profile.

Steps to Reproduce:
1. install Satellite 6.11 on EL7 with --disable-system-checks
2. try to upgrade to EL8

Actual results:
error during first boot

Expected results:
installer is executed and finishes the installation

Additional info:

Comment 2 Evgeni Golov 2022-04-04 10:10:58 UTC
I've verified that my patch fixes the issue described, but it needs to be applied *before* the whole upgrade procedure begins and can't fix an "aborted" upgrade.

However, the trivial workaround for the issue is to just run `foreman-installer --disable-system-checks` (no further parameters required) after the EL8 system has booted and the logs indicate that the installer has not been run correctly.

As such, I don't think this should be "sev: high" :)

Comment 7 Petr Stodulka 2022-08-23 10:19:27 UTC
The upstream PR has been merged:
    https://github.com/oamg/leapp-repository/pull/875

Comment 11 Lukas Pramuk 2022-09-14 12:36:30 UTC
VERIFIED.

@Satellite 6.11.2
leapp-0.15.0-2.el7_9.noarch
leapp-upgrade-el7toel8-0.17.0-1.el7_9.noarch

by the following manual reproducer:

1) Have a machine with ~ 7GB RAM with Satellite 6.11.2 el7 installed

# satellite-installer 
2022-09-14 07:34:22 [NOTICE] [root] Loading installer configuration. This will take some time.
2022-09-14 07:34:29 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2022-09-14 07:34:29 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
Insufficient memory for tuning size
Tuning profile 'default' requires at least 8 GB of memory and 1 CPU cores

>>> installer refuses to run without override flag (--disable-system-checks)

2) LEAPP upgrade to RHEL8

# leapp upgrade --reboot

3) Check Satellite health after LEAPP finished

# hammer ping
    Status:          ok
    Server Response: Duration: 0ms
candlepin:        
    Status:          ok
    Server Response: Duration: 46ms
candlepin_auth:   
    Status:          ok
    Server Response: Duration: 44ms
candlepin_events: 
    Status:          ok
    message:         0 Processed, 0 Failed
    Server Response: Duration: 0ms
katello_events:   
    Status:          ok
    message:         0 Processed, 0 Failed
    Server Response: Duration: 1ms
pulp3:            
    Status:          ok
    Server Response: Duration: 85ms
pulp3_content:    
    Status:          ok
    Server Response: Duration: 80ms
foreman_tasks:    
    Status:          ok
    Server Response: Duration: 5ms

>>> during upgrade process installer has been run successfully using override flag (--disable-system-checks)

Comment 14 errata-xmlrpc 2022-11-09 12:33:16 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 (leapp and leapp-repository bug fix and enhancement update), 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-2022:7895