Bug 1908237
Summary: | [Installer] Installer timeout when executing foreman-rake db:migrate | ||
---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Evgeni Golov <egolov> |
Component: | Installation | Assignee: | Evgeni Golov <egolov> |
Status: | CLOSED ERRATA | QA Contact: | Devendra Singh <desingh> |
Severity: | medium | Docs Contact: | |
Priority: | high | ||
Version: | 6.8.0 | CC: | ahumbe, ehelms, ltran, mmccune, pcreech, satellite6-bugs, tbrisker, wclark, zhunting |
Target Milestone: | 6.9.0 | Keywords: | PrioBumpField, Upgrades |
Target Release: | Unused | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | foreman-installer-2.3.1.8-1 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | 1904963 | Environment: | |
Last Closed: | 2021-04-21 13:24:23 UTC | Type: | --- |
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: | 1904963 | ||
Bug Blocks: |
Description
Evgeni Golov
2020-12-16 07:41:50 UTC
Created redmine issue https://projects.theforeman.org/issues/31670 from this bug Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/31670 has been resolved. Verified on 6.9 Snap 18 This BZ has been reported against Satellite 6.8 with symptoms of installer timing out while waiting for `foreman-rake db:migrate` to finish. However the attached fixes also provide a fix for the issue of `pulpcore-manager migrate` timeout which could occur on Satellite 6.9 or later. That issue would present a different installer error (below) than the one originally reported in this BZ: 2021-04-06 18:43:34 [ERROR ] [configure] /Stage[main]/Pulpcore::Database/Pulpcore::Admin[migrate --noinput]/Exec[pulpcore-manager migrate --noinput]/returns: change from 'notrun' to ['0'] failed: Command exceeded timeout The fix, in both cases, is to increase the default timeout for the installer to wait for the command to finish executing from 300 seconds (5 minutes) to 3600 seconds (one hour). In some cases, such as an internal lab Satellite with 1,000,000+ packages synced, this one hour timeout was still insufficient for `pulpcore-manager migrate`. If you face a similar issue and need to increase the timeout beyond the default, you can adjust the parameter in /etc/foreman-installer/custom-hiera.yaml as below; for example, to increase the timeout for `pulpcore-manager migrate` to two hours (7200 seconds): pulpcore::database::timeout: 7200 Or to instead increase to timeout for `foreman-rake db:migrate` to 7200 seconds, add to /etc/foreman-installer/custom-hiera.yaml: foreman::database::timeout: 7200 Note that these are the timeout values for the installer to exit while waiting for the command to run. That means, the installer itself will exit with an error but whichever `pulpcore-manager migrate --noinput` or `foreman-rake db:migrate` command timed out whould continue running any pending DB migrations in the background. Re-running the installer immediately, before those migrations are completed, could result in other errors. Therefore if you reach this scenario, you should monitor[1] the still running process until it completes. Then you should modify /etc/foreman-installer/custom-hiera.yaml as above to prevent the issue from occurring on future database migrations when upgrading your Satellite, and re-run[2] the installer to finish any remaining configuration tasks which aren't executed by the installer until after the the database migrations. [1] Using top, ps, or any process monitor [2] If you monitored the original migration process until it completed, the installer would find no remaining pending migrations upon reaching that installation step, meaning it should progress more quickly to the actual remaining work. 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 (Moderate: Satellite 6.9 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/RHSA-2021:1313 The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days |