Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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 1931508

Summary: Upgrade to Satellite 6.8 fails with candlepin timeout exceeded.
Product: Red Hat Satellite Reporter: Dylan Gross <dgross>
Component: InstallationAssignee: Evgeni Golov <egolov>
Status: CLOSED CURRENTRELEASE QA Contact: Devendra Singh <desingh>
Severity: high Docs Contact:
Priority: high    
Version: 6.8.0CC: ahumbe, egolov, ehelms, ktordeur, mmccune
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-08-11 11:43:57 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:
Attachments:
Description Flags
1931508.patch none

Description Dylan Gross 2021-02-22 15:19:56 UTC
Description of problem:

  The steps the upgrade from v6.7 to v6.8.x involve an upgrade from postgres v9 to postgres v12.   

  The "cpdb update" stanze from /usr/share/foreman-installer/modules/candlepin/manifests/database/postgresql.pp does not explicitly specify a timeout, which *appears* to default to 300 seconds when not explicitly specified.   (I'm told 300 seconds is the default timeout for exec resources in puppet)

  When the cpdb update takes longer than that, this implicit timeout will terminate and leave a lock in the database preventing subsequent attempts.

~~~
[ERROR 2021-02-15T03:28:37 main]  /Stage[main]/Candlepin::Database::Postgresql/Exec[cpdb update]/returns: change from 'notrun' to ['0'] failed: Command exceeded timeout
[ERROR 2021-02-15T03:28:37 main]  /Stage[main]/Candlepin::Database::Postgresql/Exec[cpdb update]: Failed to call refresh: Command exceeded timeout
[ERROR 2021-02-15T03:28:37 main]  /Stage[main]/Candlepin::Database::Postgresql/Exec[cpdb update]: Command exceeded timeout
~~~

 
Version-Release number of selected component (if applicable):

   foreman-installer-2.1.2.9-1.el7sat.noarch

How reproducible:   Unsure - Big candlepin database - maybe because of a lot of Content Hosts.  Maybe some other inefficiency requiring the cpdb update to exceed 300 seconds.


Actual results:   Timeout during "cpdb update"


Expected results:  cpdb update completes.

Comment 6 Brad Buckingham 2021-08-11 11:43:57 UTC
Closing this bugzilla as the behavior described is resolved in Satellite 6.9.

Comment 7 Mike McCune 2021-12-07 17:41:39 UTC
*** Satellite 6.8 Patch ***

For users upgrading from 6.7 to 6.8 and hitting this error, you may patch the installer via the following instructions to get past this error:

1) Download 1931508.patch from this BZ to your Satellite.

2) backup patched files:

# cd /usr/share/foreman-installer/modules/candlepin
# tar cvf 1931508-backup.tar manifests/database/postgresql.pp manifests/init.pp

3) Copy 1931508.patch to /usr/share/foreman-installer/modules/candlepin

4) Execute patch:

# cd /usr/share/foreman-installer/modules/candlepin
# patch -p1 < 1931508.patch
patching file manifests/database/postgresql.pp
patching file manifests/init.pp

5) Re-try your upgrade:

# satellite-maintain upgrade ...

Comment 8 Mike McCune 2021-12-07 17:42:26 UTC
Created attachment 1845113 [details]
1931508.patch