Project

General

Profile

Actions

Bug #34455

closed

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 about 3 years ago. Updated about 3 years ago.

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

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'

Actions #1

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
Actions #2

Updated by Partha Aji about 3 years ago

  • Bugzilla link set to 2053970
Actions #3

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
Actions #4

Updated by The Foreman Bot about 3 years ago

  • Fixed in Releases Katello 4.5.0 added
Actions #5

Updated by Partha Aji about 3 years ago

  • Status changed from Ready For Testing to Closed
Actions #6

Updated by The Foreman Bot about 3 years ago

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

Updated by Chris Roberts about 3 years ago

  • Target version changed from Katello 4.3.2 to Katello 4.3.1
Actions

Also available in: Atom PDF