Issue with foreman-installer-katello: Missing facter causing POSTIN scriptlet failure

Description:

I encountered an issue while reinstalling the foreman-installer-katello package on my system. The installation process fails during the execution of the %post scriptlet due to the following error:

/usr/share/ruby/open3.rb:221:in `spawn': No such file or directory - facter (Errno::ENOENT)
        from /usr/share/ruby/open3.rb:221:in `popen_run'
        from /usr/share/ruby/open3.rb:102:in `popen3'
        from /usr/share/ruby/open3.rb:289:in `capture3'
        from /usr/share/gems/gems/kafo-7.6.0/lib/kafo/base_context.rb:39:in `run_command'
        from /usr/share/gems/gems/kafo-7.6.0/lib/kafo/base_context.rb:29:in `facts'
        from /usr/share/gems/gems/kafo-7.6.0/lib/kafo/base_context.rb:6:in `facts'
        from /etc/foreman-installer/scenarios.d/foreman-proxy-content.migrations/200630000120-disable-pulp-2-el8.rb:1:in `block (2 levels) in load_migrations'
        ...

Analysis:

  1. Root Cause:
  • The error indicates that the facter binary is missing from the system.
  • The %post scriptlet relies on facter to gather system facts, and its absence causes the script to fail.
  1. Implications:
  • The installation completes with warnings, but essential post-installation configurations are not applied.
  • This could lead to misconfigured or incomplete functionality of foreman-installer-katello .

Steps to Reproduce:

  1. Run:
dnf reinstall foreman-installer-katello
  1. Observe the error during the execution of the %post scriptlet.

Solution:

  1. Install facter :
  • Verify if facter is installed:
which facter
  • If not, install it using:
dnf install rubygem-facter.noarch
  1. Reinstall the Package (if needed):
  • If the issue persists, consider a clean reinstall:
dnf remove foreman-installer-katello
dnf install foreman-installer-katello

Environment Details:

  • Operating System: Red Hat EL 9
  • Katello Version: 4.15
  • Foreman Installer: 3.13

Other relevant data:
foreman-installer-katello.log (7.1 KB)