Bug #21114
closedUnfriendly error message when installing dhcp on interface without IP address: installer fails with pick(): must receive at least one non empty" in the logs
Description
Cloned from bz:
Version-Release number of selected component (if applicable):
Sat-6.3 snap 9
How reproducible:
always
Steps to Reproduce:
1. configure network on the host, don't set ip address on the interface eth1
2. try to install dns and dhcp against this interface:
satellite-installer --scenario "satellite"\
--foreman-proxy-dns "true"\
--foreman-proxy-dns-forwarders "8.8.8.8"\
--foreman-proxy-dns-forwarders "8.8.4.4"\
--foreman-proxy-dns-interface "eth1"\
--foreman-proxy-dns-zone "sat63.example.com"\
--foreman-proxy-dhcp "true"\
--foreman-proxy-dhcp-interface "eth1"\
--foreman-proxy-tftp "true"\
--foreman-proxy-content-puppet "true"\
--foreman-proxy-puppetca "true"\
--disable-system-checks
Installer fails with a backtrace, the installer log contains:
[ERROR 2017-08-02 07:21:02 main] pick(): must receive at least one non empty value at /usr/share/foreman-installer/modules/foreman_proxy/manifests/proxydhcp.pp:6 on node sat63-qa-rhel7.example.com
[ERROR 2017-08-02 07:21:02 main] /usr/share/ruby/vendor_ruby/puppet/util/errors.rb:106:in `fail'
[ERROR 2017-08-02 07:21:02 main] /usr/share/foreman-installer/modules/stdlib/lib/puppet/parser/functions/pick.rb:24:in `block in <module:Functions>'
[ERROR 2017-08-02 07:21:02 main] /usr/share/ruby/vendor_ruby/puppet/parser/functions.rb:164:in `block (2 levels) in newfunction'
[ERROR 2017-08-02 07:21:02 main] /usr/share/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in `profile'
[ERROR 2017-08-02 07:21:02 main] /usr/share/ruby/vendor_ruby/puppet/util/profiler.rb:51:in `profile'
[ERROR 2017-08-02 07:21:02 main] /usr/share/ruby/vendor_ruby/puppet/parser/functions.rb:157:in `block in newfunction'
[ERROR 2017-08-02 07:21:02 main] /usr/share/ruby/vendor_ruby/puppet/parser/ast/function.rb:42:in `evaluate
Additional info:
This is a regression of http://projects.theforeman.org/issues/16942
The fix should be
$ip = pick_default($::foreman_proxy::dhcp_pxeserver, inline_template("<%= scope.lookupvar('::ipaddress_${interface_fact_name}', '') %>"), '')
The friendly error messages are tracked in http://projects.theforeman.org/issues/12662, but thi BZ is just about the more accurate error in the logs
Expected results:
The logs contain info "Could not get the ip address from fact ipaddress_eth1"
Updated by Chris Roberts about 7 years ago
- Project changed from Foreman to Installer
- Category set to Foreman modules
Updated by The Foreman Bot about 7 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/puppet-foreman_proxy/pull/375 added
Updated by Chris Roberts about 7 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset puppet-foreman_proxy|f291aa33fbb6cef2428fd55fd2a23e52622fca0d.
Updated by Daniel Lobato Garcia about 7 years ago
- Translation missing: en.field_release set to 296