Bug #34455
closedUpgrade to 4.1- 4.3 fails migration step with error "undefined local variable or method `type' for #<Katello::CdnConfiguration:0x00000000153c6198>"
Description
Description of problem:
Upgrade to Red Hat Satellite 7.0 fails at db:seed step with error "undefined local variable or method `type' for #<Katello::CdnConfiguration:0x00000000153c6198>"
Version-Release number of selected component (if applicable):
satellite-7.0
How reproducible:
100%
Steps to Reproduce:
Upgrading satellite from 6.10.2 to 7.0 fails executing [foreman-rake-db:migrate] with exception:-
Actual results:
[ERROR ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: change from 'notrun' to ['0'] failed: '/usr/sbin/foreman-rake db:migrate' returned 1 instead of one of [0]
Expected results:
During the upgrade foreman-rake-db:migrate should execute successfully.
Additional info:Caused by
- /usr/sbin/foreman-rake db:migrate --trace
'ErbParser' is ignored.
'RubyParser' is ignored.- Invoke db:migrate (first_time)
- Invoke db:load_config (first_time)
- Invoke environment (first_time)
- Execute environment
API controllers newer than Apipie cache! Run apipie:cache rake task to regenerate cache. - Execute db:load_config
- Invoke plugin:refresh_migrations (first_time)
- Invoke environment
- Execute plugin:refresh_migrations
- Execute db:migrate
20211019192121 CreateCdnConfiguration: migrating =========================
-- create_table(:katello_cdn_configurations)
> 0.0053sadd_foreign_key(:katello_cdn_configurations, :taxonomies, {:name=>"katello_cdn_configurations_organization_id", :column=>:organization_id})
-
> 0.0017sadd_foreign_key(:katello_cdn_configurations, :katello_content_credentials, {:name=>"katello_cdn_configurations_ssl_ca_credential_id", :column=>:ssl_ca_credential_id})
-
-> 0.0011s
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
undefined local variable or method `type' for #<Katello::CdnConfiguration:0x00000000153c6198>
/opt/theforeman/tfm/root/usr/share/gems/gems/activemodel-6.0.3.7/lib/active_model/attribute_methods.rb:432:in `method_missing'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.0.2/app/models/katello/cdn_configuration.rb:40:in `upstream_server?'
/opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.0.2/app/models/katello/cdn_configuration.rb:46:in `reset_fields'
Updated by The Foreman Bot about 3 years ago
- Status changed from New to Ready For Testing
- Assignee set to Partha Aji
- Pull request https://github.com/Katello/katello/pull/9953 added
Updated by Jonathon Turel about 3 years ago
- Target version changed from Katello 4.4.0 to Katello 4.3.2
- Triaged changed from No to Yes
Updated by The Foreman Bot about 3 years ago
- Fixed in Releases Katello 4.5.0 added
Updated by Partha Aji about 3 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|274acc476bc65225e98d7725e8ad0216a06fa99c.
Updated by The Foreman Bot about 3 years ago
- Pull request https://github.com/Katello/katello/pull/9960 added
Updated by Chris Roberts about 3 years ago
- Target version changed from Katello 4.3.2 to Katello 4.3.1