Project

General

Profile

Actions

Bug #27179

closed

foreman-installer 1.22 fails on new Ubuntu Bionic box due to use of upcase() in foreman-proxy's params.pp

Added by Jason C. Hammons over 5 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Category:
foreman-installer script
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

Steps to reproduce:

1. Install ubuntu-18.04.2-live-server-amd64.iso on a system (in my case a VMWare machine).
2. sudo apt-get update; sudo apt-get upgrade
3. Set static IP address. Reboot for superstitious reasons.
4. Follow https://www.theforeman.org/manuals/1.22/quickstart_guide.html -- entering Ubuntu Bionic into the dropdown to get the relevant repos, et cetera.
5. Run `sudo foreman-installer` and get: "Could not get default values, check log file at /var/log/foreman-installer/foreman.log for more information"
6. Investigate last line of log and see:

      ' | RUBYLIB=/usr/lib/ruby/vendor_ruby/kafo/modules: /opt/puppetlabs/bin/puppet apply --modulepath /usr/share/foreman-installer/modules:/usr/lib/ruby/vendor_ruby/kafo/modules --config=/tmp/kafo_puppet20190627-6383-13r52gs.conf 2>&1
[ERROR 2019-06-27T19:54:19 main] Error: Could not autoload puppet/provider/package/gem: superclass must be a Class (Module given)
Error: Facter: error while resolving custom facts in /usr/share/foreman-installer/modules/stdlib/lib/facter/package_provider.rb: Could not autoload puppet/provider/package/gem: superclass must be a Class (Module given)
Warning: Unknown variable: '::domain'. (file: /usr/share/foreman-installer/modules/foreman_proxy/manifests/params.pp, line: 268, column: 31)
Warning: Unknown variable: '::domain'. (file: /usr/share/foreman-installer/modules/foreman_proxy/manifests/params.pp, line: 299, column: 29)
Error: Evaluation Error: Error while evaluating a Function Call, 'upcase' parameter 'arg' expects a value of type Numeric, String, Array, or Hash, got Undef (file: /usr/share/foreman-installer/modules/foreman_proxy/manifests/params.pp, line: 300, column: 29) on node foreman

[ERROR 2019-06-27T19:54:19 main] Could not get default values, cannot continue

Workaround:

Change $dns_realm = upcase($dns_zone) to $dns_realm = $dns_zone on line 300 of params.pp: https://github.com/theforeman/puppet-foreman_proxy/blob/master/manifests/params.pp#L300

Actions

Also available in: Atom PDF