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: 2022-07-13 18:08 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.