Bug #18113
closedParameter foreman-proxy-dhcp-range invalid: false is not a valid string
Description
I am in the process of upgrading from Foreman 1.13.2 to 1.14. When I ran foreman-installer --verbose (Step 3C) it gave the error:
Parameter foreman-proxy-dhcp-range invalid: false is not a valid string
[ INFO 2017-01-17 12:04:30 verbose] Executing hooks in group pre_migrations
[ INFO 2017-01-17 12:04:30 verbose] All hooks in group pre_migrations finished
[ INFO 2017-01-17 12:04:30 verbose] Executing hooks in group boot
[ INFO 2017-01-17 12:04:30 verbose] All hooks in group boot finished
[ INFO 2017-01-17 12:04:30 verbose] Executing hooks in group init
[ INFO 2017-01-17 12:04:30 verbose] All hooks in group init finished
[ INFO 2017-01-17 12:04:30 verbose] Loading default values from puppet modules...
[ INFO 2017-01-17 12:04:30 verbose] ... finished
[ INFO 2017-01-17 12:04:30 verbose] Executing hooks in group pre_values
[ INFO 2017-01-17 12:04:30 verbose] All hooks in group pre_values finished
[ INFO 2017-01-17 12:04:30 verbose] Executing hooks in group pre_validations
[ INFO 2017-01-17 12:04:30 verbose] All hooks in group pre_validations finished
[ INFO 2017-01-17 12:04:30 verbose] Running validation checks
*[ERROR 2017-01-17 12:04:30 verbose] Parameter foreman-proxy-dhcp-range invalid: false is not a valid string
*
Running foreman-installer --help and looking for foreman-proxy-dhcp-range notes the default is "false"
- foreman-installer --help | grep dhcp-range
--foreman-proxy-dhcp-range Space-separated DHCP pool range (default: false)
Attached run of "foreman-installer --verbose -l debug"
In the /usr/share/foreman-installer/modules/foreman_proxy/CHANGELOG.md there is a reference for 5.0.0 that says
- Fix dhcp_range default to be undef
Further checking / testing found that this error occurs when:
1. Run with no options --> # foreman-installer
- foreman-installer
Parameter foreman-proxy-dhcp-range invalid: false is not a valid string
Error during configuration, exiting
2. Run with --verbose, --foreman-prox-dhcp-range (with no setting)
- foreman-installer --noop --verbose --foreman-proxy-dhcp-range
[ INFO 2017-01-17 12:37:30 verbose] Executing hooks in group pre_migrations
...
[ INFO 2017-01-17 12:37:30 verbose] Running validation checks
[ERROR 2017-01-17 12:37:30 verbose] Parameter foreman-proxy-dhcp-range invalid: false is not a valid string
Error during configuration, exiting
The error clears and runs if run with foreman-installer --noop --foreman-proxy-dhcp-range "", foreman-installer --noop --foreman-proxy-dhcp-range=undef, foreman-installer --noop --foreman-proxy-dhcp-range=false
I'm not familiar enough with the underlying foreman-installer code to track down where the foreman_proxy::params::dhcp_range value is evaluating the foreman-proxy-dhcp-range to be determine that false is not a valid string.
What I did find is that in the following files I found a reference to dhcp_range.
/usr/share/foreman-installer/modules/foreman_proxy/manifests/init.pp
$dhcp_range = $foreman_proxy::params::dhcp_range
/usr/share/foreman-installer/modules/foreman_proxy/manifests/params.pp
$dhcp_range = undef
usr/share/foreman-installer/modules/foreman_proxy/manifests/proxydhcp.pp
range => $foreman_proxy::dhcp_range
/usr/share/foreman-installer/parser_cache/foreman.yaml
dhcp_range: "foreman_proxy::params::dhcp_range"
Files