Dear Foreman users group,
After finally upgrading to Puppet 4 and the corresponding PuppetDB we
thought, it would be nice to have just one database engine.
Our Setup:
RHEL 7.4
Apache 2.4.6
tfm-rubygem-passenger 4.0.18
MariaDB-server 5.5.57
PostgreSQL Server 9.6
Foreman 1.15.3
Puppetserver 2.7.2
Puppet-Agent 1.10.5
PuppetDB 4.4.0
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 1.3.3
Foreman-tasks and remote_execution are installed, but not really used. So
far we had no success to remove them.
Foreman got installed ~3 years ago. Ever since we updated the application
and operating system.
The migration mentioned in the Foreman manual (
https://theforeman.org/manuals/1.7/index.html#3.5.3DatabaseSetup) seems to
be the only way so far to keep the data (Foreman is used a lot for ENC).
The db:migrate jobs are running without error, but the db:convert:prod2dev
job always fails on the dynflow_coordinator_records tableā¦
# 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)
After this, also the db:migrate job fails on the PostgreSQL database.
Is my approach okay? Anything I need to tweak?
Any help would be appreciatedā¦!!
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.