Project

General

Profile

Bug #27585

default dns timeout value is nil

Added by Amir Fefer 8 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Category:
Settings
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

when trying to provision a host, the following error is observed.

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'

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

this seems like a regression in #27160.


Related issues

Related to Foreman - Bug #27160: Foreman fails to find IP address for boot server if main resolver is downClosed
Related to Foreman - Bug #28727: dns timeout setting is `[nil]` causing dns lookup to failClosed

Associated revisions

Revision 8cc16674 (diff)
Added by Lukas Zapletal 3 months ago

Fixes #27585 - default dns timeout value is nil

History

#1 Updated by Amir Fefer 8 months ago

  • Related to Bug #27160: Foreman fails to find IP address for boot server if main resolver is down added

#2 Updated by Lukas Zapletal 8 months ago

  • Status changed from New to Need more information

Nightly installed fine, probably something wrong with the migration script. However I am unable to reproduce, I guess you don't know the steps so let's keep it opened until I figure out what is causing it.

#3 Updated by Tomer Brisker 4 months ago

  • Target version set to 1.24.1
  • Status changed from Need more information to New
  • Category set to Settings
  • Found in Releases 1.24.0 added

This is being reported by multiple users in 1.24 after upgrading:
https://community.theforeman.org/t/upgrade-from-1-23-to-1-24-broke-host-creation/16582

#4 Updated by The Foreman Bot 3 months ago

  • Assignee set to Lukas Zapletal
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/7260 added

#5 Updated by Tomer Brisker 3 months ago

Workaround: Setting the

dns_timeout
setting to
[5, 10, 15, 20]
will resolve the issue

#6 Updated by The Foreman Bot 3 months ago

  • Fixed in Releases 2.0.0 added

#7 Updated by Tomer Brisker 3 months ago

  • Fixed in Releases 1.24.1 added

#8 Updated by Lukas Zapletal 3 months ago

  • Status changed from Ready For Testing to Closed

#9 Updated by Tomer Brisker 3 months ago

  • Bugzilla link set to 1790184

#10 Updated by Tomer Brisker 3 months ago

  • Related to Bug #28727: dns timeout setting is `[nil]` causing dns lookup to fail added

Also available in: Atom PDF