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
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)
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.
# 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.