Hello Foreman users group, Since we have finally migrated to Puppet 4.x and using PuppetDB, the idea was to migrate Foreman also to PostgreSQL. (No need of maintaining two database engines...)
We are using - RHEL 7.4 - Apache 2.4.6 - tfm-rubygem-passenger 4.0.18 - Foreman 1.15.3 - MariaDB-server 5.5.57 The PostgreSQL Server will be version 9.6. Installed plugins: - foreman-tasks 0.9.4 - foreman_bootdisk 9.0.0 - foreman_column_view 0.3.0 - foreman_dhcp_browser 0.0.7 - foreman_hooks 0.3.14 - foreman_host_rundeck 0.0.2 - foreman_remote_execution As mentioned in the foreman manual https://theforeman.org/manuals/1.7/index.html#3.5.3DatabaseSetup I did the db:migrate rake jobs before with no errors. Then with the db:convert:prod2dev job it fails as follows: # sudo -u foreman foreman-rake db:convert:prod2dev Converting architectures...2 records converted in 0.178646509 seconds Converting architectures_operatingsystems...19 records converted in 0.088987529 seconds Converting audits...24564 records converted in 56.453044237 seconds Converting auth_sources...3 records converted in 0.072683469 seconds Converting bookmarks...21 records converted in 0.07774297 seconds Converting cached_user_roles...19 records converted in 0.084811898 seconds Converting cached_usergroup_members...0 records converted in 0.026931147 seconds Converting compute_attributes...0 records converted in 0.027880435 seconds Converting compute_profiles...3 records converted in 0.04463056 seconds Converting compute_resources...0 records converted in 0.029843908 seconds Converting config_group_classes...2 records converted in 0.038978174 seconds Converting config_groups...1 records converted in 0.032271469 seconds Converting domains...1 records converted in 0.039578378 seconds Converting dynflow_coordinator_records...rake aborted! NoMethodError: undefined method `fetch_value' for nil:NilClass /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/attribute_methods/read.rb:93:in `_read_attribute' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/attribute_methods.rb:50:in `__temp__36c6163737' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/core.rb:302:in `init_with' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/persistence.rb:69:in `instantiate' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/querying.rb:50:in `block (2 levels) in find_by_sql' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/result.rb:51:in `block in each' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/result.rb:51:in `each' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/result.rb:51:in `each' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/querying.rb:50:in `map' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/querying.rb:50:in `block in find_by_sql' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activesupport-4.2.5.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/querying.rb:49:in `find_by_sql' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/relation.rb:639:in `exec_queries' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/relation.rb:515:in `load' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/relation.rb:243:in `to_a' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/relation/delegation.rb:46:in `each' /usr/share/foreman/lib/tasks/convert.rake:125:in `block (5 levels) in <top (required)>' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `block in transaction' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/abstract/transaction.rb:184:in `within_new_transaction' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in `transaction' /opt/rh/sclo-ror42/root/usr/share/gems/gems/activerecord-4.2.5.1/lib/active_record/transactions.rb:220:in `transaction' /usr/share/foreman/lib/tasks/convert.rake:124:in `block (4 levels) in <top (required)>' /usr/share/foreman/lib/tasks/convert.rake:83:in `each' /usr/share/foreman/lib/tasks/convert.rake:83:in `block (3 levels) in <top (required)>' Tasks: TOP => db:convert:prod2dev (See full trace by running task with --trace) Is there anything I can do to get the foreman database running on PostgreSQL? On the other hand, we do not use the remote execution plugin, but we haven't been successful in removing it... Any advice is welcome! Thanks, Adrian -- You received this message because you are subscribed to the Google Groups "Foreman users" group. To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscr...@googlegroups.com. To post to this group, send email to foreman-users@googlegroups.com. Visit this group at https://groups.google.com/group/foreman-users. For more options, visit https://groups.google.com/d/optout.