Project

General

Profile

Actions

Bug #4353

closed

relation "roles" does not exist during DB migration

Added by Etzion Bar-Noy almost 11 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
DB migrations
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

On the same machine, installation with Postgresql or MySQL succeeds, however, using sqlite fails with the following error:
foreman-installer --foreman-db-type sqlite --foreman-proxy-bmc true --foreman-proxy-dhcp true --foreman-proxy-dhcp-interface eth0 --foreman-proxy-dhcp-range "192.168.11.2 192.168.11.250"

Result:
/Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]: Failed to call refresh: /usr/sbin/foreman-rake db:migrate returned 1 instead of one of [0] at /usr/share/foreman-installer/modules/foreman/manifests/rake.pp:9
/Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: Failed to call refresh: /usr/sbin/foreman-rake db:seed returned 1 instead of one of [0] at /usr/share/foreman-installer/modules/foreman/manifests/rake.pp:9
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[mdw.mgmt]: Could not evaluate: 500 Internal Server Error
Installing Done [100%] [...................................................................]
Something went wrong! Check the log for ERROR-level output
The full log is at /var/log/foreman-installer/foreman-installer.log

Log section:
[DEBUG 2014-02-15 16:00:36 main] Exec[foreman-rake-db:migrate](provider=posix): Executing '/usr/sbin/foreman-rake db:migrate'
[DEBUG 2014-02-15 16:00:36 main] Executing '/usr/sbin/foreman-rake db:migrate'
[ WARN 2014-02-15 16:00:39 main] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: rake aborted!
[ WARN 2014-02-15 16:00:39 main] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: Could not find table 'roles'
[ WARN 2014-02-15 16:00:39 main] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns:
[ WARN 2014-02-15 16:00:39 main] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: Tasks: TOP => db:migrate => environment
[ WARN 2014-02-15 16:00:39 main] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: (See full trace by running task with --trace)
[ERROR 2014-02-15 16:00:39 main] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]: Failed to call refresh: /usr/sbin/foreman-rake db:migrate returned 1 instead of one of [0] at /usr/share/foreman-installer/modules/foreman/manifests/rake.pp:9
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/parameter.rb:165:in `fail'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/type/exec.rb:125:in `sync'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/type/exec.rb:515:in `refresh'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/transaction/event_manager.rb:94:in `send'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/transaction/event_manager.rb:94:in `process_callback'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/transaction/event_manager.rb:20:in `process_events'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/transaction/event_manager.rb:86:in `queued_events'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/transaction/event_manager.rb:85:in `each'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/transaction/event_manager.rb:85:in `queued_events'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/transaction/event_manager.rb:19:in `process_events'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:88:in `eval_resource'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:104:in `evaluate_without_trigger'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:509:in `thinmark'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:508:in `thinmark'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:104:in `evaluate_without_trigger'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:386:in `traverse'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:99:in `evaluate_without_trigger'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/gems/1.8/gems/kafo-0.3.11/modules/kafo_configure/lib/puppet/parser/functions/add_progress.rb:25:in `evaluate'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:141:in `apply'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:122:in `retrieve_and_apply_catalog'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:161:in `benchmark'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:160:in `benchmark'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:121:in `retrieve_and_apply_catalog'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:152:in `run'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/application/apply.rb:229:in `main'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/application/apply.rb:149:in `run_command'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:309:in `run'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:416:in `hook'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:309:in `run'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:407:in `exit_on_fail'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:309:in `run'
[ INFO 2014-02-15 16:00:39 main] /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:69:in `execute'
[ INFO 2014-02-15 16:00:39 main] /usr/bin/puppet:4
[ INFO 2014-02-15 16:00:39 main] RESOURCE Foreman::Rake[db:migrate]
[ INFO 2014-02-15 16:00:39 main] RESOURCE Foreman::Rake[db:seed]
[ INFO 2014-02-15 16:00:39 main] Foreman::Rake[db:seed]: Scheduling refresh of Exec[foreman-rake-db:seed]
[ INFO 2014-02-15 16:00:39 main] RESOURCE Exec[foreman-rake-db:seed]
[DEBUG 2014-02-15 16:00:39 main] Exec[foreman-rake-db:seed](provider=posix): Executing '/usr/sbin/foreman-rake db:seed'
[DEBUG 2014-02-15 16:00:39 main] Executing '/usr/sbin/foreman-rake db:seed'
[ WARN 2014-02-15 16:00:43 main] /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: rake aborted!
[ WARN 2014-02-15 16:00:43 main] /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: Could not find table 'roles'
[ WARN 2014-02-15 16:00:43 main] /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns:
[ WARN 2014-02-15 16:00:43 main] /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: Tasks: TOP => db:abort_if_pending_migrations => environment
[ WARN 2014-02-15 16:00:43 main] /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]/returns: (See full trace by running task with --trace)
[ERROR 2014-02-15 16:00:43 main] /Stage[main]/Foreman::Database/Foreman::Rake[db:seed]/Exec[foreman-rake-db:seed]: Failed to call refresh: /usr/sbin/foreman-rake db:seed returned 1 instead of one of [0] at /usr/share/foreman-installer/modules/foreman/manifests/rake.pp:9
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/parameter.rb:165:in `fail'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/type/exec.rb:125:in `sync'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/type/exec.rb:515:in `refresh'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/transaction/event_manager.rb:94:in `send'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/transaction/event_manager.rb:94:in `process_callback'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/transaction/event_manager.rb:20:in `process_events'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/transaction/event_manager.rb:86:in `queued_events'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/transaction/event_manager.rb:85:in `each'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/transaction/event_manager.rb:85:in `queued_events'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/transaction/event_manager.rb:19:in `process_events'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:88:in `eval_resource'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:104:in `evaluate_without_trigger'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:509:in `thinmark'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:508:in `thinmark'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:104:in `evaluate_without_trigger'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:386:in `traverse'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/transaction.rb:99:in `evaluate_without_trigger'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/gems/1.8/gems/kafo-0.3.11/modules/kafo_configure/lib/puppet/parser/functions/add_progress.rb:25:in `evaluate'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/resource/catalog.rb:141:in `apply'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:122:in `retrieve_and_apply_catalog'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:161:in `benchmark'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/1.8/benchmark.rb:308:in `realtime'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:160:in `benchmark'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:121:in `retrieve_and_apply_catalog'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/configurer.rb:152:in `run'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/application/apply.rb:229:in `main'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/application/apply.rb:149:in `run_command'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:309:in `run'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:416:in `hook'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:309:in `run'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:407:in `exit_on_fail'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:309:in `run'
[ INFO 2014-02-15 16:00:43 main] /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:69:in `execute'
[ INFO 2014-02-15 16:00:43 main] /usr/bin/puppet:4
[ INFO 2014-02-15 16:00:43 main] RESOURCE Foreman::Rake[db:seed]
[ INFO 2014-02-15 16:00:43 main] Class[Foreman::Service]: Scheduling refresh of Service[foreman]
[ INFO 2014-02-15 16:00:43 main] Class[Foreman::Service]: Scheduling refresh of Exec[restart_foreman]
[DEBUG 2014-02-15 16:00:43 main] Service[foreman](provider=redhat): Executing '/sbin/service foreman status'
[DEBUG 2014-02-15 16:00:43 main] Puppet::Type::Service::ProviderRedhat: Executing '/sbin/chkconfig foreman'
[ INFO 2014-02-15 16:00:43 main] RESOURCE Service[foreman]
[DEBUG 2014-02-15 16:00:43 main] Service[foreman](provider=redhat): Executing '/sbin/service foreman status'
[DEBUG 2014-02-15 16:00:43 main] /Stage[main]/Foreman::Service/Service[foreman]: Skipping restart; service is not running
[ WARN 2014-02-15 16:00:43 main] /Stage[main]/Foreman::Service/Service[foreman]: Triggered 'refresh' from 1 events
[DEBUG 2014-02-15 16:00:43 main] /Stage[main]/Foreman::Service/Service[foreman]: The container Class[Foreman::Service] will propagate my refresh event
[ INFO 2014-02-15 16:00:43 main] RESOURCE Exec[restart_foreman]
[DEBUG 2014-02-15 16:00:43 main] Exec[restart_foreman](provider=posix): Executing '/bin/touch /usr/share/foreman/tmp/restart.txt'
[DEBUG 2014-02-15 16:00:43 main] Executing '/bin/touch /usr/share/foreman/tmp/restart.txt'
[ WARN 2014-02-15 16:00:43 main] /Stage[main]/Foreman::Service/Exec[restart_foreman]: Triggered 'refresh' from 1 events
[DEBUG 2014-02-15 16:00:43 main] /Stage[main]/Foreman::Service/Exec[restart_foreman]: The container Class[Foreman::Service] will propagate my refresh event

I saw this problem only when installing with sqlite DB. Other DB types were successful.

System: Centos x86_64 6.5. Foreman:
rpm -qa | grep foreman
rubygem-foreman_api-0.1.11-1.el6.noarch
foreman-cli-1.4.0-1.el6.noarch
foreman-sqlite-1.4.0-1.el6.noarch
foreman-installer-1.4.0-1.el6.noarch
foreman-proxy-1.4.0-1.el6.noarch
rubygem-hammer_cli_foreman-0.0.18-1.el6.noarch
foreman-1.4.0-1.el6.noarch
ruby193-rubygem-foreman_discovery-1.2.0-0.1.rc2.el6.noarch


Related issues 2 (0 open2 closed)

Related to Foreman - Feature #812: cant assign roles to groups, just to usersClosedMarek Hulán03/31/2011Actions
Has duplicate Foreman - Bug #4158: Role definitions in plugins cause "Could not find table 'roles'" error on initial migrationDuplicate01/22/2014Actions
Actions

Also available in: Atom PDF