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 1790184 - default dns timeout value is nil
Summary: default dns timeout value is nil
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Settings
Version: 6.7.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: 6.7.0
Assignee: Lukas Zapletal
QA Contact: Omkar Khatavkar
URL:
Whiteboard:
: 1790185 1790186 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-12 11:21 UTC by Tomer Brisker
Modified: 2020-07-10 12:29 UTC (History)
4 users (show)

Fixed In Version: foreman-1.24.1.1-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-14 13:28:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 27585 0 Normal Closed default dns timeout value is nil 2020-07-10 12:20:08 UTC
Foreman Issue Tracker 28727 0 Normal Closed dns timeout setting is `[nil]` causing dns lookup to fail 2020-07-10 12:20:07 UTC
Red Hat Product Errata RHSA-2020:1454 0 None None None 2020-04-14 13:28:44 UTC

Description Tomer Brisker 2020-01-12 11:21:05 UTC
when trying to provision a host, the following error is observed.

<pre>
ArgumentError
nil is not numeric
/opt/rh/rh-ruby24/root/usr/share/ruby/resolv.rb:919:in `block in timeouts='
/opt/rh/rh-ruby24/root/usr/share/ruby/resolv.rb:918:in `each'
/opt/rh/rh-ruby24/root/usr/share/ruby/resolv.rb:918:in `timeouts='
/opt/rh/rh-ruby24/root/usr/share/ruby/resolv.rb:352:in `timeouts='
/home/foreman/git/foreman/lib/net/dns.rb:25:in `lookup'
/home/foreman/git/foreman/lib/net/dns.rb:84:in `dns_lookup'
/home/foreman/git/foreman/lib/net/dns/forward_record.rb:22:in `conflicts'
/home/foreman/git/foreman/lib/net.rb:23:in `conflicting?'
/home/foreman/git/foreman/app/models/concerns/orchestration/dns.rb:119:in `block in dns_conflict_detected?'
/home/foreman/git/foreman/app/models/concerns/orchestration/dns.rb:118:in `each'
/home/foreman/git/foreman/app/models/concerns/orchestration/dns.rb:118:in `dns_conflict_detected?'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:426:in `block in make_lambda'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:236:in `block in halting_and_conditional'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:517:in `block in invoke_after'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:517:in `each'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:517:in `invoke_after'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:133:in `run_callbacks'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:816:in `_run_validation_callbacks'
/home/foreman/gems/gems/activemodel-5.2.1/lib/active_model/validations/callbacks.rb:118:in `run_validations!'
/home/foreman/gems/gems/activemodel-5.2.1/lib/active_model/validations.rb:339:in `valid?'
/home/foreman/gems/gems/activerecord-5.2.1/lib/active_record/validations.rb:67:in `valid?'
/home/foreman/git/foreman/app/models/concerns/orchestration.rb:86:in `valid?'
/home/foreman/gems/gems/activerecord-5.2.1/lib/active_record/autosave_association.rb:329:in `association_valid?'
/home/foreman/gems/gems/activerecord-5.2.1/lib/active_record/autosave_association.rb:316:in `block in validate_collection_association'
/home/foreman/gems/gems/activerecord-5.2.1/lib/active_record/autosave_association.rb:316:in `each'
/home/foreman/gems/gems/activerecord-5.2.1/lib/active_record/autosave_association.rb:316:in `each_with_index'
/home/foreman/gems/gems/activerecord-5.2.1/lib/active_record/autosave_association.rb:316:in `validate_collection_association'
/home/foreman/gems/gems/activerecord-5.2.1/lib/active_record/autosave_association.rb:220:in `block in define_autosave_validation_callbacks'
/home/foreman/gems/gems/activerecord-5.2.1/lib/active_record/autosave_association.rb:159:in `instance_eval'
/home/foreman/gems/gems/activerecord-5.2.1/lib/active_record/autosave_association.rb:159:in `block in define_non_cyclic_method'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:426:in `block in make_lambda'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:198:in `block (2 levels) in halting'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:606:in `block (2 levels) in default_terminator'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:605:in `catch'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:605:in `block in default_terminator'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:199:in `block in halting'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:513:in `block in invoke_before'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:513:in `each'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:513:in `invoke_before'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:131:in `run_callbacks'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:816:in `_run_validate_callbacks'
/home/foreman/gems/gems/activemodel-5.2.1/lib/active_model/validations.rb:409:in `run_validations!'
/home/foreman/gems/gems/activemodel-5.2.1/lib/active_model/validations/callbacks.rb:118:in `block in run_validations!'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:132:in `run_callbacks'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:816:in `_run_validation_callbacks'
/home/foreman/gems/gems/activemodel-5.2.1/lib/active_model/validations/callbacks.rb:118:in `run_validations!'
/home/foreman/gems/gems/activemodel-5.2.1/lib/active_model/validations.rb:339:in `valid?'
/home/foreman/gems/gems/activerecord-5.2.1/lib/active_record/validations.rb:67:in `valid?'
/home/foreman/git/foreman/app/models/concerns/orchestration.rb:86:in `valid?'
/home/foreman/gems/gems/activerecord-5.2.1/lib/active_record/validations.rb:84:in `perform_validations'
/home/foreman/gems/gems/activerecord-5.2.1/lib/active_record/validations.rb:46:in `save'
/home/foreman/gems/gems/activerecord-5.2.1/lib/active_record/transactions.rb:310:in `block (2 levels) in save'
/home/foreman/gems/gems/activerecord-5.2.1/lib/active_record/transactions.rb:387:in `block in with_transaction_returning_status'
/home/foreman/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:254:in `block in transaction'
/home/foreman/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:239:in `block in within_new_transaction'
/opt/rh/rh-ruby24/root/usr/share/ruby/monitor.rb:214:in `mon_synchronize'
/home/foreman/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/transaction.rb:236:in `within_new_transaction'
/home/foreman/gems/gems/activerecord-5.2.1/lib/active_record/connection_adapters/abstract/database_statements.rb:254:in `transaction'
/home/foreman/gems/gems/activerecord-5.2.1/lib/active_record/transactions.rb:212:in `transaction'
/home/foreman/gems/gems/activerecord-5.2.1/lib/active_record/transactions.rb:385:in `with_transaction_returning_status'
/home/foreman/gems/gems/activerecord-5.2.1/lib/active_record/transactions.rb:310:in `block in save'
/home/foreman/gems/gems/activerecord-5.2.1/lib/active_record/transactions.rb:325:in `rollback_active_record_state!'
/home/foreman/gems/gems/activerecord-5.2.1/lib/active_record/transactions.rb:309:in `save'
/home/foreman/gems/gems/activerecord-5.2.1/lib/active_record/suppressor.rb:44:in `save'
/home/foreman/git/foreman/app/models/concerns/foreman/sti.rb:26:in `save'
/home/foreman/git/foreman/app/controllers/hosts_controller.rb:98:in `create'
/home/foreman/gems/gems/actionpack-5.2.1/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
/home/foreman/gems/gems/actionpack-5.2.1/lib/abstract_controller/base.rb:194:in `process_action'
/home/foreman/gems/gems/actionpack-5.2.1/lib/action_controller/metal/rendering.rb:30:in `process_action'
/home/foreman/gems/gems/actionpack-5.2.1/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:109:in `block in run_callbacks'
/home/foreman/git/foreman/app/controllers/concerns/foreman/controller/timezone.rb:10:in `set_timezone'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/home/foreman/git/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/home/foreman/git/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/home/foreman/gems/gems/audited-4.8.0/lib/audited/sweeper.rb:14:in `around'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/home/foreman/gems/gems/audited-4.8.0/lib/audited/sweeper.rb:14:in `around'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:118:in `block in run_callbacks'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:136:in `run_callbacks'
/home/foreman/gems/gems/actionpack-5.2.1/lib/abstract_controller/callbacks.rb:41:in `process_action'
/home/foreman/gems/gems/actionpack-5.2.1/lib/action_controller/metal/rescue.rb:22:in `process_action'
/home/foreman/gems/gems/actionpack-5.2.1/lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/notifications.rb:168:in `block in instrument'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/notifications/instrumenter.rb:23:in `instrument'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/notifications.rb:168:in `instrument'
/home/foreman/gems/gems/actionpack-5.2.1/lib/action_controller/metal/instrumentation.rb:32:in `process_action'
/home/foreman/gems/gems/actionpack-5.2.1/lib/action_controller/metal/params_wrapper.rb:256:in `process_action'
/home/foreman/gems/gems/activerecord-5.2.1/lib/active_record/railties/controller_runtime.rb:24:in `process_action'
/home/foreman/gems/gems/actionpack-5.2.1/lib/abstract_controller/base.rb:134:in `process'
/home/foreman/gems/gems/actionview-5.2.1/lib/action_view/rendering.rb:32:in `process'
/home/foreman/gems/gems/actionpack-5.2.1/lib/action_controller/metal.rb:191:in `dispatch'
/home/foreman/gems/gems/actionpack-5.2.1/lib/action_controller/metal.rb:252:in `dispatch'
/home/foreman/gems/gems/actionpack-5.2.1/lib/action_dispatch/routing/route_set.rb:52:in `dispatch'
/home/foreman/gems/gems/actionpack-5.2.1/lib/action_dispatch/routing/route_set.rb:34:in `serve'
/home/foreman/gems/gems/actionpack-5.2.1/lib/action_dispatch/journey/router.rb:52:in `block in serve'
/home/foreman/gems/gems/actionpack-5.2.1/lib/action_dispatch/journey/router.rb:35:in `each'
/home/foreman/gems/gems/actionpack-5.2.1/lib/action_dispatch/journey/router.rb:35:in `serve'
/home/foreman/gems/gems/actionpack-5.2.1/lib/action_dispatch/routing/route_set.rb:840:in `call'
/home/foreman/gems/gems/apipie-rails-0.5.16/lib/apipie/static_dispatcher.rb:66:in `call'
/home/foreman/gems/gems/apipie-rails-0.5.16/lib/apipie/extractor/recorder.rb:137:in `call'
/home/foreman/git/foreman/lib/foreman/middleware/telemetry.rb:10:in `call'
/home/foreman/gems/gems/apipie-rails-0.5.16/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
/home/foreman/git/foreman/lib/foreman/middleware/catch_json_parse_errors.rb:9:in `call'
/home/foreman/gems/gems/rack-2.0.7/lib/rack/tempfile_reaper.rb:15:in `call'
/home/foreman/gems/gems/rack-2.0.7/lib/rack/etag.rb:25:in `call'
/home/foreman/gems/gems/rack-2.0.7/lib/rack/conditional_get.rb:38:in `call'
/home/foreman/gems/gems/rack-2.0.7/lib/rack/head.rb:12:in `call'
/home/foreman/gems/gems/actionpack-5.2.1/lib/action_dispatch/http/content_security_policy.rb:18:in `call'
/home/foreman/git/foreman/lib/foreman/middleware/logging_context_session.rb:22:in `call'
/home/foreman/gems/gems/rack-2.0.7/lib/rack/session/abstract/id.rb:232:in `context'
/home/foreman/gems/gems/rack-2.0.7/lib/rack/session/abstract/id.rb:226:in `call'
/home/foreman/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/cookies.rb:670:in `call'
/home/foreman/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/callbacks.rb:98:in `run_callbacks'
/home/foreman/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
/home/foreman/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/debug_exceptions.rb:61:in `call'
/home/foreman/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
/home/foreman/gems/gems/railties-5.2.1/lib/rails/rack/logger.rb:38:in `call_app'
/home/foreman/gems/gems/railties-5.2.1/lib/rails/rack/logger.rb:28:in `call'
/home/foreman/gems/gems/sprockets-rails-3.2.1/lib/sprockets/rails/quiet_assets.rb:13:in `call'
/home/foreman/git/foreman/lib/foreman/middleware/logging_context_request.rb:11:in `call'
/home/foreman/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
/home/foreman/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/request_id.rb:27:in `call'
/home/foreman/gems/gems/rack-2.0.7/lib/rack/method_override.rb:22:in `call'
/home/foreman/gems/gems/rack-2.0.7/lib/rack/runtime.rb:22:in `call'
/home/foreman/gems/gems/activesupport-5.2.1/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
/home/foreman/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/executor.rb:14:in `call'
/home/foreman/gems/gems/actionpack-5.2.1/lib/action_dispatch/middleware/static.rb:127:in `call'
/home/foreman/gems/gems/rack-2.0.7/lib/rack/sendfile.rb:111:in `call'
/home/foreman/gems/gems/secure_headers-6.1.1/lib/secure_headers/middleware.rb:11:in `call'
/home/foreman/gems/gems/railties-5.2.1/lib/rails/engine.rb:524:in `call'
/home/foreman/gems/gems/railties-5.2.1/lib/rails/railtie.rb:190:in `public_send'
/home/foreman/gems/gems/railties-5.2.1/lib/rails/railtie.rb:190:in `method_missing'
/home/foreman/gems/gems/rack-2.0.7/lib/rack/urlmap.rb:68:in `block in call'
/home/foreman/gems/gems/rack-2.0.7/lib/rack/urlmap.rb:53:in `each'
/home/foreman/gems/gems/rack-2.0.7/lib/rack/urlmap.rb:53:in `call'
/root/.gem/gems/passenger-5.0.7/lib/phusion_passenger/rack/thread_handler_extension.rb:89:in `process_request'
/root/.gem/gems/passenger-5.0.7/lib/phusion_passenger/request_handler/thread_handler.rb:155:in `accept_and_process_next_request'
/root/.gem/gems/passenger-5.0.7/lib/phusion_passenger/request_handler/thread_handler.rb:110:in `main_loop'
/root/.gem/gems/passenger-5.0.7/lib/phusion_passenger/request_handler.rb:414:in `block (3 levels) in start_threads'
/root/.gem/gems/passenger-5.0.7/lib/phusion_passenger/utils.rb:111:in `block in create_thread_and_abort_on_exception'
/home/foreman/gems/gems/logging-2.2.2/lib/logging/diagnostic_context.rb:474:in `block in create_with_logging_context'
</pre>

setting a default value to [5] resolves the issue.

this seems like a regression in #27160.

Comment 1 Tomer Brisker 2020-01-12 11:21:12 UTC
Created from redmine issue https://projects.theforeman.org/issues/27585

Comment 4 Tomer Brisker 2020-01-12 11:37:44 UTC
*** Bug 1790186 has been marked as a duplicate of this bug. ***

Comment 5 Tomer Brisker 2020-01-12 11:38:36 UTC
*** Bug 1790185 has been marked as a duplicate of this bug. ***

Comment 6 Bryan Kearney 2020-01-12 13:01:06 UTC
Upstream bug assigned to lzap

Comment 7 Bryan Kearney 2020-01-12 13:01:08 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/27585 has been resolved.

Comment 8 Tomer Brisker 2020-01-12 13:36:20 UTC
This is caused by an upgrade of a system that has the `dns_conflict_timeout` set to the default value. in some cases, it can cause the upgraded system to have the setting `dns_timeout` set to `nil` or `[nil]`, which causes any dns lookups to fail.

To verify:
1. On Sat 6.6, Make sure `dns_conflict_timeout` is set to the default value (`Setting.find_by_name('dns_conflict_timeout')[:value] == nil`)
2. Upgrade to 6.7 
3. Make sure `dns_timeout` setting is set to the default value (`Setting.find_by_name('dns_timeout')[:value] == nil && Setting[:dns_timeout] == [5, 10, 15, 20]`

Make sure to run 

Rails.cache.delete(Setting.cache_key("dns_timeout"))
Rails.cache.delete(Setting.cache_key("dns__conflict_timeout"))

between steps to ensure the cache is cleaned.

Comment 13 errata-xmlrpc 2020-04-14 13:28:29 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-2020:1454


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