Bug 812263 - reset-dbs script stopped working
Summary: reset-dbs script stopped working
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Katello
Classification: Retired
Component: Infrastructure
Version: 1.0
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: ---
: ---
Assignee: Ivan Necas
QA Contact: Garik Khachikyan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-13 09:15 UTC by Garik Khachikyan
Modified: 2015-01-04 21:59 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-17 13:09:35 UTC


Attachments (Terms of Use)
debug logs (339.52 KB, application/x-gzip)
2012-04-13 09:15 UTC, Garik Khachikyan
no flags Details

Description Garik Khachikyan 2012-04-13 09:15:46 UTC
Created attachment 577277 [details]
debug logs

Description of problem:
Recently it's not possible to run katello-reset-dbs script as it failing. It kinda "blocker" as requires on each attempt to do fresh install (+30-40 min each time). If possible to have a quick fix - could I ask to do so?

Version-Release number of selected component (if applicable):
m2crypto-0.21.1.pulp-7.el6.x86_64
pulp-common-1.0.4-1.el6.noarch
qpid-cpp-client-0.12-6.el6.x86_64
katello-glue-foreman-0.2.30-1.git.2.5698081.el6.noarch
pulp-selinux-server-1.0.4-1.el6.noarch
katello-configure-0.2.18-1.git.17.3e78c40.el6.noarch
katello-repos-testing-0.2.1-1.el6.noarch
candlepin-tomcat6-0.5.27-1.el6.noarch
katello-qpid-client-key-pair-1.0-1.noarch
mod_wsgi-3.3-3.pulp.el6.x86_64
python-qpid-0.12-1.el6.noarch
katello-certs-tools-1.1.5-1.git.0.f153109.el6.noarch
katello-glue-candlepin-0.2.30-1.git.2.5698081.el6.noarch
katello-0.2.30-1.git.2.5698081.el6.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-common-0.2.30-1.git.2.5698081.el6.noarch
katello-selinux-0.2.4-1.git.0.b03a73e.el6.noarch
candlepin-0.5.27-1.el6.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
qpid-cpp-server-ssl-0.12-6.el6.x86_64
katello-cli-common-0.2.25-1.git.0.5bc5311.el6.noarch
katello-cli-0.2.25-1.git.0.5bc5311.el6.noarch
python-oauth2-1.5.170-2.pulp.el6.noarch
qpid-cpp-server-0.12-6.el6.x86_64
katello-glue-pulp-0.2.30-1.git.2.5698081.el6.noarch
pulp-1.0.4-1.el6.noarch
katello-repos-0.2.1-1.el6.noarch
qpid-cpp-client-ssl-0.12-6.el6.x86_64
katello-agent-1.0.3-1.git.0.cccd0b4.el6.noarch
katello-cli-tests-0.2.11-1.git.0.23835ef.el6.noarch


How reproducible:
always running script/katello-reset-dbs

Steps to Reproduce:
1. run: echo "yes"|/usr/share/katello/script/katello-reset-dbs
2.
3.
  
Actual results:
exception:
---
(...)
** Invoke db:schema:dump (first_time)
** Invoke environment 
** Execute db:schema:dump
** Execute db:migrate:reset
** Invoke seed_with_logging (first_time)
** Invoke db:seed (first_time)
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment 
** Execute db:abort_if_pending_migrations
** Execute db:seed
rake aborted!
Connection refused - connect(2)
/usr/lib/ruby/1.8/net/http.rb:560:in `initialize'
/usr/lib/ruby/1.8/net/http.rb:560:in `open'
/usr/lib/ruby/1.8/net/http.rb:560:in `connect'
/usr/lib/ruby/1.8/timeout.rb:67:in `timeout'
/usr/lib/ruby/1.8/timeout.rb:101:in `timeout'
/usr/lib/ruby/1.8/net/http.rb:560:in `connect'
/usr/lib/ruby/1.8/net/http.rb:553:in `do_start'
/usr/lib/ruby/1.8/net/http.rb:542:in `start'
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:166:in `transmit'
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:60:in `execute'
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:31:in `execute'
/usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/resource.rb:63:in `post'
/usr/share/katello/lib/http_resource.rb:114:in `post'
/usr/share/katello/lib/resources/candlepin.rb:235:in `create'
/usr/share/katello/app/models/glue/candlepin/owner.rb:45:in `set_owner'
/usr/share/katello/app/models/glue.rb:145:in `send'
/usr/share/katello/app/models/glue.rb:145:in `execute'
/usr/share/katello/app/models/glue.rb:104:in `process'
/usr/share/katello/app/models/glue.rb:100:in `each'
/usr/share/katello/app/models/glue.rb:100:in `process'
/usr/share/katello/app/models/glue.rb:32:in `on_save'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:220:in `_conditional_callback_around_538'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/callbacks.rb:419:in `_run_save_callbacks'
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/callbacks.rb:273:in `create_or_update'
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/persistence.rb:40:in `save'
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/validations.rb:43:in `save'
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/attribute_methods/dirty.rb:21:in `save'
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:240:in `save'
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:292:in `with_transaction_returning_status'
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/connection_adapters/abstract/database_statements.rb:139:in `transaction'
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:207:in `transaction'
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:290:in `with_transaction_returning_status'
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:240:in `save'
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:251:in `rollback_active_record_state!'
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/transactions.rb:239:in `save'
/usr/share/katello/app/models/lazy_accessor.rb:101:in `save'
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/relation/finder_methods.rb:271:in `find_or_instantiator_by_attributes'
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/base.rb:995:in `send'
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/base.rb:995:in `method_missing'
/usr/share/katello/db/seeds.rb:51
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:235:in `load'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:235:in `load'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:227:in `load_dependency'
/usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:235:in `load'
/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.10/lib/active_record/railties/databases.rake:290
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:158:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:176:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:174:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:157:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:176:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:174:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:174:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:157:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:62:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/bin/rake:32
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
Tasks: TOP => setup => seed_with_logging => db:seed
Starting Katello instance
Starting katello: Starting server on 0.0.0.0:5000 ... 
[  OK  ]
Starting Katello jobs instance
Starting katello-jobs: [  OK  ]
DONE. CHECK ALL THE MESSAGES ABOVE!
---

Expected results:
no error. DB-s should be cleaned.

Additional info:
not sure if the katello-debug report would help: attached.

Comment 2 Lukas Zapletal 2012-04-16 14:13:00 UTC
Candlepin cp-setup resets password to "password":

[root@smqe-sat01 ~]# grep password /etc/tomcat6/server.xml
               keystorePass="password"
               truststorePass="password" />

[root@smqe-sat01 ~]# cat /etc/katello/keystore_password-file
1841b169b683ce2665xxxxxx

Workaround: set 1841b169b683ce2665xxxxxx in the /usr/share/candlepin/cpsetup there until we fix that.

Comment 3 Lukas Zapletal 2012-04-16 14:36:58 UTC
Martin told me he has a fix locally, reassigning, thanks!

Comment 4 Martin Bacovsky 2012-04-20 14:21:37 UTC
Merged in katello with hash 233a753. Kudos to Ivan for the fix.

Comment 5 Garik Khachikyan 2012-04-23 09:15:33 UTC
Big kudos!

it's fixed and works with not problem.

The check is done on:
---
m2crypto-0.21.1.pulp-7.el6.x86_64
python-qpid-0.14-7.el6_2.noarch
katello-glue-pulp-0.2.31-1.git.21.efec61a.el6.noarch
candlepin-0.5.27-1.el6.noarch
katello-configure-0.2.18-1.git.17.3e78c40.el6.noarch
katello-repos-testing-0.2.1-1.el6.noarch
candlepin-tomcat6-0.5.27-1.el6.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-cli-common-0.2.30-1.git.0.50dc43d.el6.noarch
mod_wsgi-3.3-3.pulp.el6.x86_64
katello-common-0.2.31-1.git.21.efec61a.el6.noarch
katello-0.2.31-1.git.21.efec61a.el6.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
qpid-cpp-server-0.14-14.el6_2.x86_64
katello-glue-foreman-0.2.31-1.git.21.efec61a.el6.noarch
katello-selinux-0.2.4-1.git.0.b03a73e.el6.noarch
pulp-1.1.3-1.el6.noarch
qpid-cpp-client-ssl-0.14-14.el6_2.x86_64
qpid-cpp-server-ssl-0.14-14.el6_2.x86_64
katello-agent-1.0.3-1.git.0.cccd0b4.el6.noarch
python-oauth2-1.5.170-2.pulp.el6.noarch
katello-certs-tools-1.1.5-1.git.0.f153109.el6.noarch
qpid-cpp-client-0.14-14.el6_2.x86_64
katello-glue-candlepin-0.2.31-1.git.21.efec61a.el6.noarch
pulp-selinux-server-1.1.3-1.el6.noarch
pulp-common-1.1.3-1.el6.noarch
katello-repos-0.2.1-1.el6.noarch
katello-qpid-client-key-pair-1.0-1.noarch
katello-cli-0.2.30-1.git.0.50dc43d.el6.noarch
katello-cli-tests-0.2.12-1.git.0.efcf1ea.el6.noarch
---

Comment 6 Bryan Kearney 2012-07-17 13:09:35 UTC
Moving all community bugs with fixes to closed.


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