previously I updates my acceptance environment and that went well (without errors). Updating my prodction environment gave the error below while doing the database upgrade to the katello 3.6 version
Problem:
the upgrade task katello:upgrades:3.6:import_product_content stops with an error
[DEBUG 2018-07-16 16:47:37 main] ActiveRecord::RecordInvalid: Validation failed: Label has already been taken
It looks like katello functions normally, but I suppose there is missing data, somewhere. If I rerun the installer (or just rerun this foreman-rake script), the result is the same, using --trace does not give additional info
Expected outcome:
the database migration finishes without error, ready for the next migration tot 3.7 when it’s there
Foreman and Proxy versions:
foreman 1.17.1 and katello 3.6 (repos in sync as of 16-07-2018)
Other relevant data:
[DEBUG 2018-07-16 16:47:35 main] Called from /opt/theforeman/tfm/root/usr/share/gems/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
[DEBUG 2018-07-16 16:47:37 main] rake aborted!
[DEBUG 2018-07-16 16:47:37 main] ActiveRecord::RecordInvalid: Validation failed: Label has already been taken
[DEBUG 2018-07-16 16:47:37 main] /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/validations.rb:78:in `raise_validation_error'
[DEBUG 2018-07-16 16:47:37 main] /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/validations.rb:50:in `save!'
[DEBUG 2018-07-16 16:47:37 main] /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/attribute_methods/dirty.rb:43:in `save!'
[DEBUG 2018-07-16 16:47:37 main] /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/transactions.rb:313:in `block in save!'
[DEBUG 2018-07-16 16:47:37 main] /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/transactions.rb:384:in `block in with_transaction_returning
_status'
[DEBUG 2018-07-16 16:47:37 main] /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `block in transaction'
[DEBUG 2018-07-16 16:47:37 main] /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/transaction.rb:194:in `block in within_new_transaction'
[DEBUG 2018-07-16 16:47:37 main] /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/transaction.rb:191:in `within_new_transaction'
[DEBUG 2018-07-16 16:47:37 main] /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/connection_adapters/abstract/database_statements.rb:235:in `transaction'
[DEBUG 2018-07-16 16:47:37 main] /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/transactions.rb:210:in `transaction'
[DEBUG 2018-07-16 16:47:37 main] /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/transactions.rb:381:in `with_transaction_returning_status'
[DEBUG 2018-07-16 16:47:37 main] /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/transactions.rb:313:in `save!'
[DEBUG 2018-07-16 16:47:37 main] /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/suppressor.rb:46:in `save!'
[DEBUG 2018-07-16 16:47:37 main] /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/persistence.rb:51:in `create!'
[DEBUG 2018-07-16 16:47:37 main] /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.6.0/app/models/katello/glue/candlepin/product.rb:73:in `block in import_product_content'
[DEBUG 2018-07-16 16:47:37 main] /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.6.0/app/models/katello/glue/candlepin/product.rb:52:in `each'
[DEBUG 2018-07-16 16:47:37 main] /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.6.0/app/models/katello/glue/candlepin/product.rb:52:in `import_product_content'
[DEBUG 2018-07-16 16:47:37 main] /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.6.0/app/models/katello/content.rb:18:in `block (2 levels) in import_all'
[DEBUG 2018-07-16 16:47:37 main] /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/relation/delegation.rb:39:in `each'
[DEBUG 2018-07-16 16:47:37 main] /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/relation/delegation.rb:39:in `each'
[DEBUG 2018-07-16 16:47:37 main] /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.6.0/app/models/katello/content.rb:12:in `block in import_all'
[DEBUG 2018-07-16 16:47:37 main] /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/relation/delegation.rb:39:in `each'
[DEBUG 2018-07-16 16:47:37 main] /opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activerecord-5.1.4/lib/active_record/relation/delegation.rb:39:in `each'
[DEBUG 2018-07-16 16:47:37 main] /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.6.0/app/models/katello/content.rb:11:in `import_all'
[DEBUG 2018-07-16 16:47:37 main] /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.6.0/lib/katello/tasks/upgrades/3.6/import_product_content.rake:8:in `block (4 levels) in <top (required)>'
[DEBUG 2018-07-16 16:47:37 main] /opt/rh/rh-ruby24/root/usr/share/gems/gems/rake-12.0.0/exe/rake:27:in `<top (required)>'
[DEBUG 2018-07-16 16:47:37 main] Tasks: TOP => katello:upgrades:3.6:import_product_content
[DEBUG 2018-07-16 16:47:37 main] (See full trace by running task with --trace)