Katello upgrade 3.4 --> 3.5

Hi all,

I’m having an issue with the upgrade process from Katello 3.4 to Katello 3.5.
My installations runs on CentOS 7.4.x + latest updates.

I tried to upgrade the installation with following commands:

  foreman-rake katello:upgrade_check
  katello-service stop
  yum -y update
  yum update -y http://fedorapeople.org/groups/katello/releases/yum/3.5/katello/el7/x86_64/katello-repos-latest.rpm
  yum update -y http://yum.theforeman.org/releases/1.16/el7/x86_64/foreman-release.rpm
  yum update -y foreman-release-scl
  yum clean all
  yum -y update
  foreman-installer --scenario katello --upgrade

https://theforeman.org/plugins/katello/3.5/upgrade/index.html

But the upgrade process stops with the failure:

Upgrade Step: migrate_foreman…
/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
API controllers newer than Apipie cache! Run apipie:cache rake task to regenerate cache.
rake aborted!
TypeError: no implicit conversion of nil into String
.
.
.

Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
foreman-rake db:migrate failed! Check the output for error!
Upgrade step migrate_foreman failed. Check logs for more information.

I think the sub task “apipie cache” ist the main problem. When I try to start the task manually, I got the same error message.

foreman-rake apipie:cache --trace
/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
** Invoke apipie:cache (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
TypeError: no implicit conversion of nil into String
/usr/share/foreman/config/initializers/assets.rb:73:in join' /usr/share/foreman/config/initializers/assets.rb:73:inblock (4 levels) in <top (required)>’
/usr/share/foreman/config/initializers/assets.rb:72:in map' /usr/share/foreman/config/initializers/assets.rb:72:inblock (3 levels) in <top (required)>’
/usr/share/foreman/config/initializers/assets.rb:69:in each' /usr/share/foreman/config/initializers/assets.rb:69:inblock (2 levels) in <top (required)>’
.
.
.
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/task.rb:165:in invoke' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:150:ininvoke_task’
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:in block (2 levels) in top_level' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:ineach’
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:106:in block in top_level' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:115:inrun_with_threads’
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:100:in top_level' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:78:inblock in run’
/opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:176:in standard_exception_handling' /opt/rh/rh-ruby22/root/usr/share/gems/gems/rake-10.4.2/lib/rake/application.rb:75:inrun’
/opt/rh/rh-ruby22/root/usr/bin/rake:33:in `'
Tasks: TOP => apipie:cache => environment

What can I do to find the problem? I created a virtual machine snapshot befor the upgrade. To get back to version 3.4 for an retry is no problem.

Thanks!
cnu80

I just tried this on a fresh install of 3.5/1.16, and couldn’t reproduce it. It might be a plugin that’s installed. Could you give us the output from rpm -qa | grep 'katello\|foreman\|tfm'?

I’ll second that it’s a plugin, I saw the same error on config/initializers/assets.rb:73 in this topic

rpm -qa | grep 'katello|foreman|tfm’
tfm-rubygem-get_process_mem-0.2.1-1.el7.noarch
tfm-rubygem-fog-json-1.0.2-4.el7.noarch
tfm-rubygem-foreman-tasks-core-0.2.0-1.fm1_16.el7.noarch
tfm-rubygem-rails-i18n-4.0.9-1.el7.noarch
katello-debug-3.5.0-2.el7.noarch
tfm-rubygem-rest-client-2.0.1-1.el7.noarch
tfm-rubygem-domain_name-0.5.20160310-1.el7.noarch
tfm-rubygem-sprockets-rails-3.2.0-1.el7.noarch
tfm-rubygem-pg-0.15.1-3.el7.x86_64
tfm-rubygem-katello-3.5.0.1-1.el7.noarch
foreman-installer-katello-3.5.0-3.el7.noarch
tfm-rubygem-hammer_cli_foreman_bootdisk-0.1.3-5.el7.noarch
katello-server-ca-1.0-1.noarch
tfm-rubygem-passenger-native-libs-4.0.18-9.11.el7.x86_64
katello-certs-tools-2.4.0-1.el7.noarch
tfm-rubygem-rabl-0.12.0-2.el7.noarch
tfm-rubygem-ruby2ruby-2.1.3-4.el7.noarch
tfm-rubygem-webpack-rails-0.9.8-1.el7.noarch
tfm-rubygem-hashie-2.0.5-4.el7.noarch
tfm-rubygem-audited-4.4.1-1.el7.noarch
tfm-rubygem-trollop-2.1.2-1.el7.noarch
tfm-rubygem-fog-aws-1.3.0-1.el7.noarch
tfm-rubygem-roadie-3.2.1-1.el7.noarch
tfm-rubygem-wicked-1.1.0-4.el7.noarch
tfm-rubygem-hammer_cli_katello-0.11.4-1.el7.noarch
tfm-rubygem-robotex-1.0.0-19.el7.noarch
tfm-rubygem-foreman-tasks-0.10.0-2.fm1_16.el7.noarch
tfm-rubygem-foreman_discovery-10.0.0-1.fm1_16.el7.noarch
tfm-rubygem-ruby_parser-3.6.3-4.el7.noarch
tfm-rubygem-algebrick-0.7.3-4.el7.noarch
tfm-rubygem-scoped_search-4.1.2-1.el7.noarch
tfm-rubygem-fog-core-1.45.0-1.el7.noarch
tfm-rubygem-fog-rackspace-0.1.4-1.el7.noarch
katello-service-3.5.0-2.el7.noarch
tfm-rubygem-net-ping-2.0.1-1.el7.noarch
tfm-rubygem-dynflow-0.8.30-1.fm1_15.el7.noarch
tfm-rubygem-net-scp-1.2.1-1.el7.noarch
foreman-compute-1.16.0-1.el7.noarch
foreman-installer-1.16.0-1.el7.noarch
xxx-local-foreman-proxy-1.0-1.noarch
tfm-rubygem-foreman_default_hostgroup-4.0.0-1.fm1_13.el7.noarch
tfm-rubygem-gettext_i18n_rails-1.2.1-3.el7.noarch
tfm-rubygem-docker-api-1.28.0-2.el7.noarch
tfm-rubygem-secure_headers-3.4.1-1.el7.noarch
tfm-rubygem-deacon-1.0.0-1.el7.noarch
tfm-rubygem-unicode-display_width-1.0.5-1.el7.noarch
foreman-debug-1.16.0-1.el7.noarch
tfm-rubygem-excon-0.58.0-1.el7.noarch
tfm-rubygem-fog-xenserver-0.2.3-1.el7.noarch
tfm-rubygem-fast_gettext-1.4.1-1.el7.noarch
tfm-rubygem-parse-cron-0.1.4-2.fm1_11.el7.noarch
tfm-rubygem-x-editable-rails-1.5.5-1.el7.noarch
tfm-rubygem-fog-1.41.0-2.el7.noarch
tfm-rubygem-addressable-2.3.6-4.el7.noarch
tfm-rubygem-friendly_id-5.1.0-3.el7.noarch
tfm-rubygem-rainbow-2.2.1-1.el7.noarch
tfm-rubygem-unf-0.1.3-5.el7.noarch
foreman-release-scl-3-1.el7.noarch
tfm-rubygem-oauth-0.5.1-1.el7.noarch
tfm-rubygem-net-ldap-0.15.0-1.el7.noarch
tfm-rubygem-angular-rails-templates-1.0.2-1.el7.noarch
katello-selinux-3.0.2-1.el7.noarch
pulp-katello-1.0.2-1.el7.noarch
tfm-rubygem-safemode-1.3.2-1.el7.noarch
tfm-rubygem-deep_cloneable-2.2.2-1.el7.noarch
tfm-rubygem-useragent-0.16.8-1.el7.noarch
tfm-rubygem-apipie-params-0.0.5-1.el7.noarch
tfm-rubygem-powerbar-1.0.17-1.el7.noarch
tfm-rubygem-hammer_cli_foreman-0.11.0-1.el7.noarch
tfm-rubygem-facter-2.4.0-4.el7.x86_64
tfm-rubygem-apipie-bindings-0.2.0-1.el7.noarch
tfm-rubygem-ancestry-3.0.0-1.el7.noarch
tfm-rubygem-will_paginate-3.1.5-1.el7.noarch
foreman-postgresql-1.16.0-1.el7.noarch
tfm-rubygem-activerecord-session_store-0.1.2-2.el7.noarch
katello-common-3.5.0-2.el7.noarch
foreman-selinux-1.16.0-1.el7.noarch
tfm-rubygem-clamp-1.0.0-5.el7.noarch
katello-3.5.0-2.el7.noarch
foreman-cli-1.16.0-1.el7.noarch
tfm-rubygem-hammer_cli_import-0.11.3-1.el7.noarch
katello-default-ca-1.0-1.noarch
xxx-foreman-proxy-client-1.0-1.noarch
tfm-rubygem-passenger-4.0.18-9.11.el7.x86_64
foreman-release-1.16.0-1.el7.noarch
tfm-rubygem-bundler_ext-0.4.1-1.el7.noarch
tfm-rubygem-apipie-rails-0.5.4-1.el7.noarch
tfm-rubygem-fog-google-0.1.0-2.el7.noarch
tfm-rubygem-daemons-1.2.3-3.el7.noarch
tfm-rubygem-fog-digitalocean-0.3.0-1.el7.noarch
tfm-rubygem-css_parser-1.4.7-1.el7.noarch
tfm-rubygem-deface-1.2.0-1.el7.noarch
tfm-rubygem-runcible-2.5.0-1.el7.noarch
tfm-rubygem-bastion-6.1.5-1.fm1_16.el7.noarch
foreman-proxy-1.16.0-1.el7.noarch
tfm-rubygem-locale-2.0.9-11.el7.noarch
foreman-vmware-1.16.0-1.el7.noarch
tfm-rubygem-sequel-4.20.0-5.el7.noarch
tfm-rubygem-highline-1.7.8-2.el7.noarch
tfm-rubygem-sshkey-1.9.0-1.el7.noarch
tfm-rubygem-awesome_print-1.7.0-1.el7.noarch
tfm-runtime-3.2-10.el7.x86_64
tfm-rubygem-fog-xml-0.1.2-4.el7.noarch
tfm-rubygem-fog-vsphere-1.9.2-1.el7.noarch
tfm-rubygem-rack-jsonp-1.3.1-5.el7.noarch
tfm-rubygem-qpid_messaging-0.34.1-1.el7.x86_64
tfm-rubygem-concurrent-ruby-edge-0.2.3-1.fm1_15.el7.noarch
tfm-rubygem-netrc-0.11.0-1.el7.noarch
tfm-rubygem-http-cookie-1.0.2-1.el7.noarch
tfm-rubygem-ldap_fluff-0.4.7-1.el7.noarch
tfm-rubygem-validates_lengths_from_database-0.5.0-3.el7.noarch
tfm-rubygem-foreman_docker-3.2.1-1.fm1_16.el7.noarch
katello-installer-base-3.5.0-3.el7.noarch
tfm-rubygem-hammer_cli_foreman_docker-0.0.4-2.el7.noarch
tfm-rubygem-concurrent-ruby-1.0.3-1.fm1_16.el7.noarch
katello-client-bootstrap-1.4.0-2.el7.noarch
tfm-rubygem-passenger-native-4.0.18-9.11.el7.x86_64
tfm-rubygem-sexp_processor-4.4.4-3.el7.noarch
tfm-rubygem-net-ssh-4.0.1-2.el7.noarch
tfm-rubygem-logging-1.8.2-4.el7.noarch
tfm-rubygem-formatador-0.2.1-9.el7.noarch
tfm-rubygem-hammer_cli-0.11.0-1.el7.noarch
tfm-rubygem-fog-openstack-0.1.18-1.el7.noarch
tfm-rubygem-foreman_ansible_core-1.1.1-1.fm1_16.el7.noarch
tfm-rubygem-rbvmomi-1.10.0-1.el7.noarch
tfm-rubygem-roadie-rails-1.1.1-1.el7.noarch
tfm-rubygem-hammer_cli_foreman_tasks-0.0.12-1.fm1_16.el7.noarch
tfm-rubygem-unf_ext-0.0.6-6.el7.x86_64
foreman-1.16.0-1.el7.noarch
tfm-rubygem-anemone-0.7.2-14.el7.noarch
tfm-rubygem-foreman_ansible-1.4.5-1.fm1_16.el7.noarch
xxx.local-foreman-client-1.0-1.noarch
tfm-rubygem-ipaddress-0.8.0-9.el7.noarch
tfm-rubygem-little-plugger-1.1.3-21.el7.noarch
tfm-rubygem-responders-2.3.0-1.el7.noarch
katello-repos-3.5.0-3.el7.noarch

thanks for the tip. I removed the package:

rpm -e tfm-rubygem-foreman_default_hostgroup-4.0.0-1.fm1_13.el7.noarch

and the upgrade finished successfully. Is it safe to reinstall the package again? Do I need a

foreman-installer --scenario katello --upgrade

after the installation from the package?

No, the plugin is broken on 1.16 at the moment. I’ll let @akofink reply to the other question :wink:

It should be safe to run with --no-enable-foreman-plugin-default-hostgroup.

I reverted the snapshot and upgraded my installation with following steps successfully:

foreman-rake katello:upgrade_check
foreman-installer --no-enable-foreman-plugin-ansible
katello-service stop
yum -y update
yum update -y http://fedorapeople.org/groups/katello/releases/yum/3.5/katello/el7/x86_64/katello-repos-latest.rpm
yum update -y http://yum.theforeman.org/releases/1.16/el7/x86_64/foreman-release.rpm
yum update -y foreman-release-scl
yum clean all
yum -y update
foreman-installer --scenario katello --upgrade

Wating for the patch :slight_smile: thanks for your help.

1 Like