Project

General

Profile

Bug #21114

Unfriendly error message when installing dhcp on interface without IP address: installer fails with pick(): must receive at least one non empty" in the logs

Added by Chris Roberts about 3 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Foreman modules
Target version:
Difficulty:
easy
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

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"

Associated revisions

Revision f291aa33 (diff)
Added by Chris Roberts about 3 years ago

Fixes #21114 - Update error message

History

#1 Updated by Chris Roberts about 3 years ago

  • Project changed from Foreman to Installer
  • Category set to Foreman modules

#2 Updated by The Foreman Bot about 3 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/puppet-foreman_proxy/pull/375 added

#3 Updated by Chris Roberts about 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#4 Updated by Daniel Lobato Garcia about 3 years ago

  • Legacy Backlogs Release (now unused) set to 296

Also available in: Atom PDF