Problem with Foreman upgrade 2.4.1 -> 2.5.3: No Puppet module parser is installed

Problem:

I am upgrading foreman from 2.4.1 to 2.5.3. At step 3C of the installation process, foreman-installer throws an error.

# foreman-installer --noop --verbose
Traceback (most recent call last):
        19: from /usr/sbin/foreman-installer:8:in `<main>'
        18: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/kafo_configure.rb:50:in `run'
        17: from /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run'
        16: from /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `new'
        15: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/kafo_configure.rb:140:in `initialize'
        14: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hooking.rb:65:in `execute'
        13: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hooking.rb:65:in `each'
        12: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hooking.rb:67:in `block in execute'
        11: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hook_context.rb:19:in `execute'
        10: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hook_context.rb:19:in `instance_eval'
         9: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hooking.rb:36:in `block (4 levels) in load'
         8: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hooking.rb:36:in `instance_eval'
         7: from /usr/share/foreman-installer/hooks/boot/20-certs_update.rb:2:in `block (4 levels) in load'
         6: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hook_context.rb:113:in `module_present?'
         5: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/kafo_configure.rb:257:in `module'
         4: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/kafo_configure.rb:253:in `modules'
         3: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/configuration.rb:133:in `modules'
         2: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/configuration.rb:133:in `map'
         1: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/configuration.rb:133:in `block in modules'
/opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/puppet_module.rb:70:in `parse': No Puppet module parser is installed and no cache of the file /usr/
share/foreman-installer/modules/t/manifests/init.pp is available. Please check debug logs and install optional dependencies for the parser. (Kafo::ParserError)

Expected outcome:

Successful completion of foreman-installer command

Foreman and Proxy versions:

Just updated to 2.5.3 from 2.4.1.

  • foreman-release-2.5.3-1.el7.noarch
  • foreman-proxy-2.5.3-1.el7.noarch
  • foreman-2.5.3-1.el7.noarch

Foreman and Proxy plugin versions:

  • tfm-rubygem-foreman-tasks-core-0.3.6-1.fm2_5.el7.noarch
  • tfm-rubygem-foreman_remote_execution_core-1.4.8-1.el7.noarch
  • tfm-rubygem-hammer_cli_foreman-2.5.1-1.el7.noarch
  • tfm-rubygem-foreman-tasks-4.1.5-1.fm2_5.el7.noarch
  • tfm-rubygem-foreman_remote_execution-4.5.6-1.fm2_5.el7.noarch
  • rubygem-foreman_maintain-0.8.6-1.el7.noarch
  • tfm-rubygem-foreman_ansible-6.3.4-1.fm2_5.el7.noarch
  • foreman-cli-2.5.3-1.el7.noarch
  • foreman-libvirt-2.5.3-1.el7.noarch
  • tfm-rubygem-foreman_datacenter-2.3.0-3.fm2_5.el7.noarch
  • foreman-postgresql-2.5.3-1.el7.noarch
  • foreman-dynflow-sidekiq-2.5.3-1.el7.noarch
  • tfm-rubygem-foreman_discovery-17.0.1-1.fm2_5.el7.noarch
  • foreman-service-2.5.3-1.el7.noarch
  • tfm-rubygem-foreman_statistics-1.1.1-2.fm2_5.el7.noarch
  • foreman-installer-2.5.3-1.el7.noarch
  • foreman-selinux-2.5.3-1.el7.noarch

Distribution and version:

CentOS 7.9.2009

Other relevant data:

Last week I successfully upgraded foreman from version 2.1.4, with the following steps: 2.1.4 → 2.2.3 → 2.3.5 → 2.4.1.

The upgrade 2.4.1 → 2.5.3 is the first one with some troubles.

I tried to execute the following 2 commands

puppet resource package yard provider=puppet_gem
puppet resource package puppet-strings provider=puppet_gem

And now I have a different error on foreman-installer

# foreman-installer --noop --verbose                                                                                                       
Traceback (most recent call last):
        22: from /usr/sbin/foreman-installer:8:in `<main>'
        21: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/kafo_configure.rb:50:in `run'
        20: from /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run'
        19: from /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `new'
        18: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/kafo_configure.rb:140:in `initialize'
        17: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hooking.rb:65:in `execute'
        16: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hooking.rb:65:in `each'
        15: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hooking.rb:67:in `block in execute'
        14: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hook_context.rb:19:in `execute'
        13: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hook_context.rb:19:in `instance_eval'
        12: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hooking.rb:36:in `block (4 levels) in load'
        11: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hooking.rb:36:in `instance_eval'
        10: from /usr/share/foreman-installer/hooks/boot/20-certs_update.rb:2:in `block (4 levels) in load'
         9: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hook_context.rb:113:in `module_present?'
         8: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/kafo_configure.rb:257:in `module'
         7: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/kafo_configure.rb:253:in `modules'
         6: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/configuration.rb:133:in `modules'
         5: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/configuration.rb:133:in `map'
         4: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/configuration.rb:133:in `block in modules'
         3: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/puppet_module.rb:72:in `parse'
         2: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo_parsers-1.2.0/lib/kafo_parsers/puppet_strings_module_parser.rb:15:in `parse'
         1: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo_parsers-1.2.0/lib/kafo_parsers/puppet_strings_module_parser.rb:15:in `new'
/opt/theforeman/tfm/root/usr/share/gems/gems/kafo_parsers-1.2.0/lib/kafo_parsers/puppet_strings_module_parser.rb:40:in `initialize': File not found /usr/share/foreman-installer/modules/t/manifests/init.pp, check your answer file (KafoParsers::ModuleName)


# foreman-installer
Traceback (most recent call last):
        22: from /usr/sbin/foreman-installer:8:in `<main>'
        21: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/kafo_configure.rb:50:in `run'
        20: from /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run'
        19: from /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `new'
        18: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/kafo_configure.rb:140:in `initialize'
        17: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hooking.rb:65:in `execute'
        16: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hooking.rb:65:in `each'
        15: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hooking.rb:67:in `block in execute'
        14: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hook_context.rb:19:in `execute'
        13: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hook_context.rb:19:in `instance_eval'
        12: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hooking.rb:36:in `block (4 levels) in load'
        11: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hooking.rb:36:in `instance_eval'
        10: from /usr/share/foreman-installer/hooks/boot/20-certs_update.rb:2:in `block (4 levels) in load'
         9: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hook_context.rb:113:in `module_present?'
         8: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/kafo_configure.rb:257:in `module'
         7: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/kafo_configure.rb:253:in `modules'
         6: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/configuration.rb:133:in `modules'
         5: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/configuration.rb:133:in `map'
         4: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/configuration.rb:133:in `block in modules'
         3: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/puppet_module.rb:72:in `parse'
         2: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo_parsers-1.2.0/lib/kafo_parsers/puppet_strings_module_parser.rb:15:in `parse'
         1: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo_parsers-1.2.0/lib/kafo_parsers/puppet_strings_module_parser.rb:15:in `new'
/opt/theforeman/tfm/root/usr/share/gems/gems/kafo_parsers-1.2.0/lib/kafo_parsers/puppet_strings_module_parser.rb:40:in `initialize': File not found /usr/share/foreman-installer/modules/t/manifests/init.pp, check your answer file (KafoParsers::ModuleName)

Feel free to ask for more info.

Thanks in advance for your help!!

This is needed when the parser cache is not in sync with the actual Puppet files. It is checked with file modification times. You can use yum install puppet-agent-puppet-strings if you do need a parser, but I’d advise against that because it’s much slower. It’s only really needed for when you patch your installer manually.

Instead, I’d check why the are out of sync. What’s the output of rpm -qv foreman-installer? Sometimes a yum reinstall foreman-installer can also be sufficient.

Many thanks for your quick reply!

I tried your suggestion, but without success.

Here is what happened

[root@server]# rpm -qv foreman-installer
foreman-installer-2.5.3-1.el7.noarch


[root@server]# yum reinstall foreman-installer
Loaded plugins: fastestmirror, langpacks, versionlock
Loading mirror speeds from cached hostfile
 * base: mirrors.prometeus.net
 * centos-sclo-rh: mirrors.prometeus.net
 * epel: pkg.adfinis.com
 * extras: mirrors.prometeus.net
 * updates: mirrors.prometeus.net
Resolving Dependencies
--> Running transaction check
---> Package foreman-installer.noarch 1:2.5.3-1.el7 will be reinstalled
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================================================
 Package                                      Arch                              Version                                    Repository                          Size
====================================================================================================================================================================
Reinstalling:
 foreman-installer                            noarch                            1:2.5.3-1.el7                              foreman                            1.6 M

Transaction Summary
====================================================================================================================================================================
Reinstall  1 Package

Total download size: 1.6 M
Installed size: 6.9 M
Is this ok [y/d/N]: y
Downloading packages:
foreman-installer-2.5.3-1.el7.noarch.rpm                                                                                                     | 1.6 MB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 1:foreman-installer-2.5.3-1.el7.noarch                                                                                                           1/1 
  Verifying  : 1:foreman-installer-2.5.3-1.el7.noarch                                                                                                           1/1 

Installed:
  foreman-installer.noarch 1:2.5.3-1.el7                                                                                                                            

Complete!



[root@server]# foreman-installer --noop --verbose                                                                                                       
Traceback (most recent call last):
        22: from /usr/sbin/foreman-installer:8:in `<main>'
        21: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/kafo_configure.rb:50:in `run'
        20: from /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run'
        19: from /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `new'
        18: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/kafo_configure.rb:140:in `initialize'
        17: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hooking.rb:65:in `execute'
        16: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hooking.rb:65:in `each'
        15: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hooking.rb:67:in `block in execute'
        14: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hook_context.rb:19:in `execute'
        13: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hook_context.rb:19:in `instance_eval'
        12: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hooking.rb:36:in `block (4 levels) in load'
        11: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hooking.rb:36:in `instance_eval'
        10: from /usr/share/foreman-installer/hooks/boot/20-certs_update.rb:2:in `block (4 levels) in load'
         9: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hook_context.rb:113:in `module_present?'
         8: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/kafo_configure.rb:257:in `module'
         7: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/kafo_configure.rb:253:in `modules'
         6: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/configuration.rb:133:in `modules'
         5: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/configuration.rb:133:in `map'
         4: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/configuration.rb:133:in `block in modules'
         3: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/puppet_module.rb:72:in `parse'
         2: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo_parsers-1.2.0/lib/kafo_parsers/puppet_strings_module_parser.rb:15:in `parse'
         1: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo_parsers-1.2.0/lib/kafo_parsers/puppet_strings_module_parser.rb:15:in `new'
/opt/theforeman/tfm/root/usr/share/gems/gems/kafo_parsers-1.2.0/lib/kafo_parsers/puppet_strings_module_parser.rb:40:in `initialize': File not found /usr/share/forem
an-installer/modules/t/manifests/init.pp, check your answer file (KafoParsers::ModuleName)


[root@server]# yum install puppet-agent-puppet-strings
Loaded plugins: fastestmirror, langpacks, versionlock
Loading mirror speeds from cached hostfile
 * base: mirrors.prometeus.net
 * centos-sclo-rh: mirrors.prometeus.net
 * epel: pkg.adfinis.com
 * extras: mirrors.prometeus.net
 * updates: mirrors.prometeus.net
Resolving Dependencies
--> Running transaction check
---> Package puppet-agent-puppet-strings.noarch 0:2.3.0-2.el7 will be installed
--> Processing Dependency: puppet-agent-yard < 1 for package: puppet-agent-puppet-strings-2.3.0-2.el7.noarch
--> Processing Dependency: puppet-agent-yard >= 0.9.5 for package: puppet-agent-puppet-strings-2.3.0-2.el7.noarch
--> Processing Dependency: puppet-agent-rgen for package: puppet-agent-puppet-strings-2.3.0-2.el7.noarch
--> Running transaction check
---> Package puppet-agent-rgen.noarch 0:0.8.2-2.el7 will be installed
---> Package puppet-agent-yard.noarch 0:0.9.5-2.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================================================
 Package                                              Arch                            Version                                Repository                        Size
====================================================================================================================================================================
Installing:
 puppet-agent-puppet-strings                          noarch                          2.3.0-2.el7                            foreman                           85 k
Installing for dependencies:
 puppet-agent-rgen                                    noarch                          0.8.2-2.el7                            foreman                          275 k
 puppet-agent-yard                                    noarch                          0.9.5-2.el7                            foreman                          581 k

Transaction Summary
====================================================================================================================================================================
Install  1 Package (+2 Dependent packages)

Total download size: 942 k
Installed size: 936 k
Is this ok [y/d/N]: y
Downloading packages:
(1/3): puppet-agent-puppet-strings-2.3.0-2.el7.noarch.rpm                                                                                    |  85 kB  00:00:00     
(2/3): puppet-agent-rgen-0.8.2-2.el7.noarch.rpm                                                                                              | 275 kB  00:00:00     
(3/3): puppet-agent-yard-0.9.5-2.el7.noarch.rpm                                                                                              | 581 kB  00:00:00     
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                               1.4 MB/s | 942 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : puppet-agent-rgen-0.8.2-2.el7.noarch                                                                                                             1/3 
  Installing : puppet-agent-yard-0.9.5-2.el7.noarch                                                                                                             2/3 
  Installing : puppet-agent-puppet-strings-2.3.0-2.el7.noarch                                                                                                   3/3 
  Verifying  : puppet-agent-puppet-strings-2.3.0-2.el7.noarch                                                                                                   1/3 
  Verifying  : puppet-agent-yard-0.9.5-2.el7.noarch                                                                                                             2/3 
  Verifying  : puppet-agent-rgen-0.8.2-2.el7.noarch                                                                                                             3/3 

Installed:
  puppet-agent-puppet-strings.noarch 0:2.3.0-2.el7                                                                                                                  

Dependency Installed:
  puppet-agent-rgen.noarch 0:0.8.2-2.el7                                           puppet-agent-yard.noarch 0:0.9.5-2.el7                                          

Complete!
[root@server]# foreman-installer --noop --verbose 
Traceback (most recent call last):
        22: from /usr/sbin/foreman-installer:8:in `<main>'
        21: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/kafo_configure.rb:50:in `run'
        20: from /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run'
        19: from /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `new'
        18: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/kafo_configure.rb:140:in `initialize'
        17: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hooking.rb:65:in `execute'
        16: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hooking.rb:65:in `each'
        15: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hooking.rb:67:in `block in execute'
        14: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hook_context.rb:19:in `execute'
        13: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hook_context.rb:19:in `instance_eval'
        12: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hooking.rb:36:in `block (4 levels) in load'
        11: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hooking.rb:36:in `instance_eval'
        10: from /usr/share/foreman-installer/hooks/boot/20-certs_update.rb:2:in `block (4 levels) in load'
         9: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/hook_context.rb:113:in `module_present?'
         8: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/kafo_configure.rb:257:in `module'
         7: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/kafo_configure.rb:253:in `modules'
         6: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/configuration.rb:133:in `modules'
         5: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/configuration.rb:133:in `map'
         4: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/configuration.rb:133:in `block in modules'
         3: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo-6.4.0/lib/kafo/puppet_module.rb:72:in `parse'
         2: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo_parsers-1.2.0/lib/kafo_parsers/puppet_strings_module_parser.rb:15:in `parse'
         1: from /opt/theforeman/tfm/root/usr/share/gems/gems/kafo_parsers-1.2.0/lib/kafo_parsers/puppet_strings_module_parser.rb:15:in `new'
/opt/theforeman/tfm/root/usr/share/gems/gems/kafo_parsers-1.2.0/lib/kafo_parsers/puppet_strings_module_parser.rb:40:in `initialize': File not found /usr/share/foreman-installer/modules/t/manifests/init.pp, check your answer file (KafoParsers::ModuleName)

Can this be due to the 2 commands I executed manually?

puppet resource package yard provider=puppet_gem
puppet resource package puppet-strings provider=puppet_gem

Or is it something else?

Apologies, I meant rpm -qV foreman-installer.

Now that I read the message more carefully, I see it may be something else:

/usr/share/foreman-installer/modules/t/manifests/init.pp

This implies there’s a module named t in your answers file. Have you manually edited that? I wonder what’s in your answers file.

1 Like

Here is the requested info

# rpm -qV foreman-installer
S.5....T.  c /etc/foreman-installer/scenarios.d/foreman-answers.yaml
S.5....T.  c /etc/foreman-installer/scenarios.d/foreman-migrations-applied
S.5....T.  c /etc/foreman-installer/scenarios.d/foreman.yaml

I checked the file /etc/foreman-installer/scenarios.d, it contains

# Format:
# <classname>: false - don't include this class
# <classname>: true - include and use the defaults
# <classname>:
#   <param>: <value> - include and override the default(s)
#
# See params.pp in each class for what options are available

---
t: 
foreman::plugin::webhooks: false
foreman_proxy::plugin::shellhooks: false

This is weird. Earlier, today, I merged the original file with the one provided by the 2.4.1 rpm. It could be that I made a mistake while copy pasting from my workstation and the remote server with vim.

Fortunately, I had a backup of the file. I recovered it, merged with the one provided by 2.5.3, and now foreman-installer works like a charm.

I also removed puppet-agent-puppet-strings, since you suggested to not use it due to a performance penalty.

Many thanks for your time and help!