Project

General

Profile

Bug #34455

Upgrade to 4.1- 4.3 fails migration step with error "undefined local variable or method `type' for #<Katello::CdnConfiguration:0x00000000153c6198>"

Added by Partha Aji 5 months ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Upgrades
Target version:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

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

  1. /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.0053s
      -
      add_foreign_key(:katello_cdn_configurations, :taxonomies, {:name=>"katello_cdn_configurations_organization_id", :column=>:organization_id})
      > 0.0017s
      -
      add_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'

Associated revisions

Revision 274acc47 (diff)
Added by Partha Aji 5 months ago

Fixes #34455 - Migration error related to cdn configuration (#9953)

History

#1 Updated by The Foreman Bot 5 months ago

  • Assignee set to Partha Aji
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/9953 added

#2 Updated by Partha Aji 5 months ago

  • Bugzilla link set to 2053970

#3 Updated by Jonathon Turel 5 months ago

  • Triaged changed from No to Yes
  • Target version changed from Katello 4.4.0 to Katello 4.3.2

#4 Updated by The Foreman Bot 5 months ago

  • Fixed in Releases Katello 4.5.0 added

#5 Updated by Partha Aji 5 months ago

  • Status changed from Ready For Testing to Closed

#6 Updated by The Foreman Bot 5 months ago

  • Pull request https://github.com/Katello/katello/pull/9960 added

#7 Updated by Chris Roberts 4 months ago

  • Target version changed from Katello 4.3.2 to Katello 4.3.1

Also available in: Atom PDF