Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1477490 - 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
Summary: Unfriendly error message when installing dhcp on interface without IP address...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Installation
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Chris Roberts
QA Contact: Sachin Ghai
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-02 09:03 UTC by Ivan Necas
Modified: 2019-04-01 20:27 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:54:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 21114 0 Normal Closed Unfriendly error message when installing dhcp on interface without IP address: installer fails with pick(): must receive... 2020-12-13 13:08:59 UTC

Description Ivan Necas 2017-08-02 09:03:23 UTC
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



Expected results:
The logs contain info "Could not get the ip address from fact ipaddress_eth1"

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

Comment 2 Sachin Ghai 2018-01-03 09:29:50 UTC
Verified with sat6.3 snap30. 

Error message is correctly appearing in case user pass the interface when no IP assigned to it:


 ~]# 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  "enp0s29u1u1u5"\
>                   --foreman-proxy-dns-zone       "SAT.example.com"\
>                   --foreman-proxy-dhcp           "true"\
>                   --foreman-proxy-dhcp-interface "enp0s29u1u1u5"\
>                   --foreman-proxy-tftp           "true"\
>                   --foreman-proxy-content-puppet "true"\
>                   --foreman-proxy-puppetca       "true"\
>                   --disable-system-checks


 Could not get the ip address from fact ipaddress_enp0s29u1u1u5 at /usr/share/foreman-installer/modules/foreman_proxy/manifests/proxydhcp.pp:8 on node cloud-qe-03.idmqe.lab.eng.bos.redhat.com
/usr/share/ruby/vendor_ruby/puppet/parser/functions/fail.rb:3:in `block in <top (required)>'
/usr/share/ruby/vendor_ruby/puppet/parser/functions.rb:164:in `block (2 levels) in newfunction'
/usr/share/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in `profile'

Comment 3 Satellite Program 2018-02-21 16:54:37 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.
> > 
> > For information on the advisory, and where to find the updated files, follow the link below.
> > 
> > If the solution does not work for you, open a new bug report.
> > 
> > https://access.redhat.com/errata/RHSA-2018:0336


Note You need to log in before you can comment on or make changes to this bug.