Bug #34059
closeddb:seed can fail when there are host mismatches
Description
b"Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2028205 \n\n*Description of problem:*\n\nupgrading to 6.10 can fail when running db:seed in this way:\n\nrake aborted!\nActiveRecord::RecordInvalid: Validation failed: Environments expecting environments used by hosts or inherited (check mismatches report).\n/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/validations.rb:80:in `raise_validation_error'\n/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/validations.rb:53:in `save!'\n/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:318:in `block in save!'\n/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'\n/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'\n/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:212:in `transaction'\n/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:366:in `with_transaction_returning_status'\n/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/transactions.rb:318:in `save!'\n/opt/theforeman/tfm/root/usr/share/gems/gems/activerecord-6.0.3.7/lib/active_record/suppressor.rb:48:in `save!'\n/opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.1.39/app/lib/katello/lazy_accessor.rb:67:in `save!'\n/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!'\n/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'\n/opt/theforeman/tfm/root/usr/share/gems/gems/foreman-tasks-4.1.5/app/models/foreman_tasks/concerns/action_triggering.rb:31:in `save!'\n/opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.1.1.39/app/services/katello/organization_creator.rb:31:in `block in seed!'\n\n\n*Version-Release number of selected component (if applicable):*\n\n\n*How reproducible:*\n\n\n*Steps to Reproduce:*\n1.\n2.\n3.\n\n*Actual results:*\n\nInstaller fails to proceed\n\n*Expected results:*\n\ndb:seed continues and does not block the installer\n\n\n*Additional info:*"
Updated by The Foreman Bot almost 3 years ago
- Status changed from New to Ready For Testing
- Assignee set to Jonathon Turel
- Pull request https://github.com/Katello/katello/pull/9822 added
Updated by Andrew Dewar almost 3 years ago
- Subject changed from db:seed can fail when there are host mismatches to db:seed can fail when there are host mismatches
- Target version changed from Katello 4.4.0 to Katello 4.2.2
- Triaged changed from No to Yes
Updated by The Foreman Bot almost 3 years ago
- Fixed in Releases Katello 4.4.0 added
Updated by Jonathon Turel almost 3 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|fe3dbc9b5f07d7628f7e6ec38b8f61305dbf5fa0.
Updated by The Foreman Bot almost 3 years ago
- Pull request https://github.com/Katello/katello/pull/9890 added
Updated by The Foreman Bot almost 3 years ago
- Pull request https://github.com/Katello/katello/pull/9899 added