Upgrade from Katello 3.14 to 3.15 fails with facter errors


I’m trying to upgrade Katello 3.14 to a modern version. An upgrade to 3.15, which is the first step on the journey, fails with the following error :

      ' | RUBYLIB=/usr/share/gems/gems/kafo-4.0.1/lib/kafo/../..//modules: /opt/puppetlabs/bin/puppet apply --config=/tmp/kafo_installation20211123-11591-1svqjcd/puppet.conf 2>&1
[ERROR 2021-11-23T14:03:30 main] ESC[1;31mError: Facter: error while resolving custom facts in /opt/puppetlabs/puppet/cache/lib/facter/pip_version.rb: cycle detected while requesting value of fact "is_pe"ESC[0m
ESC[1;31mError: Facter: error while resolving custom facts in /opt/puppetlabs/puppet/cache/lib/facter/python_version.rb: cycle detected while requesting value of fact "is_pe"ESC[0m
/usr/share/foreman-installer/modules/stdlib/lib/facter/pe_version.rb:31: [BUG] Segmentation fault at 0x0000000000000020
ruby 2.4.10p364 (2020-03-31 revision 67879) [x86_64-linux]

The error is similar to Upgrading Katello 3.13.0 to 3.14.1 Error Could not get default values - Support - TheForeman, but there is no RVM installed on this server.

Expected outcome:

A successful upgrade

Foreman and Proxy versions:

foreman.noarch                         2.0.3-1.el7              @foreman        
foreman-installer.noarch               1:2.0.3-1.el7            @foreman        
foreman-installer-katello.noarch       1:2.0.3-1.el7            @foreman        
foreman-proxy.noarch                   2.0.3-1.el7              @foreman        
foreman-release.noarch                 2.0.3-1.el7              @/foreman-release
foreman-release-scl.noarch             7-2.el7                  @foreman        
foreman-selinux.noarch                 2.0.3-1.el7              @foreman        
katello.noarch                         3.15.3-1.el7             @katello        
katello-certs-tools.noarch             2.6.0-1.el7              @foreman        
katello-client-bootstrap.noarch        1.7.5-1.el7              @katello        
katello-common.noarch                  3.15.3-1.el7             @katello        
katello-debug.noarch                   3.15.3-1.el7             @katello        
katello-default-ca.noarch              1.0-1                    installed       
katello-repos.noarch                   3.15.3-1.el7             @/katello-repos-latest
katello-selinux.noarch                 3.1.1-1.el7              installed       
katello-server-ca.noarch               1.0-1                    installed       
katello-service.noarch                 3.14.1-1.el7             @katello        
pulp-katello.noarch                    1.0.3-1.el7              @katello        
pulp-puppet-plugins.noarch             2.21.5-1.el7             @pulp           
pulp-puppet-tools.noarch               2.21.5-1.el7             @pulp           
puppet-agent.x86_64                    5.5.22-1.el7             @puppet5        
puppet-agent-oauth.noarch              0.5.1-3.el7              @foreman        
puppet5-release.noarch                 5.0.0-14.el7             @puppet5        
puppetlabs-release-pc1.noarch          1.1.0-5.el7              @/puppetlabs-release-pc1-el-7.noarch
puppetserver.noarch                    5.3.16-1.el7             @puppet5

Distribution and version:

CentOS Linux release 7.9.2009 (Core)

Other relevant data:

That is an outcome from foreman-installer --scenario katello --upgrade, with the procedure of upgrade roughly :

yum update -y
rpm -e --nodeps python2-qpid-proton
yum -y install python36-qpid-proton
yum update -y
foreman-rake katello:upgrade_check
yum update -y https://fedorapeople.org/groups/katello/releases/yum/3.15/katello/el7/x86_64/katello-repos-latest.rpm
yum update -y https://yum.theforeman.org/releases/2.0/el7/x86_64/foreman-release.rpm
yum update -y foreman-release-scl
yum clean all
yum -y upgrade

I had to remove python2-qpid-proton manually as it was conflicting with some of the updates, likely an issue with one of the dependent packages not listing its upgrades properly in spec file.

Full logs : Apache Paste Bucket

Just to copy what I’ve just said on IRC:

This doesn’t look katello related, more puppet/installer.
Do you intentionally use Puppet 5 and not 6? Foreman 2.0 (Katello 3.15) used Puppet 6 by default. Not saying it shouldn’t work with 5, but the chances with 6 are higher :wink:

cc @installer

1 Like

As discussed via IRC, this is spot on.

The upgrade procedure was missing one step slotted in before last two commands, and that is :
yum erase puppet5-release && yum install http://yum.puppet.com/puppet6-release-el-7.noarch.rpm

The system is so old that there is no longer interactive HTML version of upgrade guiide, and the static PDF has RHEL instructions for repository upgrades that cover the above puppet upgrade too.

As you have mentioned, foreman-installer should as well work with puppet 5, but if there is no requirements for it for any other reason, upgrade to puppet 6 solves the problem.

Thanks for your time.


Cool. Yeah, if you have no hard requirements to remain on 5 and 6 solves the issue for you, that’s the best/easiest path forward!