Foreman-installer manage_acls_on_debian.rb:1:in `block (2 levels) in load_migrations': undefined method `[]' for nil:NilClass (NoMethodError)

# foreman-installer
Traceback (most recent call last):
        13: from /usr/sbin/foreman-installer:8:in `<main>'
        12: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/kafo_configure.rb:50:in `run'
        11: from /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run'
        10: from /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `new'
         9: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/kafo_configure.rb:115:in `initialize'
         8: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/configuration.rb:325:in `run_migrations'
         7: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/migrations.rb:35:in `run'
         6: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/migrations.rb:35:in `each'
         5: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/migrations.rb:38:in `block in run'
         4: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/migration_context.rb:10:in `execute'
         3: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/migration_context.rb:10:in `instance_eval'
         2: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/migrations.rb:25:in `block (2 levels) in load_migrations'
         1: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/migrations.rb:25:in `instance_eval'
/etc/foreman-installer/scenarios.d/foreman.migrations/20200909151007_manage_acls_on_debian.rb:1:in `block (2 levels) in load_migrations': undefined method `[]' for nil:NilClass (NoMethodError)

# uname -a
Linux 3.10.0-1160.53.1.el7.x86_64 #1 SMP Fri Jan 14 13:59:45 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

# cat /etc/redhat-release 
CentOS Linux release 7.9.2009 (Core)

Hello and welcome to the community!

Please use the template provided with creating a new topic.
We create this topic so that you provide us with the information we need to help you!
Everyone here volunteers their time and the more information and context you can give them will increase the likelihood of you getting a response.

I am also getting same error. Has any body figured out above issue

Which Puppet version do you have? It complains that it can’t access facts[:os][:family] which is weird.

Either way, if you’re (like the OP) running into this on a CentOS machine, you can just empty the file (/etc/foreman-installer/scenarios.d/foreman.migrations/20200909151007_manage_acls_on_debian.rb) and re-run the installer. It’s a migration that is only needed on Debian.

Alternatively, you can change facts[:os][:family] == 'Debian' to false, but the result will be the same.

Here the facter version is more important. Do you by any chance have a very old (IIRC Facter < 2.4) in your $PATH that doesn’t have the os fact?