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 2028205 - db:seed can fail when there are host mismatches
Summary: db:seed can fail when there are host mismatches
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hosts - Content
Version: 6.10.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: 6.11.0
Assignee: satellite6-bugs
QA Contact: Stephen Wadeley
URL:
Whiteboard:
: 2028786 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-12-01 17:30 UTC by Jonathon Turel
Modified: 2024-12-20 21:40 UTC (History)
19 users (show)

Fixed In Version: katello-4.3.0-1.el7sat
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2043705 (view as bug list)
Environment:
Last Closed: 2022-07-05 14:30:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 34059 0 Normal Ready For Testing db:seed can fail when there are host mismatches 2021-12-10 09:35:35 UTC
Red Hat Knowledge Base (Solution) 6475691 0 None None None 2021-12-01 20:13:09 UTC
Red Hat Product Errata RHSA-2022:5498 0 None None None 2022-07-05 14:30:55 UTC

Description Jonathon Turel 2021-12-01 17:30:48 UTC
Description of problem:

upgrading to 6.10 can fail when running db:seed in this way:

rake aborted!
ActiveRecord::RecordInvalid: Validation failed: Environments expecting environments used by hosts or inherited (check mismatches report).
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/validations.rb:80:in `raise_validation_error'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/validations.rb:53:in `save!'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:318:in `block in save!'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:375:in `block in with_transaction_returning_status'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/connection_adapters/abstract/database_statements.rb:278:in `transaction'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:212:in `transaction'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:366:in `with_transaction_returning_status'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:318:in `save!'
/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/suppressor.rb:48:in `save!'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.1.39/app/lib/katello/lazy_accessor.rb:67:in `save!'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-4.1.5/app/models/foreman_tasks/concerns/action_triggering.rb:31:in `block in save!'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-4.1.5/app/models/foreman_tasks/concerns/action_triggering.rb:127:in `dynflow_task_wrap'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-4.1.5/app/models/foreman_tasks/concerns/action_triggering.rb:31:in `save!'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.1.39/app/services/katello/organization_creator.rb:31:in `block in seed!'


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:

Installer fails to proceed

Expected results:

db:seed continues and does not block the installer


Additional info:

Comment 1 Jonathon Turel 2021-12-01 17:34:53 UTC
Created redmine issue https://projects.theforeman.org/issues/34059 from this bug

Comment 2 Jonathon Turel 2021-12-01 20:13:09 UTC
*** Bug 2019467 has been marked as a duplicate of this bug. ***

Comment 21 Bryan Kearney 2022-01-06 20:04:44 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/34059 has been resolved.

Comment 24 Ahmed Eladawy 2022-02-16 10:17:10 UTC
*** Bug 2028786 has been marked as a duplicate of this bug. ***

Comment 28 errata-xmlrpc 2022-07-05 14:30:33 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.