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 2067331 - Upgrade to Satellite 6.9 and 6.10 fails with error "ActiveRecord::RecordInvalid: Validation failed: Remote execution features is invalid" during db:seed stage
Summary: Upgrade to Satellite 6.9 and 6.10 fails with error "ActiveRecord::RecordInval...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: RH Cloud - Insights
Version: 6.9.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 6.11.0
Assignee: Shimon Shtein
QA Contact: addubey
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-23 19:21 UTC by Sayan Das
Modified: 2024-12-20 21:41 UTC (History)
6 users (show)

Fixed In Version: rubygem-foreman_rh_cloud-5.0.35
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2093402 (view as bug list)
Environment:
Last Closed: 2022-07-05 14:34:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker TFMRHCLOUD-307 0 None None None 2022-05-11 14:39:54 UTC
Red Hat Knowledge Base (Solution) 6818181 0 None None None 2022-03-23 19:21:57 UTC
Red Hat Product Errata RHSA-2022:5498 0 None None None 2022-07-05 14:35:03 UTC

Description Sayan Das 2022-03-23 19:21:57 UTC
Description of problem:

Upgrade to Satellite 6.9 and 6.10 fails with error "ActiveRecord::RecordInvalid: Validation failed: Remote execution features is invalid" during db:seed stage

The issue is only reproducible in the infra of the users who had ran into the problem. 


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

Satellite 6.9 ( and one case of Satellite 6.10 )

How reproducible:

In the customer's infra


Steps to Reproduce:
1. Install and configure Satellite 6.8 and Upgrade to 6.9 
2. Or else Install and configure Satellite 6.9, configure the insights stuff and inventory sync etc and then upgrade to 6.10


Actual results:

db:seed fails:

2021-10-19 10:55:40 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: Starting to evaluate the resource (1750 of 2365)
2021-10-19 10:55:40 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: '/usr/sbin/foreman-rake db:seed' won't be executed because of failed check 'refreshonly'
2021-10-19 10:55:40 [DEBUG ] [configure] Exec[foreman-rake-db:seed](provider=posix): Executing '/usr/sbin/foreman-rake db:seed'
2021-10-19 10:55:40 [DEBUG ] [configure] Executing with uid=foreman: '/usr/sbin/foreman-rake db:seed'
2021-10-19 10:56:07 [INFO  ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: API controllers newer than Apipie cache! Run apipie:cache rake task to regenerate cache.
2021-10-19 10:56:07 [INFO  ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: rake aborted!
2021-10-19 10:56:07 [INFO  ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: ActiveRecord::RecordInvalid: Validation failed: Remote execution features is invalid



Expected results:

No such issues


Additional info:

For whichever customer this issue had happened, the only root cause was that, there was a rh_cloud_remediate_hosts entry duplicated in remote_execution_features table and they never had any job_template_id assigned to them either. And only solution was to get rid of those entries and re-run the db:seed followed by satellite-installer.  

# su - postgres -c "echo \"select id,label,name,job_template_id from remote_execution_features order by id;\" | psql foreman"
id |               label               |                   name                   | job_template_id
----+-----------------------------------+------------------------------------------+-----------------

--- 8< -----  8< -----  8< -----  8< -----  8< -----  8< -----  8< -----  8< -----  8< -----  8< ----- 

18 | rh_cloud_remediate_hosts          | Apply Insights recommendations           |                    
19 | rh_cloud_remediate_hosts          | Apply Insights recommendations           |                    

--- 8< -----  8< -----  8< -----  8< -----  8< -----  8< -----  8< -----  8< -----  8< -----  8< ----- 
(22 rows)

And we have no idea how these duplications are getting created.

Comment 7 errata-xmlrpc 2022-07-05 14:34:49 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 (Moderate: Satellite 6.11 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-2022:5498


Note You need to log in before you can comment on or make changes to this bug.