Upgrade to Foreman 2.1 - Katello 3.16 rc3

After reading another post I got a clearer idea:

It is executing /usr/local/bin/puppet which breaks our de-SCL code. As a workaround, could you try to rename that, run the installer and see if it passes?

@ehelms opened Bug #30365: Puppet bin scripts that exist outside AIO environment as symlinks to AIO puppet bin files break installation in SCL - Kafo - Foreman to track this

Thank you, I have not had a chance to try out the upgrade yet. Should I try it with the patches from your PR, or just remove the symlinks?

If you’d be willing to test the Kafo patch (https://github.com/theforeman/kafo/pull/259) then that’d be greatly appreciated. If it doesn’t, removing the symlinks is a quick workaround. After running the installer, you can place them again.

Unfortunately, the issue persists, even with the patch. I’ll try it with the link removed.

Removing the symlinks also did not work. This is how puppet looks on my system:

#!/bin/sh
    
# We keep around any paths in LD_LIBRARY_PATH that start with /opt/rh/. Those paths are
# from redhat software collections packages and are required for things like SCL python
# to work. See PUP-8351.
STRIP_LDLYP_COMMAND=" \
if ENV['LD_LIBRARY_PATH']; \
  print ENV['LD_LIBRARY_PATH'].split(':', -1).keep_if { |path| path.start_with?('/opt/rh/') }.join(':') \
end"
LD_LIBRARY_PATH=`/opt/puppetlabs/puppet/bin/ruby -e "$STRIP_LDLYP_COMMAND"`
export LD_LIBRARY_PATH
unset LD_PRELOAD

# If $PATH does not match a regex for /opt/puppetlabs/bin
if [ `expr "${PATH}" : '.*/opt/puppetlabs/bin'` -eq 0 ]; then
  # Add /opt/puppetlabs/bin to a possibly empty $PATH
  PATH="${PATH:+${PATH}:}/opt/puppetlabs/bin"
  export PATH
fi

COMMAND=`basename "${0}"`

exec /opt/puppetlabs/puppet/bin/${COMMAND} "$@"

My mistake, I had removed all sets of symlinks, but once I got a look at puppet_strings_module_parser.rb I better understood how the environment is being cleaned up when calling puppet. It looks like removing just the symlinks in /usr/local/bin worked as you described. It has revealed another issue, but I think that’s a matter for a seperate thread.

Thank you for all of your help!

I had the same issue. I removed the /usr/bin/puppet symlink and now running the “foreman-installer --help” works. I was doing a fresh install of foreman 2.1 on a CentOS 7.7 VM. It was very useful finding this posting. It saved me a lot of troubleshooting time. Thanks.

Keith