Upgrade fails from 3.8 to 3.10: already initialized constant Foreman::UUID_REGEXP

Problem: Upgrade Step: Running installer Foreman_config_entry[puppetdb_dashboard_address] [80%]

Execution of '/usr/sbin/foreman-rake -- config -k 'puppetdb_dashboard_address' -v 'http://localhost:8080/pdb/dashboard'' returned 1: /usr/share/foreman/lib/foreman.rb:8: warning: already initialized constant Foreman::UUID_REGEXP
/usr/share/foreman/lib/foreman.rb:8: warning: previous definition of UUID_REGEXP was here

After many lines I got:

rake aborted!

Foreman and Proxy versions: 1.19

Distribution and version: 3.8 -> 3.10

Thanks!

This warning is not significant, the actual error should be a bit lower in the log.

I’ve taken a look ahead…

In /var/log/foreman-installer/katello.log (I’ve replaced hostname.example.com for FQDN string):

Execution of '/usr/sbin/foreman-rake -- config -k 'puppetdb_dashboard_address' -v 'http://localhost:8080/pdb/dashboard'' returned 1: /usr/share/foreman/lib/foreman.rb:8: warning: already initialized constant Foreman::UUID_REGEXP
/usr/share/foreman/lib/foreman.rb:8: warning: previous definition of UUID_REGEXP was here

[ERROR 2020-12-23T10:08:28 main] rake aborted!
[ERROR 2020-12-23T10:08:28 main] NoMethodError: undefined method `settings_type' for nil:NilClass
[ERROR 2020-12-23T10:08:28 main] /usr/share/foreman/lib/tasks/config.rake:105:in `block in run_key_values'
[ERROR 2020-12-23T10:08:28 main] /usr/share/foreman/lib/tasks/config.rake:100:in `each'
[ERROR 2020-12-23T10:08:28 main] /usr/share/foreman/lib/tasks/config.rake:100:in `run_key_values'
[ERROR 2020-12-23T10:08:28 main] /usr/share/foreman/lib/tasks/config.rake:77:in `run'
[ERROR 2020-12-23T10:08:28 main] /usr/share/foreman/lib/tasks/config.rake:167:in `block in <top (required)>'
[ERROR 2020-12-23T10:08:28 main] /opt/rh/rh-ruby25/root/usr/share/gems/gems/rake-12.3.0/exe/rake:27:in `<top (required)>'
[ERROR 2020-12-23T10:08:28 main] Tasks: TOP => config
[ERROR 2020-12-23T10:08:28 main] (See full trace by running task with --trace)
[ERROR 2020-12-23T10:08:28 main]  /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[FQDN]: Failed to call refresh: Proxy FQDN cannot
be refreshed: unknown error (response 500)
[ERROR 2020-12-23T10:08:28 main]  /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[FQDN]: Proxy FQDN cannot be refreshed: unknown error (response 500)

Thanks!

This look like https://github.com/theforeman/puppetdb_foreman/issues/15 or New foreman/katello install failed - rake aborted! - probably an issue with the puppetdb plugin, there are instructions in that thread regarding disabling it, once you complete the upgrade to a newer supported version you should be able to restore the plugin (seems like version 5.0 has a fix for this issue, but it is only available starting from Foreman 1.20).

1 Like

I ran:

foreman-installer --scenario katello --upgrade --no-enable-foreman-plugin-puppetdb

After that, I got:

/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[FQDN]: Failed to call refresh: Proxy FQDN cannot be refreshed: unknown error (response 500)
 /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[FQDN]: Proxy FQDN cannot be refreshed: unknown error (response 500)

Thanks,

Iago

It seems that simply not enabling it is not enough to finish the upgrade, the last post on the linked thread points to a couple of other places that you may need to manually remove. You may also have some luck with disabling selinux while upgrading, since it appears that the issue may be caused by an selinux denial.