Project

General

Profile

Bug #26197

undefined method `httpboot?' for nil:NilClass

Added by Timo Goebel 3 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Orchestration
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

When a host has no subnet associated, the following exception is raised during save:

NoMethodError: undefined method `httpboot?' for nil:NilClass
from app/models/operatingsystem.rb:247:in `boot_filename'
from app/models/concerns/orchestration/dhcp.rb:121:in `dhcp_attrs'
from app/models/concerns/orchestration/dhcp.rb:98:in `build_dhcp_record'
from app/models/concerns/orchestration/dhcp.rb:25:in `block in dhcp_records'
from app/models/concerns/orchestration/dhcp.rb:24:in `map'
from app/models/concerns/orchestration/dhcp.rb:24:in `dhcp_records'
from app/models/concerns/orchestration/dhcp.rb:57:in `set_dhcp'
from app/models/concerns/orchestration.rb:222:in `execute'
from app/models/concerns/orchestration.rb:145:in `block in process'
from app/models/concerns/orchestration.rb:137:in `each'
from app/models/concerns/orchestration.rb:137:in `process'
from app/models/concerns/orchestration.rb:44:in `around_save_orchestration'
from active_support/callbacks.rb:118:in `block in run_callbacks'
from active_support/callbacks.rb:136:in `run_callbacks'
from active_support/callbacks.rb:816:in `_run_save_callbacks'
from active_record/callbacks.rb:342:in `create_or_update'
from active_record/persistence.rb:275:in `save'
from active_record/validations.rb:46:in `save'
from active_record/transactions.rb:310:in `block (2 levels) in save'
from active_record/transactions.rb:387:in `block in with_transaction_returning_status'
from active_record/connection_adapters/abstract/database_statements.rb:254:in `block in transaction'
from active_record/connection_adapters/abstract/transaction.rb:239:in `block in within_new_transaction'
from monitor.rb:226:in `mon_synchronize'
from active_record/connection_adapters/abstract/transaction.rb:236:in `within_new_transaction'
from active_record/connection_adapters/abstract/database_statements.rb:254:in `transaction'
from active_record/transactions.rb:212:in `transaction'
from active_record/transactions.rb:385:in `with_transaction_returning_status'
from active_record/transactions.rb:310:in `block in save'
from active_record/transactions.rb:325:in `rollback_active_record_state!'
from active_record/transactions.rb:309:in `save'
from active_record/suppressor.rb:44:in `save'
from app/models/concerns/foreman/sti.rb:26:in `save'
from foreman_tasks/concerns/action_triggering.rb:27:in `block in save'
from foreman_tasks/concerns/action_triggering.rb:114:in `dynflow_task_wrap'
from foreman_tasks/concerns/action_triggering.rb:27:in `save'
from foreman_tasks/concerns/action_triggering.rb:27:in `block in save'
from foreman_tasks/concerns/action_triggering.rb:127:in `dynflow_task_wrap'
from foreman_tasks/concerns/action_triggering.rb:27:in `save'
from discovered_hosts_controller.rb:81:in `block in perform_update'
from app/models/taxonomy.rb:69:in `block in no_taxonomy_scope'
from app/models/taxonomy.rb:76:in `block (2 levels) in as_taxonomy'
from app/models/concerns/foreman/thread_session.rb:179:in `as_location'
from app/models/taxonomy.rb:75:in `block in as_taxonomy'
from app/models/concerns/foreman/thread_session.rb:142:in `as_org'
from app/models/taxonomy.rb:74:in `as_taxonomy'
from app/models/taxonomy.rb:68:in `no_taxonomy_scope'
from discovered_hosts_controller.rb:79:in `perform_update'
from discovered_hosts_controller.rb:75:in `update'
from action_controller/metal/basic_implicit_render.rb:6:in `send_action'
from abstract_controller/base.rb:194:in `process_action'
from action_controller/metal/rendering.rb:30:in `process_action'
from abstract_controller/callbacks.rb:42:in `block in process_action'
from active_support/callbacks.rb:109:in `block in run_callbacks'
from app/controllers/concerns/application_shared.rb:15:in `set_timezone'
from active_support/callbacks.rb:118:in `block in run_callbacks'
from app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
from active_support/callbacks.rb:118:in `block in run_callbacks'
from app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
from active_support/callbacks.rb:118:in `block in run_callbacks'
from audited/sweeper.rb:14:in `around'
from active_support/callbacks.rb:118:in `block in run_callbacks'
from audited/sweeper.rb:14:in `around'
from active_support/callbacks.rb:118:in `block in run_callbacks'
from active_support/callbacks.rb:136:in `run_callbacks'
from abstract_controller/callbacks.rb:41:in `process_action'
from action_controller/metal/rescue.rb:22:in `process_action'
from action_controller/metal/instrumentation.rb:34:in `block in process_action'
from active_support/notifications.rb:168:in `block in instrument'
from active_support/notifications/instrumenter.rb:23:in `instrument'
from active_support/notifications.rb:168:in `instrument'
from action_controller/metal/instrumentation.rb:32:in `process_action'
from action_controller/metal/params_wrapper.rb:256:in `process_action'
from active_record/railties/controller_runtime.rb:24:in `process_action'
from abstract_controller/base.rb:134:in `process'
from action_view/rendering.rb:32:in `process'
from action_controller/metal.rb:191:in `dispatch'
from action_controller/metal.rb:252:in `dispatch'
from action_dispatch/routing/route_set.rb:52:in `dispatch'
from action_dispatch/routing/route_set.rb:34:in `serve'
from action_dispatch/journey/router.rb:52:in `block in serve'
from action_dispatch/journey/router.rb:35:in `each'
from action_dispatch/journey/router.rb:35:in `serve'
from action_dispatch/routing/route_set.rb:840:in `call'
from action_dispatch/middleware/static.rb:127:in `call'
from action_dispatch/middleware/static.rb:127:in `call'
from apipie/static_dispatcher.rb:65:in `call'
from apipie/extractor/recorder.rb:137:in `call'
from action_dispatch/middleware/static.rb:127:in `call'
from action_dispatch/middleware/static.rb:127:in `call'
from action_dispatch/middleware/static.rb:127:in `call'
from action_dispatch/middleware/static.rb:127:in `call'
from action_dispatch/middleware/static.rb:127:in `call'
from action_dispatch/middleware/static.rb:127:in `call'
from action_dispatch/middleware/static.rb:127:in `call'
from action_dispatch/middleware/static.rb:127:in `call'
from action_dispatch/middleware/static.rb:127:in `call'
from action_dispatch/middleware/static.rb:127:in `call'
from action_dispatch/middleware/static.rb:127:in `call'
from action_dispatch/middleware/static.rb:127:in `call'
from lib/middleware/telemetry.rb:9:in `call'
from apipie/middleware/checksum_in_headers.rb:27:in `call'
from lib/middleware/catch_json_parse_errors.rb:8:in `call'
from rack/tempfile_reaper.rb:15:in `call'
from rack/etag.rb:25:in `call'
from rack/conditional_get.rb:38:in `call'
from rack/head.rb:12:in `call'
from action_dispatch/http/content_security_policy.rb:18:in `call'
from lib/middleware/logging_context.rb:23:in `call'
from rack/session/abstract/id.rb:232:in `context'
from rack/session/abstract/id.rb:226:in `call'
from action_dispatch/middleware/cookies.rb:670:in `call'
from action_dispatch/middleware/callbacks.rb:28:in `block in call'
from active_support/callbacks.rb:98:in `run_callbacks'
from action_dispatch/middleware/callbacks.rb:26:in `call'
from action_dispatch/middleware/debug_exceptions.rb:61:in `call'
from action_dispatch/middleware/show_exceptions.rb:33:in `call'
from rails/rack/logger.rb:38:in `call_app'
from rails/rack/logger.rb:28:in `call'
from sprockets/rails/quiet_assets.rb:13:in `call'
from action_dispatch/middleware/remote_ip.rb:81:in `call'
from action_dispatch/middleware/request_id.rb:27:in `call'
from katello/prevent_json_parsing.rb:12:in `call'
from rack/method_override.rb:22:in `call'
from rack/runtime.rb:22:in `call'
from active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
from action_dispatch/middleware/executor.rb:14:in `call'
from action_dispatch/middleware/static.rb:127:in `call'
from rack/sendfile.rb:111:in `call'
from secure_headers/middleware.rb:13:in `call'
from rack/cors.rb:97:in `call'
from rails/engine.rb:524:in `call'
from rails/railtie.rb:190:in `public_send'
from rails/railtie.rb:190:in `method_missing'
from rack/urlmap.rb:68:in `block in call'
from rack/urlmap.rb:53:in `each'
from rack/urlmap.rb:53:in `call'
from /usr/share/passenger/phusion_passenger/rack/thread_handler_extension.rb:74:in `process_request'
from /usr/share/passenger/phusion_passenger/request_handler/thread_handler.rb:141:in `accept_and_process_next_request'
from /usr/share/passenger/phusion_passenger/request_handler/thread_handler.rb:109:in `main_loop'
from /usr/share/passenger/phusion_passenger/request_handler.rb:455:in `block (3 levels) in start_threads'
from logging/diagnostic_context.rb:474:in `block in create_with_logging_context'

Associated revisions

Revision 1b84eb30 (diff)
Added by Timo Goebel 3 months ago

fixes #26197 - boot_filename for host without subnet

History

#1 Updated by The Foreman Bot 3 months ago

  • Assignee set to Timo Goebel
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/6528 added

#2 Updated by Tomer Brisker 3 months ago

  • Fixed in Releases 1.20.3, 1.21.1, 1.22.0 added

#3 Updated by Timo Goebel 3 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF