Foreman Proxy 3.0 installation fails with "parameter 'config_file_group' expects a String value"

When trying to install Foreman Proxy 3.0 using following command:
foreman-installer
–no-enable-foreman
–no-enable-foreman-cli
–enable-puppet
–puppet-server-ca=false
–enable-foreman-proxy
–foreman-proxy-puppetca=false
–foreman-proxy-foreman-base-url=https://
–foreman-proxy-oauth-consumer-key=
–foreman-proxy-oauth-consumer-secret=

I get a following result:
2021-09-24 02:19:43 [NOTICE] [root] Loading installer configuration. This will take some time .
2021-09-24 02:19:48 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2021-09-24 02:19:48 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
2021-09-24 02:19:51 [NOTICE] [configure] Starting system configuration.
2021-09-24 02:19:56 [ERROR ] [configure] Evaluation Error: Error while evaluating a Resource Statement, Foreman::Plugin[puppet]:
2021-09-24 02:19:56 [ERROR ] [configure] parameter ‘version’ expects a String value, got Undef
2021-09-24 02:19:56 [ERROR ] [configure] parameter ‘config_file_group’ expects a String value, got Undef (file: /usr/share/foreman-installer/modules/foreman/manifests/plugin/puppet.pp, line: 6) on node
2021-09-24 02:19:56 [NOTICE] [configure] System configuration has finished.

For version 2.5 everything works fine.

I expect proxy to install successfully

#yum info foreman-installer
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • base: ftpmirror_your_org
  • centos-sclo-rh: mirrors_gigenet_com
  • epel: mirror_team-cymru_com
  • extras: ftpmirror_your_org
  • updates: centos_mirror_lstn_net
    Installed Packages
    Name : foreman-installer
    Arch : noarch
    Epoch : 1
    Version : 3.0.0
    Release : 1.el7
    Size : 6.5 M
    Repo : installed
    From repo : foreman
    Summary : Puppet-based installer for The Foreman
    URL : https://theforeman.org
    License : GPLv3+ and ASL 2.0
    Description : Complete installer for The Foreman life-cycle management system based on Puppet.

I have the same error while upgrading a detached smart proxy from 2.5.3 to 3.0.0

Here is the log

2021-09-28 15:52:37 [DEBUG ] [configure] importing '/usr/share/foreman-installer/modules/puppet/manifests/config/entry.pp' in environment production
2021-09-28 15:52:37 [DEBUG ] [configure] Automatically imported puppet::config::entry from puppet/config/entry into production
2021-09-28 15:52:37 [DEBUG ] [configure] importing '/usr/share/foreman-installer/modules/systemd/manifests/unit_file.pp' in environment production
2021-09-28 15:52:37 [DEBUG ] [configure] Automatically imported systemd::unit_file from systemd/unit_file into production
2021-09-28 15:52:37 [DEBUG ] [configure] importing '/usr/share/foreman-installer/modules/foreman/manifests/cli/params.pp' in environment production
2021-09-28 15:52:37 [DEBUG ] [configure] Automatically imported foreman::cli::params from foreman/cli/params into production
2021-09-28 15:52:37 [DEBUG ] [configure] Unknown variable: 'foreman::cli::params::hammer_plugin_prefix'. (file: /usr/share/foreman-installer/modules/foreman/manifests/cli/plugin.pp, line: 12, column: 24)
2021-09-28 15:52:37 [DEBUG ] [configure] Unknown variable: 'foreman::plugin_version'. (file: /usr/share/foreman-installer/modules/foreman/manifests/plugin.pp, line: 24, column: 24)
2021-09-28 15:52:37 [DEBUG ] [configure] importing '/usr/share/foreman-installer/modules/foreman/manifests/params.pp' in environment production
2021-09-28 15:52:37 [DEBUG ] [configure] Automatically imported foreman::params from foreman/params into production
2021-09-28 15:52:37 [DEBUG ] [configure] Unknown variable: 'foreman::params::plugin_prefix'. (file: /usr/share/foreman-installer/modules/foreman/manifests/plugin.pp, line: 25, column: 27)
2021-09-28 15:52:37 [DEBUG ] [configure] Unknown variable: 'foreman::plugin_config_dir'. (file: /usr/share/foreman-installer/modules/foreman/manifests/plugin.pp, line: 26, column: 42)
2021-09-28 15:52:37 [DEBUG ] [configure] Unknown variable: 'foreman::group'. (file: /usr/share/foreman-installer/modules/foreman/manifests/plugin.pp, line: 28, column: 34)
2021-09-28 15:52:37 [ERROR ] [configure] Evaluation Error: Error while evaluating a Resource Statement, Foreman::Plugin[puppet]:
2021-09-28 15:52:37 [ERROR ] [configure] parameter 'version' expects a String value, got Undef
2021-09-28 15:52:37 [ERROR ] [configure] parameter 'config_file_group' expects a String value, got Undef (file: /usr/share/foreman-installer/modules/foreman/manifests/plugin/puppet.pp, line: 6) on node server.domain.org
2021-09-28 15:52:37 [NOTICE] [configure] System configuration has finished.
2021-09-28 15:52:37 [INFO  ] [post] Executing hooks in group post
2021-09-28 15:52:37 [DEBUG ] [post] Hook /usr/share/foreman-installer/hooks/post/30-upgrade.rb returned nil
2021-09-28 15:52:37 [DEBUG ] [post] Hook /usr/share/foreman-installer/hooks/post/34-pulpcore_directory_layout.rb returned nil
2021-09-28 15:52:37 [DEBUG ] [post] Hook /usr/share/foreman-installer/hooks/post/99-post_install_message.rb returned nil
2021-09-28 15:52:37 [DEBUG ] [post] Hook /usr/share/foreman-installer/hooks/post/99-version_locking.rb returned nil
2021-09-28 15:52:37 [INFO  ] [post] All hooks in group post finished
2021-09-28 15:52:37 [DEBUG ] [root] Exit with status code: 1 (signal was 1)
2021-09-28 15:52:37 [DEBUG ] [root] Cleaning /tmp/kafo_installation20210928-13226-1gd32ng
2021-09-28 15:52:37 [DEBUG ] [root] Cleaning /tmp/kafo_installation20210928-13226-1ps2iuc
2021-09-28 15:52:37 [DEBUG ] [root] Cleaning /tmp/default_values.yaml
2021-09-28 15:52:37 [DEBUG ] [root] Installer finished in 13.433457992 seconds

Have you found a solution to fix this issue?

It looks like we enable the Puppet module unconditionally in the migration, even if Foreman itself is disabled:

The workaround should be to add --no-enable-foreman-plugin-puppet to the installer command.

I’ve opened a PR for the fix:

Thanks for the workaround. I gave it a try, without success.

[root@smart-proxy ~]# foreman-installer --no-enable-foreman-plugin-puppet
2021-09-28 18:09:32 [NOTICE] [root] Loading installer configuration. This will take some time.
2021-09-28 18:09:36 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2021-09-28 18:09:36 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
2021-09-28 18:09:44 [NOTICE] [configure] Starting system configuration.
2021-09-28 18:09:50 [ERROR ] [configure] Could not find resource 'Package[foreman-cli]' in parameter 'require' (file: /usr/share/foreman-installer/modules/foreman/manifests/cli/plugin.pp, line: 28) on node smart-proxy.domain.org
2021-09-28 18:09:50 [NOTICE] [configure] System configuration has finished.

  There were errors detected during install.
  Please address the errors and re-run the installer to ensure the system is properly configured.
  Failing to do so is likely to result in broken functionality.

  The full log is at /var/log/foreman-installer/foreman.log

Is there something else I should pass as parameter to the foreman-installer?

It looks like it tries to enable a Foreman CLI plugin (AKA Hammer plugin). If you use --help you can probably see which plugin it tries to enable.

1 Like

Many thanks for the hint!

I managed to get Success with foreman-installer --no-enable-foreman-plugin-puppet --no-enable-foreman-cli-puppet.

I was using v2.1.x until one week ago. Did not remember the --help was showing the values to be applied.

Ready to enjoy v3.0. Thanks for your prompt help!

I guess that was to be expected. I’ll modify the PR with the bugfix for other upgrading users. Thanks!

1 Like