Project

General

Profile

Bug #6349

Wrong owner while dropping candlepin db

Added by Adam Ruzicka almost 8 years ago. Updated almost 4 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Installer
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Encountered this error while running rake katello:reset

Dropping candlepin database
  1. ERROR ############
    Error running command: dropdb -U candlepin candlepin
    Status code: 256
    Command output: dropdb: database removal failed: ERROR: must be owner of database candlepin
    Traceback (most recent call last):
    File "/usr/share/candlepin/cpdb", line 240, in <module>
    dbsetup.drop()
    File "/usr/share/candlepin/cpdb", line 166, in drop
    error_out(command, status, output)
    File "/usr/share/candlepin/cpdb", line 46, in error_out
    raise Exception("Error running command")
    Exception: Error running command

... skipped a lot of non-error lines here (db migration) ...

Recreating cache
Elasticsearch Indices cleared.
Seeding /home/vagrant/foreman/db/seeds.d/05-architectures.rb
Seeding /home/vagrant/foreman/db/seeds.d/07-config_templates.rb
Seeding /home/vagrant/foreman/db/seeds.d/08-partition_tables.rb
Seeding /home/vagrant/foreman/db/seeds.d/10-installation_media.rb
Seeding /home/vagrant/foreman/db/seeds.d/11-permissions.rb
Seeding /home/vagrant/foreman/db/seeds.d/11-roles.rb
Seeding /home/vagrant/foreman/db/seeds.d/11-smart_proxy_features.rb
Seeding /home/vagrant/foreman/db/seeds.d/12-auth_sources.rb
Seeding /home/vagrant/foreman/db/seeds.d/13-compute_profiles.rb
Seeding /home/vagrant/foreman/db/seeds.d/15-bookmarks.rb
All seed files executed
rake aborted!
ForemanTasks::TaskError: Task 6d0d2138-c2f8-4cb9-8bb0-c52dcecba0dc: OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/foreman-tasks-0.6.4/app/models/foreman_tasks/concerns/action_triggering.rb:130:in `execute_planned_action'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/foreman-tasks-0.6.4/app/models/foreman_tasks/concerns/action_triggering.rb:107:in `block in dynflow_task_wrap'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/foreman-tasks-0.6.4/app/models/foreman_tasks/concerns/action_triggering.rb:106:in `tap'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/foreman-tasks-0.6.4/app/models/foreman_tasks/concerns/action_triggering.rb:106:in `dynflow_task_wrap'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/foreman-tasks-0.6.4/app/models/foreman_tasks/concerns/action_triggering.rb:26:in `save'
/home/vagrant/katello/app/lib/katello/lazy_accessor.rb:96:in `save'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.18/lib/active_record/relation/finder_methods.rb:297:in `find_or_instantiator_by_attributes'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activerecord-3.2.18/lib/active_record/dynamic_matchers.rb:52:in `method_missing'
/home/vagrant/katello/db/seeds.rb:56:in `<top (required)>'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:245:in `load'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:245:in `block in load'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:236:in `load_dependency'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/activesupport-3.2.18/lib/active_support/dependencies.rb:245:in `load'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.2.18/lib/rails/engine.rb:525:in `load_seed'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/gems/railties-3.2.18/lib/rails/railtie/configurable.rb:30:in `method_missing'
/home/vagrant/katello/lib/katello/engine.rb:136:in `block (2 levels) in <class:Engine>'
/home/vagrant/katello/lib/katello/tasks/setup.rake:58:in `block (2 levels) in <top (required)>'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in `eval'
/home/vagrant/.rvm/gems/ruby-1.9.3-p448/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:seed

Can be fixed by changing
system("sudo /usr/share/candlepin/cpdb --drop --create")
to
system("sudo -u postgres /usr/share/candlepin/cpdb --drop --create -u postgres")
in katello/lib/katello/tasks/setup.rake

History

#1 Updated by Eric Helms almost 8 years ago

  • Status changed from New to Need more information
  • Triaged changed from No to Yes

How long ago did you deploy this development system? This https://github.com/Katello/puppet-katello_devel/commit/b3ce2ee271b1a578ca93e3f5e5abe4085aac1dd8 should have addressed this issue on any development deployments after ~June 2nd.

#2 Updated by Adam Ruzicka almost 8 years ago

For a long time, i set it up in the end of april. Yesterday I fetched upstream sources (it was devel deployment) and got this error

#3 Updated by Eric Helms over 6 years ago

  • Status changed from Need more information to Rejected

If this is still an issue. please re-open

#4 Updated by Eric Helms almost 6 years ago

  • Legacy Backlogs Release (now unused) set to 166

Also available in: Atom PDF