Bug 993028 - SAM Upgrade : Upgrade failed from sam1.2.1 to sam1.3
SAM Upgrade : Upgrade failed from sam1.2.1 to sam1.3
Status: CLOSED ERRATA
Product: Subscription Asset Manager
Classification: Red Hat
Component: katello (Show other bugs)
1.3
x86_64 Linux
medium Severity urgent
: rc
: ---
Assigned To: Tom McKay
Tazim Kolhar
:
: 987696 (view as bug list)
Depends On:
Blocks: sam13-tracker 983647
  Show dependency treegraph
 
Reported: 2013-08-05 08:55 EDT by Tazim Kolhar
Modified: 2016-04-25 20:55 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-01 07:16:31 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
katello-debug (65.34 KB, application/gzip)
2013-08-05 08:56 EDT, Tazim Kolhar
no flags Details
katello_upgrade log (124.05 KB, text/plain)
2013-08-05 11:03 EDT, Tazim Kolhar
no flags Details
katello-upgrade error (38.81 KB, text/plain)
2013-08-16 09:55 EDT, sthirugn@redhat.com
no flags Details

  None (edit)
Description Tazim Kolhar 2013-08-05 08:55:35 EDT
Description of problem:
Upgrade failed from sam1.2.1 to sam1.3

Version-Release number of selected component (if applicable):
Before Upgrade :
sam version was 1.2.1

After Upgrade version 
# rpm -qa | grep katello
katello-configure-1.4.4-2.el6sat.noarch
katello-headpin-1.4.3-5.el6sam_splice.noarch
katello-cli-1.4.3-4.el6sat.noarch
signo-katello-0.0.10-2.el6sat.noarch
katello-cli-common-1.4.3-4.el6sat.noarch
katello-glue-candlepin-1.4.3-5.el6sam_splice.noarch
katello-selinux-1.4.4-2.el6sat.noarch
katello-headpin-all-1.4.3-5.el6sam_splice.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-common-1.4.3-5.el6sam_splice.noarch
katello-certs-tools-1.4.2-2.el6sat.noarch
katello-glue-elasticsearch-1.4.3-5.el6sam_splice.noarch


How reproducible:
# yum install -y katello-headpin-all
# katello-configure --deployment=sam --user-pass=*****

Steps to Reproduce:
1.Stop all services
  # katello-service stop

2.Run the upgrade
# yum clean all
# yum upgrade -y

3.Use katello-upgrade to run necessary migrations
  # katello-upgrade --dryrun -y 

4.# katello-service status
     tomcat6 is stopped[  OK  ]
     httpd is stopped
     thumbslug is stopped
     elasticsearch is stopped
     katello is not running.
     delayed_job is not running.
     delayed_job_monitor is not running.

5.# headpin -u admin -p admin ping
   Service unavailable or restarting, try later



Actual results:
Unable to access the sam server
The commands are not working

Expected results:
All necessary services are up
The commands are working as expected

Additional info:
katello-debug attached
Comment 1 Tazim Kolhar 2013-08-05 08:56:50 EDT
Created attachment 782823 [details]
katello-debug
Comment 2 Tazim Kolhar 2013-08-05 11:03:36 EDT
Created attachment 782871 [details]
katello_upgrade log

The details of 
# katello-upgrade -y
Starting step Reconfigure with katello-configure
Successfuly finished step: Reconfigure with katello-configure
------------------------------------------------------------------------------------------------------------------------------------------------------
Step:        Migrate Katello database (8/12)
Runs:        always
Description: This step calls rake db:migrate target to update Katello database schema in the postgresql to the latest version.

Starting step Migrate Katello database
/opt/rh/ruby193/root/usr/share/rubygems/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate
rake aborted!
An error has occurred, this and all later migrations canceled:

undefined method `default_info' for #<Organization:0x0000000550c8c8>
/opt/rh/ruby193/root/usr/share/gems/gems/activemodel-3.2.8/lib/active_model/attribute_methods.rb:407:in `method_missing'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/attribute_methods.rb:149:in `method_missing'
/usr/share/katello/app/models/organization.rb:136:in `initialize_default_info'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `_run__806460587647485794__initialize__4283016734914203782__callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:405:in `__run_callback'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:385:in `_run_initialize_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/base.rb:524:in `init_with'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/inheritance.rb:68:in `instantiate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/querying.rb:38:in `block (2 levels) in find_by_sql'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/querying.rb:38:in `collect!'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/querying.rb:38:in `block in find_by_sql'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/explain.rb:40:in `logging_query_plan'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/querying.rb:37:in `find_by_sql'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:171:in `exec_queries'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:160:in `block in to_a'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/explain.rb:40:in `logging_query_plan'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation.rb:159:in `to_a'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation/finder_methods.rb:378:in `find_first'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/relation/finder_methods.rb:122:in `first'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/associations/singular_association.rb:42:in `find_target'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/associations/association.rb:145:in `load_target'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/associations/association.rb:55:in `reload'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/associations/singular_association.rb:9:in `reader'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/associations/builder/association.rb:44:in `block in define_readers'
/usr/share/katello/db/migrate/20121112144229_repository_add_content_view.rb:12:in `block in up'
/usr/share/katello/db/migrate/20121112144229_repository_add_content_view.rb:10:in `each'
/usr/share/katello/db/migrate/20121112144229_repository_add_content_view.rb:10:in `up'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:370:in `up'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:410:in `block (2 levels) in migrate'
/opt/rh/ruby193/root/usr/share/ruby/benchmark.rb:280:in `measure'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:410:in `block in migrate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/connection_pool.rb:123:in `with_connection'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:389:in `migrate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:528:in `migrate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:720:in `block (2 levels) in migrate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:775:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:775:in `block in ddl_transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/transactions.rb:208:in `transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:775:in `ddl_transaction'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:719:in `block in migrate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:700:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:700:in `migrate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:570:in `up'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/migration.rb:551:in `migrate'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/railties/databases.rake:153:in `block (2 levels) in <top (required)>'
/opt/rh/ruby193/root/usr/share/gems/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `call'
/opt/rh/ruby193/root/usr/share/gems/gems/rake-0.9.2.2/lib/rake/task.rb:205:in `block in execute'
/opt/rh/ruby193/root/usr/share/gems/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/rake-0.9.2.2/lib/rake/task.rb:200:in `execute'
/opt/rh/ruby193/root/usr/share/gems/gems/rake-0.9.2.2/lib/rake/task.rb:158:in `block in invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/ruby/monitor.rb:211:in `mon_synchronize'
/opt/rh/ruby193/root/usr/share/gems/gems/rake-0.9.2.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/opt/rh/ruby193/root/usr/share/gems/gems/rake-0.9.2.2/lib/rake/task.rb:144:in `invoke'
/opt/rh/ruby193/root/usr/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:116:in `invoke_task'
/opt/rh/ruby193/root/usr/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block (2 levels) in top_level'
/opt/rh/ruby193/root/usr/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:94:in `block in top_level'
/opt/rh/ruby193/root/usr/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/opt/rh/ruby193/root/usr/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:88:in `top_level'
/opt/rh/ruby193/root/usr/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:66:in `block in run'
/opt/rh/ruby193/root/usr/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:133:in `standard_exception_handling'
/opt/rh/ruby193/root/usr/share/gems/gems/rake-0.9.2.2/lib/rake/application.rb:63:in `run'
/opt/rh/ruby193/root/usr/share/gems/gems/rake-0.9.2.2/bin/rake:33:in `<top (required)>'
/opt/rh/ruby193/root/usr/bin/rake:23:in `load'
/opt/rh/ruby193/root/usr/bin/rake:23:in `<main>'
caused by: (NoMethodError) undefined method `default_info' for #<Organization:0x0000000550c8c8>
    ... skipped 67 lines
Tasks: TOP => db:migrate
==  RepositoryAddContentView: migrating =======================================
-- add_column(:repositories, :content_view_version_id, :integer, {:null=>true})
   -> 0.0009s
-- add_index(:repositories, :content_view_version_id)
   -> 0.0070s
Upgrade script did not return zero, investigate, stop services and re-run upgrade.
More info in /var/log/katello/katello_upgrade.log
Comment 3 sthirugn@redhat.com 2013-08-15 18:04:10 EDT
This failed for the same reason as https://bugzilla.redhat.com/show_bug.cgi?id=983647#c6
Comment 4 sthirugn@redhat.com 2013-08-16 09:54:25 EDT
Upgrade still fails. More info attached.

Packages tested:
* candlepin-0.8.20-1.el6sam.noarch
* candlepin-scl-1-5.el6_4.noarch
* candlepin-scl-quartz-2.1.5-5.el6_4.noarch
* candlepin-scl-rhino-1.7R3-1.el6_4.noarch
* candlepin-scl-runtime-1-5.el6_4.noarch
* candlepin-selinux-0.8.20-1.el6sam.noarch
* candlepin-tomcat6-0.8.20-1.el6sam.noarch
* elasticsearch-0.19.9-8.el6sat.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.4.2-2.el6sat.noarch
* katello-cli-1.4.3-7.el6sat.noarch
* katello-cli-common-1.4.3-7.el6sat.noarch
* katello-common-1.4.3-8.el6sam_splice.noarch
* katello-configure-1.4.4-2.el6sat.noarch
* katello-glue-candlepin-1.4.3-8.el6sam_splice.noarch
* katello-glue-elasticsearch-1.4.3-8.el6sam_splice.noarch
* katello-headpin-1.4.3-8.el6sam_splice.noarch
* katello-headpin-all-1.4.3-8.el6sam_splice.noarch
* katello-selinux-1.4.4-2.el6sat.noarch
* thumbslug-0.0.32-1.el6sam.noarch
* thumbslug-selinux-0.0.32-1.el6sam.noarch
Comment 5 sthirugn@redhat.com 2013-08-16 09:55:08 EDT
Created attachment 787269 [details]
katello-upgrade error
Comment 7 Tom McKay 2013-08-19 11:07:19 EDT
*** Bug 987696 has been marked as a duplicate of this bug. ***
Comment 8 sthirugn@redhat.com 2013-08-19 11:57:27 EDT
VERIFIED. The error mentioned here "undefined method `default_info' for #<Organization:0x0000000550c8c8>" is not happening anymore. I will create a new BZ for my new error in Comment 5


Packages tested:
* candlepin-0.8.20-1.el6sam.noarch
* candlepin-scl-1-5.el6_4.noarch
* candlepin-scl-quartz-2.1.5-5.el6_4.noarch
* candlepin-scl-rhino-1.7R3-1.el6_4.noarch
* candlepin-scl-runtime-1-5.el6_4.noarch
* candlepin-selinux-0.8.20-1.el6sam.noarch
* candlepin-tomcat6-0.8.20-1.el6sam.noarch
* elasticsearch-0.19.9-8.el6sat.noarch
* katello-candlepin-cert-key-pair-1.0-1.noarch
* katello-certs-tools-1.4.2-2.el6sat.noarch
* katello-cli-1.4.3-7.el6sat.noarch
* katello-cli-common-1.4.3-7.el6sat.noarch
* katello-common-1.4.3-8.el6sam_splice.noarch
* katello-configure-1.4.4-2.el6sat.noarch
* katello-glue-candlepin-1.4.3-8.el6sam_splice.noarch
* katello-glue-elasticsearch-1.4.3-8.el6sam_splice.noarch
* katello-headpin-1.4.3-8.el6sam_splice.noarch
* katello-headpin-all-1.4.3-8.el6sam_splice.noarch
* katello-selinux-1.4.4-2.el6sat.noarch
* thumbslug-0.0.32-1.el6sam.noarch
* thumbslug-selinux-0.0.32-1.el6sam.noarch
Comment 9 sthirugn@redhat.com 2013-08-19 12:14:05 EDT
FWIW, upgrade is still failing for an other issue which is being tracked under BZ 998631
Comment 11 errata-xmlrpc 2013-10-01 07:16:31 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2013-1390.html

Note You need to log in before you can comment on or make changes to this bug.