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 1640848 - DHCP ISC conf parser is unable to process interface-mtu option statement
Summary: DHCP ISC conf parser is unable to process interface-mtu option statement
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: DHCP & DNS
Version: 6.4.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: 6.6.0
Assignee: Lukas Zapletal
QA Contact: Perry Gagne
URL: https://projects.theforeman.org/issue...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-10-18 22:24 UTC by Andrea Perotti
Modified: 2019-10-22 19:48 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-22 19:48:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 25243 0 None None None 2018-10-19 07:00:33 UTC

Description Andrea Perotti 2018-10-18 22:24:00 UTC
Description of problem:
when provisioning a new host, in the interfaces section, when is tried to configure a new interface on a sat6 with an external dhcp integration enabled, you obtain an error:

Failed to fetch a free IP from Capsule %{Capsule}: %{message}

In addition to the fact that in the UI %{Capsule} and %{message} are not substituted, the core of the problem under the hood is that instead of an IP, is returned:

undefined method `to_i' for [["9000"]]:Array (NoMethodError)

this bug is blocker because it prevent from using the provisionig mechanism of Sat6 after updating, while on 6.3.4 was correctly working


Version-Release number of selected component (if applicable):
foreman-proxy-1.18.0.1-1.el7sat.noarch

How reproducible:
Always

Steps to Reproduce:
1. Setup an external DHCP
2. Configure Sat6 to make use of dhcp via capsule
3. Setup a subnet to be managed by that capsule
4. curl -RLv --cacert /etc/foreman-proxy/foreman_ssl_ca.pem --key /etc/foreman-proxy/foreman_ssl_key.pem  --cert /etc/foreme: application/json" https://sat6.home.local:9090/dhcp/192.168.2.0/unused_ip?from=192.168.2.150

Actual results:

client:

* About to connect() to sat6.home.local port 9090 (#0)
*   Trying 192.168.2.4...
* Connected to sat6.home.local (192.168.2.4) port 9090 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/foreman-proxy/foreman_ssl_ca.pem
  CApath: none
* NSS: client certificate from file
*       subject: CN=sat6.home.local,OU=FOREMAN_PROXY,O=FOREMAN,ST=North Carolina,C=US
*       start date: ott 06 11:39:47 2017 GMT
*       expire date: ott 08 11:39:47 2037 GMT
*       common name: sat6.home.local
*       issuer: CN=sat6.home.local,OU=SomeOrgUnit,O=Katello,L=Raleigh,ST=North Carolina,C=US
* SSL connection using TLS_RSA_WITH_AES_128_GCM_SHA256
* Server certificate:
*       subject: CN=sat6.home.local,OU=SMART_PROXY,O=FOREMAN,ST=North Carolina,C=US
*       start date: ott 06 11:39:48 2017 GMT
*       expire date: ott 08 11:39:48 2037 GMT
*       common name: sat6.home.local
*       issuer: CN=sat6.home.local,OU=SomeOrgUnit,O=Katello,L=Raleigh,ST=North Carolina,C=US
> GET /dhcp/192.168.2.0/unused_ip?from=192.168.2.150 HTTP/1.1
> User-Agent: curl/7.29.0
> Host: sat6.home.local:9090
> Accept: */*
> Content-Type: application/json
> 
< HTTP/1.1 400 Bad Request 
< Content-Type: application/json
< Content-Length: 44
< X-Content-Type-Options: nosniff
< Server: 
< Date: Thu, 18 Oct 2018 22:04:17 GMT
< Connection: Keep-Alive
< 
* Connection #0 to host sat6.home.local left intact
undefined method `to_i' for [["9000"]]:Arra

satellite server (logging to debug):

D, [2018-10-19T00:04:17.404632 ] DEBUG -- : accept: 192.168.2.4:46338
D, [2018-10-19T00:04:17.405608 ] DEBUG -- : Rack::Handler::WEBrick is invoked.
D, [2018-10-19T00:04:17.406415 ] DEBUG -- : verifying remote client 192.168.2.4 against trusted_hosts ["sat6.home.local"]
D, [2018-10-19T00:04:17.418236 ] DEBUG -- : Added a subnet: 192.168.2.0
E, [2018-10-19T00:04:17.418568 ] ERROR -- : undefined method `to_i' for [["9000"]]:Array
D, [2018-10-19T00:04:17.418604 ] DEBUG -- : undefined method `to_i' for [["9000"]]:Array (NoMethodError)
/usr/share/foreman-proxy/modules/dhcp_common/subnet.rb:29:in `initialize'
/usr/share/foreman-proxy/modules/dhcp_common/isc/subnet_service_initialization.rb:78:in `new'
/usr/share/foreman-proxy/modules/dhcp_common/isc/subnet_service_initialization.rb:78:in `to_subnet'
/usr/share/foreman-proxy/modules/dhcp_common/isc/subnet_service_initialization.rb:22:in `block in update_subnet_service_with_subnet_records'
/usr/share/foreman-proxy/modules/dhcp_common/isc/subnet_service_initialization.rb:22:in `each'
/usr/share/foreman-proxy/modules/dhcp_common/isc/subnet_service_initialization.rb:22:in `update_subnet_service_with_subnet_records'
/usr/share/foreman-proxy/modules/dhcp_common/isc/subnet_service_initialization.rb:12:in `load_configuration_file'
/usr/share/gems/gems/smart_proxy_dhcp_remote_isc-0.0.4/lib/smart_proxy_dhcp_remote_isc/subnet_service_initializer.rb:16:in `initialized_subnet_service'
/usr/share/gems/gems/smart_proxy_dhcp_remote_isc-0.0.4/lib/smart_proxy_dhcp_remote_isc/plugin_configuration.rb:15:in `block in load_dependency_injection_wirings'
/usr/share/foreman-proxy/lib/proxy/dependency_injection.rb:10:in `call'
/usr/share/foreman-proxy/lib/proxy/dependency_injection.rb:10:in `instance'
/usr/share/foreman-proxy/lib/proxy/dependency_injection.rb:59:in `get_dependency'
/usr/share/gems/gems/smart_proxy_dhcp_remote_isc-0.0.4/lib/smart_proxy_dhcp_remote_isc/plugin_configuration.rb:21:in `block in load_dependency_injection_wirings'
/usr/share/foreman-proxy/lib/proxy/dependency_injection.rb:10:in `call'
/usr/share/foreman-proxy/lib/proxy/dependency_injection.rb:10:in `instance'
/usr/share/foreman-proxy/lib/proxy/dependency_injection.rb:59:in `get_dependency'
/usr/share/foreman-proxy/lib/proxy/dependency_injection.rb:76:in `block in inject_attr'
/usr/share/foreman-proxy/modules/dhcp/dhcp_api.rb:34:in `block in <class:DhcpApi>'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:1611:in `call'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:1611:in `block in compile!'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:975:in `[]'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:975:in `block (3 levels) in route!'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:994:in `route_eval'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:975:in `block (2 levels) in route!'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:1015:in `block in process_route'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:1013:in `catch'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:1013:in `process_route'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:973:in `block in route!'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:972:in `each'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:972:in `route!'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:1085:in `block in dispatch!'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:1067:in `block in invoke'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:1067:in `catch'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:1067:in `invoke'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:1082:in `dispatch!'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:907:in `block in call!'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:1067:in `block in invoke'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:1067:in `catch'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:1067:in `invoke'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:907:in `call!'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:895:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/commonlogger.rb:33:in `call'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:219:in `call'
/usr/share/foreman-proxy/lib/proxy/log.rb:109:in `call'
/usr/share/foreman-proxy/lib/proxy/request_id_middleware.rb:9:in `call'
/usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/xss_header.rb:18:in `call'
/usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/path_traversal.rb:16:in `call'
/usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/json_csrf.rb:18:in `call'
/usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
/usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
/usr/share/gems/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/nulllogger.rb:9:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/head.rb:13:in `call'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/show_exceptions.rb:25:in `call'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:182:in `call'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:2013:in `call'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:1487:in `block in call'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:1787:in `synchronize'
/usr/share/gems/gems/sinatra-1.4.7/lib/sinatra/base.rb:1487:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:66:in `block in call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `each'
/usr/share/gems/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/builder.rb:153:in `call'
/usr/share/gems/gems/rack-1.6.4/lib/rack/handler/webrick.rb:88:in `service'
/usr/share/ruby/webrick/httpserver.rb:138:in `service'
/usr/share/ruby/webrick/httpserver.rb:94:in `run'
/usr/share/ruby/webrick/server.rb:295:in `block in start_thread'
I, [2018-10-19T00:04:17.419031 ]  INFO -- : 192.168.2.4 - - [19/Oct/2018:00:04:17 +0200] "GET /dhcp/192.168.2.0/unused_ip?from=192.168.2.150 HTTP/1.1" 400 44 0.0128

D, [2018-10-19T00:04:17.459467 ] DEBUG -- : close: 192.168.2.4:46338


Expected results:
To receive a free ip from the pool

Additional info:

Comment 3 Lukas Zapletal 2018-10-19 06:55:10 UTC
Hello,

this is probably not a regression, this line breaks our conf parser:

option interface-mtu 9000;

Please remove it until we provide a fix.

Comment 5 Satellite Program 2018-11-08 11:04:35 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25243 has been resolved.

Comment 9 Perry Gagne 2019-07-29 14:24:09 UTC
Verified fix in Sat 6.6 snap 12


1. Created dhcpd.conf with 'option interface-mtu 3000;' in subnet 
2. Configured satellite with 'satellite-installer --foreman-proxy-plugin-dhcp-remote-isc-dhcp-config'
3. Imported subnet into satellite.
4. Used subnet to provision host. 

The host was assigned a IP address as expected.

Comment 10 Perry Gagne 2019-07-29 15:21:53 UTC
Typo correction:

I verified this in Sat 6.6 snap 13.

Comment 11 Bryan Kearney 2019-10-22 19:48:10 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-2019:3172


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